Autocorrelation Created 2026-09-28 Updated 2026-10-14
The autocorrelation function of a real weakly stationary process with positive variance is its normalized autocovariance:It is dimensionless, with , , and by the Cauchy-Schwarz inequality. It is unchanged by replacing with for fixed . This makes autocorrelation useful when comparing records measured on different scales. The ACF is a property of the model; the sample autocorrelation function estimates it and will generally not reproduce theoretical zeros exactly.
An AR(1) with coefficient has autocorrelations at lags one through three. With these become : the same diminishing magnitude, alternating in sign. An MA(1) with instead has lag-one autocorrelation and zero at every higher lag. Equal numerical coefficients in an autoregressive model and a moving-average model do not mean equal dependence. See Bartlett, lecture 3: theoretical ACFs and prediction.
Theoretical autocorrelation: AR(1) with coefficients 0.7 and -0.7, compared with MA(1) with coefficient 0.7
. Details. The bars show exact model autocorrelations, not estimates from the illustrated sample paths in time series. The AR(1) retains a diminishing trace of a disturbance at arbitrarily large lags; the MA(1) stops sharing driving noise after lag one. A zero autocorrelation means uncorrelated random variables, and does not generally imply independent random variables. For a Gaussian process it does imply independence of the two coordinates.
There is a direct prediction interpretation. Among affine predictions based on just , the best linear predictor of is , with mean squared prediction error . Thus negative autocorrelation is also useful predictive information. A prediction using the whole observed past can do better; best linear prediction from a finite past describes that problem. Interpreting the affine prediction as a conditional expectation requires additional assumptions, such as a joint normal distribution.
Autologistic binary-image model 2026-10-07
On a graph, a binary configuration has probability proportional to , with each edge counted once. The full conditional probability of a one is logistic with linear predictor . Local neighbor sums eliminate the need to evaluate the normalizing constant.
Best linear prediction from a finite past Created 2026-10-07 Updated 2026-10-14
The best mean-square linear predictor is orthogonal projection onto the span of the available centered observations, plus the known mean. Orthogonal innovations give a convenient basis of that span. Prediction at a future horizon must use only actually observed variables; it need not be a one-step predictor.
Covariate 2026-10-05
A covariate is an observed explanatory variable used to model the conditional distribution of a response. A vector of covariates can enter a linear predictor, a treatment-effect adjustment or a hazard multiplier. Conditioning on a covariate does not itself establish that its effect is causal.
Generalized additive model Created 2026-10-05 Updated 2026-10-14
A generalized additive model has linear predictor . Centering the smooth functions identifies the intercept. The response family and link function remain part of the model; an unspecified software family must not be inferred from the response name.
Generalized linear model offset 2026-10-14
An offset is a known term in a generalized linear model's linear predictor, with coefficient fixed to one. With a log link and exposure , choosing gives a mean count . Its role differs from that of a fitted explanatory-variable coefficient.
Identity link Created 2026-10-14 Updated 2026-10-20
The identity link function equates the response mean with the linear predictor. In a generalized linear model it gives . It is the canonical link function for the normal distribution. For response families whose means must remain positive or between zero and one, using the identity link requires corresponding restrictions on the linear predictor.
For binary predictors , a logistic regression with linear predictor has conditional odds ratios at and at . Their ratio is . The same interaction can be computed from the four cell logit link values as . Independent positive event and nonevent counts in each cell give an estimated variance for this contrast equal to the sum of all eight reciprocal counts. An interaction on the odds ratio scale is not an interaction on the absolute-risk scale.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 38 3 b Solution Created 2026-10-03 Updated 2026-10-14
The first fit is a Bernoulli logistic-regression model for the probability of a positive response. Its fitted linear predictor isand its fitted probability is . There are eight coefficients. The null degrees of freedom identify , and the residual degrees of freedom are .
Each slope is a change in the log odds per unit of its covariate, holding the others fixed. Exponentiating gives conditional odds ratios; for example a ten-unit glucose increase multiplies fitted odds by , and a ten-year age increase by . These are changes in odds, not multiplicative changes in probability, and the observational associations are not automatically causal effects. The intercept corresponds to all numerical covariates being zero, generally an extrapolation beyond meaningful subjects.
The standard errors come from the inverse Fisher information matrix of the logistic regression. With binomial dispersion parameter fixed at one, the displayed t ratios are asymptotic normal Wald statistics. In the full fit, glucose and the pedigree measure have clear individual evidence of nonzero slopes, with two-sided and . The body-mass and age terms are borderline, with and ; pregnancy count is weaker, . Blood pressure and skinfold have little individual evidence after adjustment. These labels should not be converted into a claim that the weaker predictors have no effect, or used as automatic model-selection rules.
A deviance residual here isIts square is the observation's contribution to binomial deviance, so the squared residuals sum to the printed residual deviance. The five-number summaries describe the distribution of these signed residuals. The null deviance belongs to an intercept-only logistic regression; the full fitted deviance is . Four Fisher scoring iterations record convergence of the numerical likelihood fit.
The second model uses only glucose:Its two coefficients leave residual degrees of freedom. A ten-unit glucose increase multiplies its fitted odds by . This differs from the adjusted multiplier , because the models condition on different covariates; both adjustment and noncollapsibility of the odds ratio can change logistic coefficients. The glucose-only model has deviance , so its maximized log-likelihood is lower than the full model's.
For these fixed-dimensional nested models, analysis of deviance and Wilks theorem giveThus the additional six predictors collectively improve the glucose-only model, even though several individual Wald tests are not significant. These comparisons assume independent subjects, an appropriate logistic mean structure, full rank, and regular finite parameter estimates without separation.
It would be incorrect to infer that absolute fit is good merely because . Individual Bernoulli deviance need not have a chi-squared calibration: there is just one binary observation per saturated probability, and the saturated dimension increases with sample size. A simple counterexample is an intercept-only model with true probability , for which , not one. For absolute adequacy, inspect residual patterns and predicted-risk calibration, use meaningful grouped comparisons when appropriate, or calibrate a chosen fit statistic by parametric bootstrap. The regular nested-model tests above are not subject to that saturated-model dimensionality problem. Only the displayed summaries and a few example rows are supplied, so patient-level diagnostics or complete numerical refitting cannot be reconstructed from this page alone.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 43 6 Solution Created 2026-10-03 Updated 2026-10-14
For the usual causal, stable autoregressive moving-average model with zero-mean white noise, sufficient conditions for a stationary invertible representation areThe roots of and then lie outside the closed unit disc. For a minimal representation these are the usual causality and invertibility root criteria for an ARMA model. A genuinely minimal ARMA(1,1) additionally has nonzero coefficients and no cancellation ; if a coefficient vanishes the order is lower. Common factors can reduce the process to white noise, so inequalities on an unreduced representation should not be asserted as necessary for every reduced process. A noncausal stationary solution of an unstable autoregressive equation is a different representation, and does not give the requested innovation-based Wold coefficients below.
Using the backshift operator , write . The absolutely summable geometric series givesThus the Wold representation isIts coefficients are square-summable, so the series converges in mean square and defines a weakly stationary process. Invertibility makes the closed spans of past observations and past innovations equal. Since the current driving white noise is orthogonal to all past innovations, it is orthogonal to all past observations and is the linear innovation of this causal invertible process.
The spectral density of an ARMA process follows from the squared frequency response of the linear filter of a stationary time series:This displayed density uses the usual two-sided convention. For the one-sided spectral density used in Question 5, multiply it by two and restrict to .
Let and for . Orthogonality of the driving white noise gives for . HenceFor , separate the term and sum the remaining geometric series:Negative lags satisfy . With , interpret the lag-one factor as one and later powers as zero, recovering the MA(1) covariance.
To express prediction entirely through observations, invert the moving-average factor:The best linear predictor from the whole past is thereforeIndeed is orthogonal to the closed linear span of the past. For any other past-measurable linear predictor , the mean squared error decomposes as , establishing optimality and error variance . The result only uses second-order properties; identifying this linear predictor with a full conditional expectation requires stronger assumptions such as independent innovations or joint Gaussianity. In the cancellation case within the stable range, , the off-zero covariances and predictor vanish, and the spectrum is constant.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 41 3 Solution Created 2026-10-03 Updated 2026-10-14
The Poisson distribution mass function isIt is an exponential dispersion family of order one withIndeed, and . A generalized linear model specifies independent random variables from a response exponential family, together with a linear predictor and a link function relating it to the response mean. The Poisson canonical link is .
For the insurance counts, let class and merit be the reference levels in a regression factor. The fitted Poisson regression assumesThe insured exposure is known; its logarithm is an offset, not a coefficient to estimate. The model has eight free mean parameters and fixes the dispersion parameter at one. It assumes additive class and merit effects on the log-rate scale, hence multiplicative effects on the rate scale without a class-by-merit interaction.
Apart from constants independent of the parameters, the log-likelihood isDifferentiating gives the Poisson regression margin-matching score equationsThus the fitted totals equal the observed totals in each class and merit category, including the reference categories by subtraction. In design matrix notation these equations are . Fisher scoring solves them iteratively; the reported three iterations describe the numerical fit, not an additional statistical result.
The regression intercept gives the baseline fitted claim rate per insured car year. The merit rate ratios, relative to merit at the same class, areThe class rate ratios, relative to class at the same merit, areEach predicted cell rate is the baseline rate times its class and merit multipliers. The output's coefficient-to-standard error ratios are asymptotic normal Wald test statistics under the fitted Poisson regression, despite the software label “t value”; there is no estimated Gaussian residual scale in this model. All nonreference effects have very large absolute ratios.
The null Poisson deviance is on nineteen statistical degrees of freedom; adding the seven factor coefficients reduces it by . But the final Poisson deviance is still on twelve statistical degrees of freedom, and the deviance residuals include values near and . These are far beyond what a well-fitting unit-dispersion model would normally produce. The additive Poisson model fits substantially better than a common rate, but remains grossly inadequate. A class-by-merit interaction, overdispersion, or statistical dependence between claims could contribute; the summary alone does not distinguish these explanations. Its very small nominal standard errors and formal Wald tests rely on the rejected model, so improved mean structure and error assumptions are needed before treating them as reliable uncertainty assessments.
Past exam of the mathematics course of the University of Cambridge 2006 ii Paper 3 5I Solution Created 2026-09-24 Updated 2026-10-14
In a generalized linear model, the linear predictor is , a linear combination of the covariates with unknown coefficients. The link function relates this predictor to the mean: . The canonical link function chooses the natural parameter of the exponential family, namely . Differentiating the normalization of the density shows that , so the canonical link function is on the admissible parameter interval.
For a Bernoulli distribution, the probability mass function can be written asThus and . The canonical link is the logit:
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 43 2 Solution Created 2026-10-03 Updated 2026-10-14
For an exponential dispersion family, differentiating the normalization integral with respect to gives an expected score of zero. The score is , hence . Differentiating again, the expected squared score is ; it is also . ThusThe canonical link function sets the linear predictor equal to the natural parameter: . The variance function is , so ; the dispersion parameter is separated from the mean-dependent factor.
The saturated statistical model has a separate mean for each response and fits , with boundary parameters interpreted by limits. At the same fixed dispersion, its log likelihood and the fitted model's log-likelihood define the scaled devianceThe unscaled deviance isKeeping dispersion fixed in this definition is essential; it is not a comparison with a separately estimated zero variance in a Gaussian saturated fit.
For the normal distribution, expanding its density exponent givesConsequentlyHere and the canonical link is the identity, so . The saturated natural parameter is . Substitution into the deviance formula yields
For the cholesterol fits, all formulae include an intercept. Model 1 has age and BMI with three coefficients; models 2 and 3 have one of these covariates with two coefficients; model 4 has only the intercept. Their residual statistical degrees of freedom are respectively . Their reported deviances are residual sums of squares, because these are Gaussian linear models.
The relevant hypothesis is in the full model, against , with age already present. Thus compare model 2 with model 1 using the partial F-test. Its extra sum of squares is , and the common variance is estimated from model 1 by . ThereforeSince , reject at ; the two-sided coefficient-test equivalent has . BMI is associated with cholesterol after adjustment for age, under the linear Gaussian model. The RSS values alone do not identify the sign of its coefficient or the size of the association.
For comparison, the marginal BMI test would compare model 4 with model 3, giving on statistical degrees of freedom, with . This does not answer the adjusted question and makes the BMI evidence appear stronger than the conditional test. Age also contributes after BMI: comparing model 3 with model 1 gives on statistical degrees of freedom, with . Thus retaining both predictors is supported at the stated level.
A raw deviance difference must not simply be compared with the supplied cutoff: Gaussian dispersion is unknown and the differences here are unscaled. If were known, the scaled difference would have a law. Estimating it from the full fit gives the exact finite-sample comparison above, with the appropriate denominator statistical degrees of freedom.
Past exam of the mathematics course of the University of Cambridge 2007 ii Paper 1 13I Solution Created 2026-09-24 Updated 2026-10-14
The first command fits independent Poisson random variables with means and a log link. For concentration and strain indicator , its fitted linear predictor isThe interaction allows different concentration slopes in the two strains. At the second strain's mean is multiplied by ; its slope is . These are multiplicative changes in counts, not changes in probabilities.
The maximum-likelihood estimates use the Poisson regression likelihood. With design matrix , estimated information gives the inverse covariance matrix; diagonal square roots give the standard errors. The printed Wald tests use approximately standard-normal coefficient-to-error ratios. Fuel and strain effects are strong, whereas the interaction has , suggesting a common slope.
removes just the interaction; also removes strain. Their parameter counts are four, three and two. Under the usual large-sample likelihood-ratio test, is compared with and is below , so the interaction is not required at 5%. By contrast, is far above that threshold, so the strain main effect should remain. Comparing directly with uses and two degrees of freedom.
For an approximate absolute goodness-of-fit test, compare with ; its upper-tail probability is about . For , on degrees of freedom has . The additive model is the preferred parsimonious fit at 5%, subject to the independent Poisson distribution and large-sample assumptions. The printed nine rows are only a subset; the supplied fitted output refers to all 70 observations.
Past exam of the mathematics course of the University of Cambridge 2007 ii Paper 1 5I Solution Created 2026-09-24 Updated 2026-10-14
The command fits independent grouped binomial distributions , using the supplied totals as trial counts. The logistic regression has the additive linear predictorThe reference category is adult females. The age and gender coefficients are conditional log odds ratios: the fitted odds for a child are multiplied by , and those for a male by .
The coefficients are maximum-likelihood estimates, found by Newton's method or iteratively reweighted least squares. With design matrix and , the estimated covariance matrix is ; the printed standard errors are square roots of its diagonal entries. Each Wald test compares a coefficient with zero using its estimate divided by its standard error, approximately a standard normal distribution under the null. The age and gender effects are strongly significant. The intercept test instead tests whether the reference probability is .
The fitted probabilities are about for adult females, for adult males, for female children, and for male children. Adult females have the largest fitted probability, about 4.48%. The residual deviance is on degree of freedom; comparison with a chi-squared distribution gives . There is no evidence here that an age–gender interaction is needed, under the assumed independent binomial distribution model.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 42 5 Solution Created 2026-10-03 Updated 2026-10-14
An exponential dispersion family of order one has density or mass function, relative to a fixed dominating measure, of the formwhere is a scalar natural parameter, is the dispersion parameter, and the support does not depend on . For regular families, is twice differentiable on an open natural-parameter domain and . Known observation weights replace by . “Order one” refers to the scalar canonical statistic , rather than an arbitrary vector of canonical statistics.
Differentiate the normalization , or its discrete counterpart, assuming differentiation under the integral is valid. The first derivative gives . The second derivative givesConsequently,The variance function expresses the second derivative in terms of the mean:
A generalized linear model specifies independent responses from an exponential dispersion family, a linear predictor , and a differentiable monotone link function relating it to the response mean by . The family, variance function, covariate design, link function and dispersion specification together define the model. The canonical link function identifies the linear predictor with the natural parameter:One advantage is that the likelihood equations become particularly simple. With known weights and common dispersion , the score function and negative Hessian matrix for areThe latter does not explicitly depend on the responses, so it equals the expected Fisher information matrix at the same parameter. With full-rank design and positive variances the likelihood is strictly concave in , simplifying optimization. These statements concern the coefficient block at a fixed dispersion value.
For a normal distribution with mean and variance ,Thus , , , and . Its canonical link function is , the identity link.
For a Poisson distribution with mean and support ,Here , , , and . Therefore , , and the Poisson canonical link is .
For a Bernoulli distribution with success probability ,Taking , , , and gives the required form. Its mean and variance function are and . Its canonical link function is , the logit link. The fixed dispersion values in the Poisson and Bernoulli cases are part of those models; an arbitrary continuous dispersion is not being asserted for them.
To test , first fit the unrestricted model and then the restricted model with that component fixed at zero, estimating all nuisance parameters, including dispersion when applicable, in each fit. If and denote their full fitted parameter vectors, the likelihood-ratio test usesFor identifiable regular models, an interior null parameter and a fixed-dimensional full-rank design with increasing information, the Wilks theorem gives under . A level- test rejects for greater than the -quantile of the chi-squared distribution with one degree of freedom.
Alternatively the Wald test uses , with the variance obtained from the appropriate inverse full Fisher information matrix; it has the same limiting null law. The score test fits only the restricted model. If collects its nuisance parameters, its efficient information is , and the statistic is , again asymptotically . Accounting for the nuisance block is necessary rather than using the unadjusted diagonal information.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 36 3 c Solution Created 2026-10-03 Updated 2026-10-14
Centre and scale both predictors, particularly the raw dose whose scale is much larger than that of . For example use , and the linear predictor . This reduces the intercept-slope correlations and numerical scale disparities; further orthogonalizing correlated columns or updating coefficients jointly can improve Markov chain Monte Carlo mixing. The exact old prior can be retained through the corresponding coefficient transformation; assigning new independent priors to transformed coefficients would instead change the prior.
For weakly informed plate effects or small , use the non-centred Gaussian random-effect parameterisation with . This often reduces dependence between the scale and local effects; it is not guaranteed to outperform the centred version when plate effects are strongly informed. Sensibly calibrated proper priors also avoid the enormous initial log intensities permitted by the stated coefficient ranges. Use dispersed chains and Markov chain Monte Carlo convergence diagnostics to assess stationarity, agreement between chains and effective sample size of a Markov chain. Reparameterization can improve mixing; simply retaining more iterations does not remove poor mixing.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 36 3 e Solution Created 2026-10-03 Updated 2026-10-14
Delete the plate random effects from the linear predictor and remove their stochastic nodes and the unused scale/precision nodes. The observation layer then remains a Poisson distribution withFor example the essential WinBUGS observation block can be written asRetain the coefficient priors. This is the sampling model implemented directly; attempting to keep
for (i in 1:doses) {
for (j in 1:plates) {
y[i,j] ~ dpois(mu[i,j])
log(mu[i,j]) <- alpha + beta*log(x[i]+10) + gamma*x[i]
}
}1/(tau*tau) while fixing tau to zero would divide by zero. Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 38 3 Solution Created 2026-10-03 Updated 2026-10-14
Let be the disease count among miners in exposure group , with representative exposure , for . The grouped-binomial logistic regression isThe model assumes independent miners, a common disease probability within each group at its representative exposure, and binomial variation without an extra dispersion parameter. The use of average exposure is a grouping approximation, not a claim that every miner in a group has identical exposure. The input response is and
weights=miners supplies the binomial denominators , not inverse variances; together they yield this count likelihood function. The default binomial link is the logit link.For , the likelihood-ratio test compares the intercept-only model with the linear-exposure model. The reduction in binomial deviance isUnder the usual regular large-sample approximation it has a chi-squared distribution with one degree of freedom. There is very strong evidence of exposure dependence, with a positive estimated coefficient .
For goodness of fit against separate probabilities in all eight groups, the residual binomial deviance has approximately degrees of freedom. Its upper-tail probability is about , giving no evidence of lack of fit. This is an approximate check, particularly because the earliest exposure groups have small expected disease counts. It supports adequacy of this mean structure, not proof that all its assumptions or possible confounding variables have been addressed.
The
predict call asks for a prediction at exposure , sets type="response" to return the fitted probability rather than its log odds, and requests the standard error of that fitted probability. It givesFor , the linear predictor is , and the delta method givesThe intercept-slope covariance is included in this expression. This measures uncertainty in the fitted mean probability; it is not the standard deviation of a new individual's binary disease outcome or of an unspecified new sample proportion.The model's odds at exposure are . Hence , independently of . By invariance of maximum likelihood estimation, estimate this odds ratio by . A Wald confidence interval for is ; exponentiating its endpoints after multiplication by gives the interval for the multiplier. Using the printed coefficient and standard error yieldsThus the estimated odds rise by about per year, or by a factor about per decade. These are changes in odds, not fixed multiplicative changes in probabilities.
The second fit keeps the same independent binomial distributions but permits a quadratic linear predictor,In the sequential analysis, each exposure term adds one coefficient. With the first model's deviances, all nine missing entries are recovered in this completed table:The final reduction is , with rounding to the precision of the printed output. Testing therefore gives on one degree of freedom. At the significance level I would retain the simpler linear-exposure model: it already fits adequately and the extra curvature is not clearly established. The quadratic fit does improve the likelihood somewhat; its Akaike information criterion is about smaller, since . Thus different reasonable selection criteria may weakly prefer different models, but these data do not give strong evidence that the additional term is necessary.
Past exam of the mathematics course of the University of Cambridge 2011 ii Paper 3 5J Solution Created 2026-09-24 Updated 2026-10-14
A generalized linear model has independent responses whose distributions belong to an exponential family:Here the expected value and variance are and . A specified one-to-one link function connects the mean to the linear predictor: . The canonical link function is .
In binomial regression, independently, with known trial counts and probabilities related to the predictor. The logistic regression and probit regression specifications are respectivelyHere is the standard normal distribution function. The binomial log-density contains , so its natural parameter is the log-odds: the logistic link is canonical. If the response mean is written as , the canonical link is .
