In: Statistics and Probability
1. Say you pick integers from the set {1,2,...,20} eight times with replacement (i.e. you can pick the same number multiple times). What is the probability that exactly half your choices are prime numbers?
2. Suppose you roll three fair, six-sided dice. Let X denote the sum of the three dice.
-Find P(X = 5), P(X >= 16), and P(X is even).
-Compute E[X].
-Let A be the event that X >= E[X], B the event that X is a multiple of 3, and C the event that the first die is a 6. Are A and B independent? What about B and C?
Please explain !
1. Prime numbers upto 20 are 2,3,5,7,11,13,17,19 = 8 numbers
Probability of a prime number in one trial = 8/20 = 2/5 = 0.4
Now integers are picked with replacement hence trials are independent, and we want 4 prime numbers in 8 trials => binomial distribution ~ B(8,0.4)
P(exactly 4 primes) = 8C4 (0.4)^4 * (0.6)^4
2. X denote the sum of the three dice.
X can take values 3,4,5.......18
Now total outcomes for three dice thrown are 6*6*6 = 216
Let's take X = 3, the only possible case is one on each dice :{1,1,1} Hence its probability would be 1/216
Let's take X= 15, here triplets can be 6,6,3 or 6,5,4 or 5,5,5 so number of cases would be 3!/2! + 3! + 1 = 10 hence its probability would be 10/216.
Similarly considering each case, the pmf of X is as follows:
X | P(X=x) | x*P(X=x) |
3 | 1/216 | 3/216 |
4 | 3/216 | 12/216 |
5 | 6/216 | 30/216 |
6 | 10/216 | 60/216 |
7 | 15/216 | 105/216 |
8 | 21/216 | 168/216 |
9 | 25/216 | 225/216 |
10 | 27/216 | 270/216 |
11 | 27/216 | 297/216 |
12 | 25/216 | 300/216 |
13 | 21/216 | 273/216 |
14 | 15/216 | 210/216 |
15 | 10/216 | 150/216 |
16 | 6/216 | 96/216 |
17 | 3/216 | 51/216 |
18 | 1/216 | 18/216 |
Now we can answer the questions:
P(X=5) = 6/216 = 1/36
P(X>=16) = P(X=16) + P(X=17) + P(X=18) = (6+3+1)/216 = 10/216 = 5/108
P(X is even) = P(X=4) + P(X=6) + ........+ P(X=18), but on looking carefully, P(X=18) = P(X=3) [take 18, leave 3 for as 3 is odd] similarly P(X=16) = P(X=5) [take 16, leave 5] and so on. So there are exactly half the same probabilities we are taking and other same we are leaving. Hence P(X is even) = 0.5
E[X] = = (3+12+30+......+18)/216 = 2268/216 = 10.5
Now
A: X>10.5 => P(A) = 1/2
B: X is multiple of 3 => P(B) = 72/216 = 1/3
C: first die is a 6 => P(C) = 1/6
Now if P and Q are two events which are independent then:
For events A and B,
P(A intersection B) is P(X=12) + P(X=15) + P(X=18) = (25+10+1)/216 = 36/216 = 1/6
P(A)*P(B) = 1/2*1/3 = 1/6
Hence A and B are independent.
For events B and C,
Let Y be sum of numbers on rolling two dice. Following the same method as in case of 3 dice, we have
P(Y=6) : 5/36 , P(Y=9) : 4/36 , P(Y=12) : 1/36
P(B intersection C) is P(X=12/first die = 6) + P(X=15first die = 6) + P(X=18first die = 6)
=> 1/6*[ P(Y=6) + P(Y=9) + P(Y=12) ] = 1/6*(10/36) = 10/216 = 5/108
P(B)*P(C) = 1/3*1/6 = 1/18
Hence B and C are not independent.