CSU |
Hayward |
|
|
Statistics |
Department |
The purpose of this appendix is to show technical proofs of distributional relationships that characterize the Gibbs sampler in Section 8.
To understand why the conditional distribution X | A, p is binomial, look at the first row (T=1) of Table 2 with a given value of the prevalence p in mind. Recall that P(T=1) = t = ph + p*q*, where h = P(T=1 | D=1) and q = P(T=0 | D=0). Conditional on T = 1, each of the A observations in the first row of the table either has D = 1 with probability g = ph/t (as shown in Section 3) or D = 0 with probability g* = 1 – ph/t = p*q*/t. Thus it is clear that the conditional distribution of X, given A and p, is binomial with A trials and success probability ph/t. That is,
X | A, p ~ Bino(A, ph/t) = Bino(A, ph/(ph+p*q*)).
The derivation of the distribution of Y | B, p is similar.
In the Gibbs sampler of Section 8, we have the beta prior distribution of P,
f(p) µ pa – 1(1 – p)b – 1 = pa – 1(p*)b – 1, 0 < p < 1,
where a, b > 0 and where we use the proportionality symbol µ to indicate that we display only the "kernel" of the distribution and ignore the constant.
Because the observable data consist of A and B, we would like to have an expression for the posterior distribution density f(p | a, b), but to derive it is not an easy integration problem! That is why we turn to the Gibbs sampler, which involves the sampled random variables X and Y, and the conditional distribution P | A, B, X, Y, as well as the two conditional distributions X | A, p and Y | B, p considered above. Accordingly, we now complete the derivations of the conditional distributions of Section 8 by finding the density f(p | a, b, x, y).
Altogether, the Gibbs sampler involves five random variables P, A, B, X, and Y. Using the definition of conditional distribution, we express their joint density function as
f(p, a, b, x, y) = f(a, b, x, y | p) f(p).
Then by the general version of Bayes' Theorem (see Appendix B),
f(p | a, b, x, y) µ f(a, b, x, y | p) f(p).
Thus we can find the form of the conditional density f(p | a, b, x, y) by evaluating the joint density as a product. Referring to the four entries in the body of Table 2 with a given prevalence p, we see that
f(a, b, x, y | p) µ (ph)x (ph*)y (p*q*)a – x (p*q)b – y.
We multiply this expression by f(p), and collect exponents, to obtain
f(p, a, b, x, y) µ px + y + a – 1 (p*)a + b – x – y + b – 1 ´ hx (h*)y (q*)a – x qb – y.
Finally, we notice that the last four factors in our expression for the joint density do not involve p. Thus they become constants when we condition on A, B, X, and Y, and we obtain
f(p | a, b, x, y) µ px + y + a – 1 (p*)a + b – x – y + b – 1.
Here we identify the kernel of a beta distribution, and conclude that
P | A, B, X ,Y ~ Beta(X + Y + a, A + B – X – Y + b).
as claimed in Section 8.