Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2005/ii/paper-2/5i/solution

Each scan() command reads a numeric vector from the entered data: the first creates the nine counts, and the second their nine predictor values. The last command fits a generalized linear model with the Poisson distribution and its default log link, including an intercept, then prints a summary. Thus the model is independent counts with means satisfying
The coefficients are maximum-likelihood estimates, and the reported standard errors come from the inverse fitted Fisher information matrix. Increasing the predictor by one multiplies the fitted mean by , about a increase. The intercept corresponds to a mean at predictor zero, outside the observed range. Approximate coefficient-to-standard-error ratios are and ; the slope is strongly different from zero under the assumed model. A Wald confidence interval for the slope is about , or for the multiplicative change.
The deviance is twice the log-likelihood advantage of the saturated model over the fitted model. For these counts it is
with the logarithmic term interpreted as zero when a count is zero. The saturated model has nine freely fitted means; the fitted model has two independent regression coefficients, so the residual degrees of freedom are .
Under an adequate Poisson model and the usual large-sample approximation, is compared with . The reported is rather large relative to seven, but below the upper critical value about ; its approximate upper-tail probability is . Thus there is some indication of lack of fit or overdispersion, but not a rejection at the level on this diagnostic. The deviance-to-d.f. ratio is about ; it does not by itself prove an overdispersed model, and the chi-square approximation is imperfect for small counts.
There is one inconsistency in the supplied numerical output. Independently solving the Poisson score equations for the displayed nine counts gives , and deviance , agreeing with the printed estimates and deviance. But gives standard errors approximately and . In particular the printed slope standard error is not the standard Poisson-model value for these data. The interpretations above describe the supplied numbers; the directly recomputed slope ratio is and its normal-approximation interval is about . The conclusion of a strong increasing trend is unchanged.

New to topics? Read the docs here!