a. Let H∈{1,…,K} be a discrete random variable, and let e1 and e2 be the observed values of two other random variables E1 and E2. Suppose we wish to calculate the vector
P(H∣e1,e2)=(P(H=1∣e1,e2),…,P(H=K∣e1,e2))
Which of the following sets of numbers are sufficient for the calculation?
i. P(e1,e2),P(H),P(e1∣H),P(e2∣H)
ii. P(e1,e2),P(H),P(e1,e2∣H)
iii. P(e1∣H),P(e2∣H),P(H)
b. Now suppose we now assume E1⊥E2∣H (i.e., E1 and E2 are conditionally independent given H). Which of the above 3 sets are sufficient now?
Show your calculations as well as giving the final result. Hint: use Bayes rule.
解答:
a. 选项 ii 是计算该式的充分条件,P(H∣e1,e2)=P(e1,e2)P(H)P(e1,e2∣H)
b. P(e1,e2∣H)=P(e1∣H)P(e2∣H),则 i 也是充分条件
⚠️ 纠错: 选项 iii 也是充分条件,因为 P(e1,e2)=∑h=1KP(e1∣H=h)P(e2∣H=h)P(H=h)
Exercise 2.2 [Pairwise independence does not imply mutual independence]
We say that two random variables are pairwise independent if
p(X2∣X1)=p(X2)
and hence
p(X2,X1)=p(X1)p(X2∣X1)=p(X1)p(X2)
We say that n random variables are mutually independent if
p(Xi∣XS)=p(Xi)∀S⊆{1,…,n}∖{i}
and hence
p(X1:n)=i=1∏np(Xi)
Show that pairwise independence between all pairs of variables does not necessarily imply mutual independence. It suffices to give a counter example.
解答:
注意 S 是一个集合,存在反例:X1∼U(0,1),X2∼U(0,1),X3∼U(X1,X2)
After your yearly checkup, the doctor has bad news and good news. The bad news is that you tested positive for a serious disease, and that the test is 99% accurate (i.e., the probability of testing positive given that you have the disease is 0.99, as is the probability of testing negative given that you don’t have the disease). The good news is that this is a rare disease, striking only one in 10,000 people. What are the chances that you actually have the disease? (Show your calculations as well as giving the final result.)
Suppose a crime has been committed. Blood is found at the scene for which there is no innocent explanation. It is of a type which is present in 1% of the population.
a. The prosecutor claims: “There is a 1% chance that the defendant would have the crime blood type if he were innocent. Thus there is a 99% chance that he is guilty”. This is known as the prosecutor’s fallacy. What is wrong with this argument?
b. The defender claims: “The crime occurred in a city of 800,000 people. The blood type would be found in approximately 8000 people. The evidence has provided a probability of just 1 in 8000 that the defendant is guilty, and thus has no relevance.” This is known as the defender’s fallacy. What is wrong with this argument?
b. 辩护人的谬误在于只关注后验概率的绝对值。实际上,该证据使嫌疑人的犯罪概率由先验的 8000001 上升到了 80001,增加了 100 倍,因此是高度相关的证据。
Exercise 2.11 [Probabilities are sensitive to the form of the question that was used to generate the answer †]
My neighbor has two children. Assuming that the gender of a child is like a coin flip, it is most likely, a priori, that my neighbor has one boy and one girl, with probability 1/2. The other possibilities—two boys or two girls—have probabilities 1/4 and 1/4.
a. Suppose I ask him whether he has any boys, and he says yes. What is the probability that one child is a girl?
b. Suppose instead that I happen to see one of his children run by, and it is a boy. What is the probability that the other child is a girl?
解答:
a. p(only one boy∣have boy)=p(have boy)p(only one boy)=3/41/2=2/3
b. p(the other is a girl∣see a boy)=1/2
Exercise 2.12 [Normalization constant for a 1D Gaussian]
The normalization constant for a zero-mean Gaussian is given by
Z=∫abexp(−2σ2x2)dx
where a=−∞ and b=∞. To compute this, consider its square
Z2=∫ab∫abexp(−2σ2x2+y2)dxdy
Let us change variables from cartesian (x,y) to polar (r,θ) using x=rcosθ and y=rsinθ. Since dxdy=rdrdθ, and cos2θ+sin2θ=1, we have
Z2=∫02π∫0∞rexp(−2σ2r2)drdθ
Evaluate this integral and hence show Z=2πσ2. Hint 1: separate the integral into a product of two terms, the first of which (involving dθ) is constant, so is easy. Hint 2: if u=e−r2/2σ2 then du/dr=−σ21re−r2/2σ2, so the second integral is also easy (since ∫u′(r)dr=u(r)).