Virtual Laboratories > Interval Estimation > 1 2 3 4 5 [6]
As usual, our starting point is a random experiment with a sample space and a probability measure P. In the basic statistical model, we have an observable random variable X taking values in a set S. In general, X can have quite a complicated structure. For example, if the experiment is to sample n objects from a population and record various measurements of interest, then
X = (X1, X2, ..., Xn)
where Xi is the vector of measurements for the i'th object. The most important special case occurs when X1, X2, ..., Xn, are independent and identically distributed. In this case, we have a random sample of size n from the common distribution.
Suppose also that the distribution of X depends on a parameter a taking values in a parameter space A. Usually, a is a vector of real parameters, so that and A is a subset of Rk for some k and
a = (a1, a2, ..., ak).
Recall that in Bayesian analysis, the unknown parameter a is treated as a random variable. Specifically, suppose that the conditional density of the data vector X given a is denoted f(x | a). Moreover, the parameter a is given a prior distribution with density h. (The prior distribution is chosen to reflect our knowledge, if any of the parameter). The joint density of the data vector and the parameter is
f(x | a) h(a), for x in S and a in A.
Next, the (unconditional density) of X is the function g(x) obtained by integrating (in the continuous case) or summing (in the discrete case) the joint density over a in A. Finally, the posterior density of a given x is (by Bayes' theorem)
h(a | x) = f(x | a)h(a) / g(x) for x in S and a in A.
Now let A(X) be a confidence set (that is, a subset of the parameter space that depends on the data variable X, but no unknown parameters). One possible definition of a 1 - r level Bayesian confidence set requires that
P[a A(X)
|
X = x]
= 1 - r.
In this definition, only a is random and thus the probability above is computed using the posterior density h(a | x). Another possible definition requires that
P[a A(X)]
= 1 - r.
In this definition, X and a are both random, and so the probability above would be computed using the joint density f(x | a)h(a). Whatever the philosophical arguments may be, the first definition is certainly the easier one from a computational viewpoint, and hence is the one most commonly used.
Let us compare the classical and Bayesian approaches. In the classical approach, the parameter is deterministic, but unknown. Before the data are collected, the confidence set (which is random) will contain the parameter with probability 1 - r. After the data are collected, the computed confidence set either contains the parameter or does not, and we will usually never know which. By contrast in a Bayesian confidence set, the random parameter a falls in the computed, deterministic confidence set with probability 1 - r.
Suppose (I1, I2, ..., In) is a random sample from the Bernoulli distribution with parameter p. Moreover, suppose that p has a prior beta distribution with parameters a > 0, b > 0. Let X = I1 + I2 + ··· + In.
1.
Show that given X = x, a 1 - r level Bayesian confidence
interval for p is [L(x), U(x)] where L(x)
is the quantile of order r / 2 and U(x) is the quantile of
order 1 - r / 2 for the beta distribution with parameters a + x,
b+ (n - x).
2.
Specifically, suppose that we have a coin with an unknown probability p of heads
and that we give p the uniform prior. We then toss the coin 10 times,
observing 7
heads. Compute the 90% Bayesian confidence interval for p.
Suppose that (X1, X2, ..., Xn) is a random sample of size n from the Poisson distribution with parameter µ. Moreover, suppose that µ has a prior gamma distribution with shape parameter k and scale parameter b. Let Y = X1 + X2 + ··· + Xn.
3.
Show that given Y = y, a 1 - r level Bayesian confidence
interval for µ is [L(y), U(y)] where L(y) is
the quantile of order r / 2 and U(y) is the quantile of order 1
- r / 2 for the gamma distribution with shape parameter k + y
and scale parameter b / (nb + 1).
4.
Specifically, suppose that the number of defects in a manufactured item has the Poisson
distribution with parameter µ and we give µ the exponential distribution with parameter
1. We sample 5 items and observe a total of 8 defects. Compute the 90% Bayesian confidence
interval.