Gaussian regression toward the mean 2026-10-14
Take the original synthetic model and , mutually independent random variables, with the second argument denoting variance. The pair has a multivariate normal distribution with mean zero, unit marginal variances, and Pearson correlation coefficient . Its conditional multivariate normal distribution isFor a first reading , the second reading has conditional expectation and conditional variance , hence standard deviation . There is still conditional probability of , a movement farther from zero, where is the standard normal distribution function. The line describes a conditional mean, not an individual trajectory.
A short derivation isolates . Its covariance with is zero and its variance is . Because has a multivariate normal distribution, zero covariance implies independence: independently of . This also explains why reversing the two measurements gives . The statistical association does not identify a direction of causal effect.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 41 4 Solution Created 2026-10-03 Updated 2026-10-14
read.table(...,header=T) reads four grouped rows with column names. The displayed outcome counts give the observed risks in the indicated factor order. rbind in the first test pools over predisposition: the two rows represent no cannabis use and some use, with event/non-event counts and . Thus the pooled risks are and . This test concerns the marginal statistical association between use and outcome, not an association adjusted for predisposition.Under independence, expected counts in the two-by-two contingency table are . The ordinary Pearson chi-squared statistic is . The printed is reproduced by the default two-by-two Yates continuity correction:All absolute differences here exceed one half. Comparison with a chi-squared distribution on one statistical degree of freedom gives . There is strong evidence of marginal association. The simplified output omits the usual continuity-correction wording, but its numerical value shows which statistic was used.
attach makes the data columns available by name, and tot=with+without obtains group sizes . The grouped binomial regression fits , with response and prior weights . These weights tell R the binomial denominator; treating the four proportions as four equally precise individual observations would be wrong. The default logit link isLet indicate some use and indicate predisposition. The additive logistic regression specifies . Its log-likelihood, including the binomial constants, isDifferentiation gives score equations and Fisher information matrix , where . Fisher scoring solves these equations, and the inverse fitted Fisher information matrix gives the reported approximate coefficient variances. The number of scoring iterations records numerical convergence, not degrees of freedom or statistical evidence.The intercept corresponds to no use and no predisposition and gives baseline fitted risk . The additive coefficients imply common adjusted odds ratios:They multiply the odds, not the risks. The Wald tests divide the estimates by their standard errors and use a standard normal distribution; both predictors have small two-sided p-values. Approximate confidence intervals for these odds ratios are and , obtained by exponentiating the log-scale intervals. The intercept test against zero asks whether the reference risk equals one half, and is not a test of either exposure association. The binomial dispersion is assumed to be one because ; the output does not demonstrate independence or rule out extra-binomial variation.
There are four grouped probabilities and three fitted coefficients, leaving one residual degree of freedom. The fitted risks are approximately . The binomial deviance compares this fit with the four unrestricted observed proportions:The deviance goodness-of-fit test against has p-value . The common-odds-ratio fit is not rejected at , although the doubly exposed group's observed risk exceeds its fitted risk appreciably and suggests possible interaction.
The second formula adds . Its four coefficients fit all four probabilities, making a saturated statistical model with zero grouped residual degrees of freedom. The near-zero deviance is roundoff from exact interpolation; it supplies no remaining grouped lack-of-fit test. Unlike Q1's unreplicated Gaussian fit, however, these grouped responses represent many independent Bernoulli trials, and their binomial variances are specified by their sizes and probabilities. Coefficient standard errors remain available from binomial information without estimating dispersion from the zero residual degrees of freedom.
Indeed, let be the fitted cell logit link value. The saturated coefficients areThese calculations yield the printed estimates. The delta method gives , and independent groups make the variance of the sum of all eight reciprocal counts. Its square root is , reproducing the printed standard error.
The saturated logistic regression describes the conditional odds ratios as follows:Thus the main coefficients now concern effects at the other factor's reference level. Logistic interaction as a ratio of odds ratios gives , with approximate confidence interval . The interaction Wald test has , while the nested likelihood-ratio test uses deviance difference on one statistical degree of freedom and has . The data suggest a larger odds association in predisposed subjects, but do not establish this interaction at the conventional level. This conclusion is specific to the odds scale; absolute-risk differences can vary even with no logit-scale interaction.
The Akaike information criterion is . The additive fit has and AIC ; the interaction fit has and AIC . The extra coefficient improves twice the log-likelihood by but incurs penalty , so AIC falls by only . It weakly favors the larger fit rather than decisively establishing an interaction, and AIC is not a p-value.
The marginal odds ratio and the fitted conditional odds ratios are different quantities. Predisposition is associated with both use frequency and outcome, so confounding is a substantive possibility; noncollapsibility of the odds ratio also means marginal and conditional odds ratios need not agree. This is an observational association analysis with only one adjustment factor. It does not by itself establish a causal effect, exclude other confounding, or validate the assumed independent binomial sampling.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 4 c Solution Created 2026-10-03 Updated 2026-10-06
This is a sequential analysis of deviance for nested generalized linear models. Adding age to the intercept-only logistic regression reduces deviance by , with approximate p-value . Adding frailty to the age model reduces it by another , with p-value . Thus both variables have evidence of association with surgical success, under the model assumptions, and neither should be dropped solely on these results.
The second test assesses frailty adjusted for age, whereas the first assesses age before frailty is included. Sequential tests depend on term order. Evidence for age adjusted for frailty is additionally provided by its full-model Wald test, . Both fitted coefficients are negative: age and frailty are associated with lower fitted success probabilities. On the odds scale, one extra year at fixed frailty multiplies the odds by , and frailty at fixed age multiplies them by . These are odds ratios, not risk ratios, and an observational statistical association does not by itself establish a causal effect.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 207 2 a i Solution Created 2026-10-03 Updated 2026-10-05
A Type I error is rejecting a true null hypothesis. Here it means declaring a statistical association between the biomarker and bowel cancer when, in the population and under the association model being tested, there is no statistical association. It is a false positive association finding, not merely a large estimation error. A test with level limits this probability to under the null hypothesis, subject to valid calibration; the p-value is not the probability that the null hypothesis is true.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 3 e Solution Created 2026-10-03 Updated 2026-10-05
For the electronic-record observational study, three strengths are:
- The large dataset improves precision of the estimated statistical association and allows detection of associations too small for a modest study.
- Adjusting for age, sex, and ancestry addresses specified measured sources of confounding.
- Routinely collected hypercalcaemia and migraine diagnoses give evidence from clinical practice, rather than depending solely on recalled calcium intake.
Three weaknesses are:
- Residual confounding remains possible: for example, other diseases, medicines, or health behaviours may affect both serum calcium and migraine.
- Co-occurrence does not establish temporal order, leaving reverse causality possible. Migraine, its management, or the decision to investigate it may alter recorded serum calcium.
- Selection bias and diagnostic misclassification can arise because patients enter health records and receive testing nonrandomly. Moreover, hypercalcaemia is not a direct measure of dietary calcium intake, limiting the claimed intervention's interpretation.
For two-sample Mendelian randomization, three strengths are:
- Genetic variants are inherited before adult migraine develops, making ordinary disease-to-genotype reverse causality implausible.
- Under instrumental-variable independence, genetic assignment reduces the environmental confounding that undermines a conventional observational study.
- The large outcome sample and combined genetic risk score improve precision, while concordant weighted-median Mendelian randomization estimator and MR-Egger regression results offer checks under different assumptions about horizontal pleiotropy.
Three weaknesses are:
- Horizontal pleiotropy can violate the exclusion restriction, while population stratification or inherited family effects can violate instrumental-variable independence. In the supplied figure, one variant has a much larger serum calcium association than the others, motivating a check for dependence on that single variant.
- The score explains only 1.25% of serum calcium variance, so instrument strength must be assessed rather than assumed. Different populations in the two samples can also undermine transport of genetic associations. A small variance fraction is not itself proof of a weak instrument in a large sample.
- A lifelong genetically influenced shift in serum calcium is not equivalent to changing dietary calcium intake. The robustness methods also need assumptions: the weighted-median Mendelian randomization estimator needs more than half of the weight from valid instruments, and MR-Egger regression needs the InSIDE assumption. The nonsignificant MR-Egger regression intercept is compatible with zero average directional horizontal pleiotropy, but with eight variants it cannot prove all instruments valid.
Thus the agreement supports the hypothesis, but does not establish the effect of a dietary intervention.
Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 207 2 a Solution 2026-09-28
Education is a causal risk factor if an intervention that changes educational exposure changes the distribution of the corresponding potential outcome for myopia. An observed statistical association need not have that interpretation. Shared causes such as socioeconomic circumstances, parental behavior, genetic traits, or preference for indoor near work can confound education and myopia. Reverse causality is also possible: children with impaired distance vision may select more reading and indoor study, which can increase educational attainment without education causing the impairment.
