Suppose Uncle Jack shows you a coin

advertisement
1. Suppose Uncle Jack shows you a coin, and the probability that flipping the
coin gives the heads side is p Î[0,1]. Jack is tricky, so either p=0, p=1/2,
or p=1, with probability 1/3 each. Also suppose that Uncle Jack is going to
flip the coin 2 times, and let X = the number of heads. So conditional on p,
X ~ binom(2,p) .
a. What is E(p)?
½ What is E(p2)? 5/12 What is var(p)? 1/6
b. What is E(2p)? 1 What is var(2p)? 4/6
c. In general, a joint distribution is the product of a
__marginal______ distribution and a __conditional_______
distribution. Using this, what is the joint distribution of p and X?
ì (0,0)
1/ 3
ï
0
ï (0,1)
ï (0,2)
0
ï
ï (1/ 2,0)
1/ 3 ´ 1/ 4
ï
(p,x) = í (1/ 2,1) with probability 1/ 3 ´ 1/ 2
ï (1/ 2,2)
1/ 3 ´ 1/ 4
ï
ï (1,0)
0
ï
0
ï (1,1)
ï (1,2)
1/ 3
î
d. What are the formulas for the marginal mean and variance of X?
(Marginalizing over p, of course.)
e. Apply those formulas to get the marginal mean and variance of X in
this case.
E(X) = nE(p)=2*1/2 =1
var(X) =E(var(X|p))+var(E(X|p))=E(np(1-p)) + n2 var(p)
= 2(1/2) – 2(5/12) + 4(1/6) = 1 - 5/6 + 2/3 = 5/6
E(p) = 1/2
E(X) = nE(p)=2*1/2 =1
E(p2) = 1/3*0 + 1/3*1/4 + 1/3*1 = 5/12
Var(p) = E(p2) – (E(p))2 = 5/12 – ¼ = 2/12 = 1/6
var(X) =E(var(X|p))+var(E(X|p))=E(np(1-p)) + n2 var(p)
= 2(1/2) – 2(5/12) + 4(1/6) = 1 - 5/6 + 2/3 = 5/6 -- I forgot that var(np)=n2var(p).
Verify: Pr(X=0) = 1/3 + 1/12 +0= 5/12,
Pr(X=1)=0 + 1/6 + 0 = 1/6,
Pr(X=2)=0+1/12+1/3=5/12.
E(X) =0+1*1/6 + 2*5/12 = 12/12 = 1 OK.
E(X2)=0+1*1/6 + 4*5/12 = 22/12=11/6
Var(X)=11/6 – (1)2 = 5/6. Correct by simulation.
X=2, pr(P=1 | X=2) = Pr(1,2)/Pr(X=2) = (1/3) / (1/3 + 1/12) = 4/5.
Download