Lecture 32 The Exponential Model: From Start to Finish
In this final lecture we work through one model, the exponential distribution with unknown rate, in the order in which a statistician would meet the questions: the model and the data, estimation, the quality of the estimate, intervals, tests and the Bayesian answer. Every step uses a result from an earlier lecture, and the aim of this lecture is to see how these results fit together.
32.1 The Model and the Data
Assume that the lifetime of a component of a machine is exponentially distributed with rate . Then the lifetimes of components are i.i.d. with density for . The mean lifetime is and the variance is (table A.2). In example 7.4 we have seen that this is a one-parameter exponential family with natural statistic and natural parameter . Thus, by lemma 7.5, the joint density of the sample is
for . Since this density depends on the data only through , we can use the factorisation theorem (proposition 8.3) to conclude that is sufficient for . Since the family has full rank in the sense of definition 7.8 (the natural parameter space is the open half-line), we can use proposition 10.6 to conclude that is also complete. Thus, from lectures 7 to 10 we know that all our results can be based on alone, and that every function of with finite variance is the best unbiased estimator for its expectation.
As data we have observed lifetimes (in years) of the components, and the sum of these values is , i.e. we have . The manufacturer claims that the mean lifetime is two years, i.e. , and we want to test whether the components of the machine last longer than the manufacturer claims.
32.2 Point Estimation
The log-likelihood is , with derivative and second derivative , and thus the likelihood equation has the unique root , which is the maximum. Thus is the MLE for (example 5.2). For our data we find . By the invariance of the MLE (proposition 5.6), the MLE for the mean lifetime is years.
The MLE for the rate is biased: exercise 2.3 shows , so that overestimates by a factor of . The corrected estimator is unbiased. Since is an unbiased function of the complete sufficient statistic , the Lehmann–Scheffé theorem (theorem 10.5) shows that this is the UMVUE for . For , the variance of the UMVUE can be found as (exercise 5.3). For the data considered here, we find .
Next we compare the variance of the estimator with the Cramér–Rao bound. From example 11.8 we know that the Fisher information of one observation is and thus we have . Since the conditions of section 11.1 hold, the Cramér–Rao inequality (theorem 13.2) gives the bound for the variance of any unbiased estimator satisfying (13.1). The variance of the UMVUE is , which is larger than the bound. By the discussion after corollary 13.6, no unbiased estimator can attain the bound, since the bound is only attained for an affine function of the natural statistic and no such function is unbiased for the rate. The efficiency of tends to as . The situation for the mean is different, since is unbiased with variance . This variance equals the bound for the mean (exercise 11.6) and thus is efficient.
32.3 Interval Estimation
Proposition 26.8 turns the standard error into the approximate confidence interval . For the data considered here, this confidence interval is , i.e. . The interval is symmetric about the estimate, and the probability of the interval covering the correct value is only approximately , since the interval is based on the normal limit at .
For the exponential distribution we can do better, because an exact pivot is available. In exercise 13.1 we have seen that for every value of , so is a pivot in the sense of lecture 26. Solving for gives the exact interval
with coverage exactly for every . With and we find the interval , as in exercise 26.1. The exact interval is shifted to the right relative to the Wald interval and is not symmetric about , because the sampling distribution of is skewed. The normal approximation ignores this skewness.
32.4 Testing
We now test the manufacturer’s claim. We take and start, as in lecture 23, with a simple alternative where (a longer mean lifetime). The likelihood ratio is
which is an increasing function of , since . By the Neyman–Pearson lemma (theorem 23.2), the most powerful test at level rejects if , where is chosen such that . Under the pivot gives , and thus . Here we have , so that under the statistic itself is distributed, and for we find . The critical region does not depend on and thus, by proposition 23.4 with the inequalities reversed, the same test is most powerful against all alternatives . Since the observed value is less than the critical value, we do not reject at the level: the data do not show that the components have a longer lifetime than claimed. The -value from definition 22.9 is , where we write also for a random variable with this distribution. This probability, like the other chi-squared probabilities in this lecture, is computed numerically, since table A.6 only lists a few quantiles.
The power function of definition 22.5 can be found by evaluating the same pivot at the alternative: . For example . If the true mean lifetime of the components is four years, then the test rejects with probability .
For the two-sided alternative there is no uniformly most powerful test, by the argument of proposition 23.5: the two one-sided tests reject on opposite tails of . We use the generalised likelihood-ratio test of definition 25.1 instead. The statistic is
and by Wilks’ theorem (theorem 25.3) it is approximately -distributed under , since one parameter is fixed. For our data, , well below , and thus again is not rejected. Exercise 32.1 verifies the formula for .
32.5 The Bayesian Answer
In the Bayesian model the rate is random with prior density . As a function of , the likelihood is , and a prior of the same shape, the density , is conjugate. This is a special case of proposition 28.4: the posterior density satisfies
and thus the posterior distribution is . The update increases by and by . For the natural parameter the Jacobian is , and thus the prior is the prior of proposition 28.4. In the example of the manufacturer’s claim about the lifetime of the components, we centre the prior at the claimed rate by choosing and , so that the prior mean is . The posterior distribution is then and, by lemma 28.7, the Bayes estimator for under squared error is given by
This is a weighted average of the prior mean and the MLE, where the weight of the data increases as increases. The prior is weak, in the sense that the prior mean only has weight .
The credible interval of definition 29.1 can again be found from chi-squared quantiles. If , then by proposition A.19 the scaled variable has the distribution, and for integer this is the distribution (appendix A). Thus the equal-tailed credible interval has the endpoints and . With the values and , which are not tabulated, this is the interval . For the manufacturer’s claim, the posterior probability of long lifetimes is , up from the prior probability . Unlike the -value, this is a probability about the parameter, given the data.
The Jeffreys prior from definition 28.8 is . This is the improper limit of the Gamma prior, and the posterior distribution is . Since under this posterior, the equal-tailed credible interval coincides with the exact confidence interval from section 32.3, and the posterior probability equals the -value of the one-sided test. The numbers agree but, as in section 29.3, the statements are different: the confidence interval and the -value are statements about the procedure under repeated sampling, whereas the credible interval and the posterior probability are statements about given the data.
32.6 Looking Back and Looking Forward
Every question about the exponential model was answered using a small number of tools, and the same tools can be used for most regular models, including models which are not considered in these notes. We write down the likelihood function and find a sufficient statistic. We solve the likelihood equation and check that the root is a maximum. The Fisher information then gives the standard error and the Cramér–Rao bound, a pivot or the normal limit gives an interval, the Neyman–Pearson lemma and Wilks’ theorem give tests, and Bayes’ theorem gives the posterior distribution. The exact pivot is available because of the special form of the exponential distribution. In general we only have the large-sample results from lectures 16, 17 and 25, and some care is needed when these results are used.
Later modules build on this material. The standard errors computed by regression packages are obtained from the inverse of the Fisher information matrix from lecture 14, the tests which compare two fitted models are the likelihood-ratio tests from lecture 25, mixture models and hidden Markov models are fitted using the EM algorithm from lecture 19, and Bayesian computation, from the simple conjugate updating to the simulation methods of later modules, is based on the posterior distribution from lecture 28. The models there will be much larger, but the questions will be similar to the ones we considered in this module.
-
•
For the exponential distribution with rate , the sum is complete and sufficient, the MLE is , the UMVUE is , and no unbiased estimator can achieve the Cramér–Rao bound , although is efficient for the mean.
-
•
The standard error can be used to compute the Wald interval. The pivot can be used to compute an exact interval, an exact one-sided test with known power function, and the -value.
-
•
A two-sided test can be based on and Wilks’ theorem.
-
•
For the prior, the posterior distribution is and the posterior mean is a weighted average of the prior mean and the MLE. For the Jeffreys prior , the credible interval and the posterior probability of agree numerically with the exact confidence interval and the -value, but have a different meaning.
-
•
The same short list of tools can be used to answer most questions about regular models.
Let be i.i.d. with exponential rate and let be the MLE.
-
1.
Show that the generalised likelihood-ratio statistic for against is given by , and that depends on the data only through , where .
-
2.
Show that is zero at and positive elsewhere, i.e. that with equality if and only if .
-
3.
For and , determine the value of for and for and state the conclusion of the test at level for both cases.
Let be i.i.d. exponential with rate and let .
-
1.
Show that the Jeffreys prior for is . Show that this prior is improper.
-
2.
Show that the posterior distribution under the Jeffreys prior is proper for every sample with . Identify the posterior distribution as a Gamma distribution.
-
3.
Using proposition 28.9 or otherwise, find the Jeffreys prior for the mean . Show that this prior is the image of under the map .
-
4.
Show that the equal-tailed credible interval for , under the Jeffreys prior, coincides with the exact confidence interval from section 32.3, but in one sentence explain why the two intervals make different statements.
Let with be i.i.d. uniform on , where is unknown, and let and . Without proof, we state that, given , the remaining observations are i.i.d. uniform on and .
-
(a)
Find the density of and show that .
-
(b)
Show that is an unbiased estimator for . Determine and show that is not a consistent estimator for .
-
(c)
Show that is sufficient for .
-
(d)
Determine and show that . Which theorem guarantees, without computation, that is a statistic, unbiased for and with a variance of at most that of ?
-
(e)
Explain why is the UMVUE for . The Cramér–Rao formula, for this model, gives the value , which is larger than the variance of . Explain why there is no contradiction.
Seed trays are bought from two suppliers. Each tray contains seeds, and each seed has probability of germinating if the tray comes from supplier A, and probability if the tray comes from supplier B, independently of the other seeds. Both probabilities are known. The proportion of trays which come from supplier A is unknown (here is the mixture weight, as in lecture 19), and the supplier of an individual tray is not recorded. For tray , the number of germinated seeds is observed, and we write if the tray came from supplier A and otherwise. Let and be the probability weights of the and distributions.
-
(a)
Write down the probability weights of the number of germinated seeds and the observed-data log-likelihood for trays. Explain why the likelihood equation cannot be solved analytically and write down the complete-data log-likelihood .
-
(b)
Derive the E step of the EM algorithm, showing that can be found from by replacing the indicator by the responsibility
-
(c)
Derive the M step, , and show that this is a maximum of .
-
(d)
For five trays, the number of germinated seeds was , , , and . The probability weights of the two distributions are given by
Given , perform one iteration of the EM algorithm and comment on your responsibilities.
-
(e)
Assume now that is unknown, and is still known. Derive the M step for . State the ascent property of the EM algorithm, and explain what the property does and does not guarantee for the sequence .