, ,

Let X be the number of patients out of the first 40 in a clinical trial who have success as their outcome. Let P be the probability that an individual patient is a success. The conditional pmf of X given P = p is the binomial distribution with n = 40, p=p.

As prior distribution for P, we use a uniform p.d.f. on the interval [0,1]. Uniform at [0,1] is a special case of a Beta distribution for α = 1, β = 1.

With a Beta (α, β) prior on P, and a conditional binomial distribution with parameters n, p for X, the posterior of P is again Beta with parameters α˜ = α+x, β˜ = n−x+β.

Therefore, the posterior probablity distribution of P is Beta with α=1+x, β=40-x+1. 

Now let us compute E(P|x) which is the best predictor of P when P has its posterior distribution. Since this distribution is Beta (α˜, β˜) with expectation E(P|x) = α˜/(α˜ +β˜), we obtain
E(P|x) = (α+x)/(α+x+n−x+β) = (1+x)/(1+ x + 40−x + 1)= (x+1)/42 

Note that this predictor is very close to the observed sample proportion of success from X: pˆ= x/40.