[SOLVED] CS代考计算机代写 AI Inclusion / Exclusion

30 $

File Name: CS代考计算机代写_AI_Inclusion_/_Exclusion.zip
File Size: 452.16 KB

SKU: 6208148994 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


Inclusion / Exclusion
Two events: P(A∪B)= P(A) P+(B) P−(AB)
Three events: PABC PAPBPC PABPACPBC PABC
Four events:
Page 1
PABCD PAPBPCPD 
In general for a finite collection of events E1, E2, … , En.
More succinctly.
 
 PAB PAC PAD PBC PBD PCD 
  PABC PABD PACD PBCD
 PABCD

Page 2
EX CARDS There are n cards labeled 1, 2, …, n. The cards are randomly permuted into bins also labeled 1, 2, … , n. (one card per bin). What’s the probability that at least one card’s label matches the bin’s label? Start by letting Ai denote the event that card i finds its way into bin i. – the card matches the bin. P(Ai) = 1/n. However,
nnn1 PA ≠ P(A )= = n
∑ i=1  i=1 i=1
i∑
1 (the Ai are not mutually exclusive). (1 doesn’t make sense as a probability for this. It’s possible that all cards fail to match – you can easily arrange a deck to force it.) Boole’s inequality is a
i
nn
dud too: PA ≤ P(A )=1. (The book treats this as n men, each with a hat. The hats are thrown into a
i∑
i
 i=1 
EX REJ From a lot of 25 items, 5 are randomly selected and tested. The lot is rejected if over 2 of the sampled
i=1
box, then each man reaches in a randomly pulls out one hat. How probable is it at least one man gets his hat?)
items are defective. If 8 of the 25 items are indeed defective, what is the probability the lot is rejected?
EX POK A 5-card poker hand, randomly drawn from a standard deck (13 cards A – K in each of four suits ♣♦♠♥. Find the probabilities of a) two pairs and b) a straight. Some poker knowledge is helpful. A straight is consecutive cards not all of the same suit. A is treated as both low (A-2-3-4-5) and high (10-J-Q-K-A).
R for combinatorics.
> choose(13,2)*choose(4,2)^2*choose(44,1)/choose(52,5) [1] 0.04753902
> (10*4^5-40)/choose(52,5)
[1] 0.003924647
> ((10*4^5-40)/choose(52,5))^-1
[1] 254.8
EX 27 An urn contains 7 black and 4 white balls, laid out in order (Spot 1, Spot 2, … , Spot 11). If we scan the balls in that order, what’s the probability we first see a white ball in Spot i? First: Identify possible values for i.
EX 28 A bucket (I hate urns; who talks about urns?) contains 5 black, 7 yellow and 9 red balls. If a set of 3 balls is randomly selected, a) what is the probability they are all of the same color? b) of different color? Repeat assuming that balls are replaced after being selected (sampling with replacement).
EX BD With n people in a room, how likely is it that two have the same birthday (month and day only). Assume all birthdays are equally likely (not too far from the truth) and ignore Feb 29.
> n = 30
> v <- seq(365,365-n+1) >v
[1] 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 [16] 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 > v_over_365 <- v/365> v_over_365
[1] 1.0000000 0.9972603 0.9945205 0.9917808 0.9890411 0.9863014
[7] 0.9835616 0.9808219 0.9780822 0.9753425 0.9726027 0.9698630 [13] 0.9671233 0.9643836 0.9616438 0.9589041 0.9561644 0.9534247 [19] 0.9506849 0.9479452 0.9452055 0.9424658 0.9397260 0.9369863 [25] 0.9342466 0.9315068 0.9287671 0.9260274 0.9232877 0.9205479 > prod(v_over_365) # prod = product
[1] 0.2936838
> n <- 50> v <- seq(365,365-n+1)> v_over_365 <- v/365> prod(v_over_365)
[1] 0.02962642
P(all different birthdays)

-l 0
‘r.s .
Page 3

. ~ s t1.A.P
-=-(0I ‘I
Page 4

t ::..
– So
(._

2–

67
Page 5

b
Page 6

.
~

— – — – –
p(~ ~s~)~

0..122-C( 0,/2-6/ r)~/2-~ {), 12.-8″;
0, I2 72-
o;12 r2-r?r
0,/21/~ )17 ~
I
s~-f7′”3 -t1s -z/ 3
— .
?C . l
c;;- – JO
I
2~ / OU
/000 /’~ Of)(;/
oP
l
f;;’)t(;.-{~;J 211(
3)
p(_cdJ. ~ s~) /),o,70
C
4,; ~ ~”J?J J-i()J1 $ I~ c; /&t’-,..15″‘ -S(/u,-~/,’yr_(._ ,r-,/,V
lA/J,-rf’l,,gJ- ~£//a.A”;,,”’71..t2-,_:;I– hJ/CC)~ (” 1 ~~.et-t-i;/4
~ ~,:! ; ;.. -~ I rd-/’)’!. r 4d- .<:. d.,,.,,,- J? I, ;,, r,_,,/r#i/r1° ,J/t/k.,,~rL.._ –,VPage 8– C1 ‘}-,e c.J:) le_Page 9

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS代考计算机代写 AI Inclusion / Exclusion
30 $