Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 1 c Solution Created 2026-10-03 Updated 2026-10-05
The negative binomial regression assumes independent random variables conditional on their recorded days, withThe logarithmic link function applies to the conditional expectation, not to the observed count. The displayed maximum-likelihood estimates areand the dispersion parameter for the fitted family is one. Thus the fitted variance is , practically the Poisson distribution variance at these means.
Increasing the day by one multiplies the conditional expectation by , a decrease of about . Comparing days 365 and 1 gives . The negative slope has Wald statistic approximately , so under the stated model assumptions there is very strong evidence of a decreasing conditional mean:This is an association with calendar day, not a causal effect established by the regression. The printed negative-binomial residual deviance is on residual degrees of freedom, which is a reason to investigate the adequacy of the assumed count model and dependence structure. In particular, the small reported slope standard error cannot make a misspecified model reliable.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 2 c Solution Created 2026-10-03 Updated 2026-10-05
Using the smaller logistic regression, approximate pointwise Wald confidence intervals are an estimate plus or minus times its standard error:Both intervals rely on the large-sample normal approximation and correct model assumptions. The negative slope indicates decreasing purchase probability as price rises. A one-unit price increase multiplies the odds by ; it does not subtract a fixed amount from the probability. There is no significant additional layout effect in the previous likelihood-ratio test, rather than a demonstration of no effect.
In the selected model layout B has the same prediction rule as the other layouts. At price 100 the linear predictor is . Applying the inverse logit link givesThe intercept refers to price zero; if that lies outside the observed price range, its direct substantive interpretation would require extrapolation.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 2 d Solution Created 2026-10-03 Updated 2026-10-05
The quasibinomial regression retains the logit link and mean function but uses the working variance function . Its quasi-score equation isso multiplying by the common dispersion parameter does not change the coefficient estimates. Iteratively reweighted least squares therefore gives the same fitted means and coefficients as the binomial model. The usual Pearson dispersion estimator isThe estimated coefficient covariance matrix is , with . From the intercept standard errors, ; the rounded slope errors give approximately the same factor. The display uses approximate Student's t-tests with 118 residual degrees of freedom instead of fixed-dispersion normal tests.
For a genuinely individual binary response, the Bernoulli distribution identity forces . Thus is a working quasi-likelihood specification, not a different independent binary distribution with that mean. The mild estimated underdispersion does not establish an improved model, and the mean predictions are unchanged. In particular, a scalar rescaling does not model correlation among users, and usual likelihood-based Akaike information criterion comparisons are unavailable for a family without a specified probability likelihood. The output gives no convincing reason to prefer model3 to model2.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 4 5J Solution Created 2026-09-24 Updated 2026-10-03
With Control as the reference group, the fitted normal linear model has meanThus the control-group rate is , while the treatment-group rate is . The estimates areandweight units per day. The control slope has and , so there is no statistically significant evidence of weight loss over time in the control group at conventional significance levels.
The plotted regression residuals for each mouse form smooth time patterns rather than an unstructured cloud: nearby observations on the same mouse have similar residuals, and the mice also show persistent individual offsets. This is strong evidence of autocorrelation and omitted mouse-level variation. The ordinary linear model treats all 400 measurements as independent after accounting for cage, so it commits pseudoreplication and will generally underestimate the coefficient standard errors. The reported -tests and -values should therefore not be trusted. A random-intercept linear mixed model with a within-mouse correlation structure would respect the repeated-measures design.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 13J iii Solution Created 2026-09-24 Updated 2026-09-29
Because
model2 uses a logarithmic transformation, the logarithm of the payment ratio is the difference of two predicted log payments. The cars have equal Brand and Bonus values and differ by one Kilometres level, so its fitted mean is the displayed mileage regression coefficient, .For two independent future payments, the prediction interval must include both the standard error of and two independent residual errors. The estimated variance of the predicted log ratio is thereforeUsing the residual degrees of freedom shown in the output, a 95% prediction interval for a ratio of log-normal responses isWith , this is approximately . The interval is wide because it predicts the ratio of two individual future payments; an interval for the ratio of their fitted mean responses would omit the term.
Past exam of the mathematics course of the University of Cambridge 2021 ii Paper 1 13J b ii Solution Created 2026-09-24 Updated 2026-09-25
Equal LD and SD efficacy is equivalent tobecause both efficacy definitions use the same control probability. In this two-outcome table that is also equivalent to equality of the LD and SD log-odds interactions,The summary gives the two estimates and their individual standard error, but a test of their difference needsThe required covariance is absent from the displayed table, so the two separate coefficient p-values cannot test equality.
Instead, fit the equal-efficacy Poisson log-linear model. For example, create one indicator for a Worse outcome in either treated group:The reduced model has one common treated-versus-control outcome interaction, while retaining separate LD and SD main effects for their different group totals. The full model has two such interactions. Their analysis of deviance for nested generalized linear models is therefore a one-degree-of-freedom likelihood-ratio test of equal efficacy.
r
data$treated_worse <- with(data, treatment != "Control" & outcome == "Worse")
fit_equal <- glm(count ~ treatment + outcome + treated_worse,
family = poisson, data = data)
anova(fit_equal, fit2, test = "LRT") Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 1 c Solution Created 2026-09-28 Updated 2026-10-03
With having rows and , the quasi-score equation isIt is the same coefficient equation as for Poisson maximum likelihood, explaining why the two models have identical coefficient estimates.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 4 13J iv Solution Created 2026-09-24 Updated 2026-09-25
Under , the slope in this through-origin linear regression is . Its observed Wald statistic isThe corresponding two-sided p-value is about , so the fit does not give evidence against at the significance level.
The usual least-squares standard error assumes constant conditional variance. Goal counts are counts, and under the natural Poisson distribution model their variance equals their mean , so observations with different expected goals are heteroscedastic. The reported homoscedastic standard error is therefore doubtful; a heteroscedasticity-robust calculation or a suitable count model would be more credible.
Residual standard error 2026-10-06
In a full-rank normal linear model with observations and mean coefficients, the residual standard error estimates the common error standard deviation. Its square is the unbiased estimator ; the square root itself is not generally unbiased. It measures unexplained response variation, whereas a regression coefficient's standard error measures uncertainty in that coefficient.
For independent effect estimates with standard error , and with standard error , one two-sided Wald test is significant at five percent and the other is not. But their difference is with standard error , giving a negligible test statistic. Hence different significance labels do not establish an interaction or between-study heterogeneity; compare the effects directly.
Small-study effect 2026-10-07
A small-study effect is a systematic relationship between study precision or size and estimated effect. It may result from selective publication, design differences, effect modification or other heterogeneity. A regression of effect on its standard error tests one such relationship; it does not by itself determine which mechanism generated it.