Continuation-ratio logits 2026-10-14
For ordered response categories, model each displayed conditional probability by a grouped-binomial logistic regression. The multinomial likelihood factors exactly into successive conditional binomial likelihoods, using the remaining category total as each stage's denominator. This is a different regression parameterization from baseline-category logits or cumulative odds. Separate cumulative binary indicators from the same person are dependent and cannot be treated as independent likelihood contributions.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 28 1 Solution Created 2026-10-03 Updated 2026-10-14
For a group with sample size , let be its overweight count. The natural sampling model is a binomial distribution, , with observed proportion . A grouped-binomial logistic regression specifiesFitting event/nonevent counts, or fitting the proportions with weights , gives the same binomial likelihood. The weights represent trial counts; unweighted regression of the proportions would give small and large groups the same influence. If printed percentages are rounded, exact original event counts are preferable to manufacturing fractional counts from .
Year should ordinarily be a factor with three levels unless a linear trend over time is specifically intended. Country, sex and age group are also possible factors. The actual subset, reference levels and formula are absent from this PDF. For a year-by-age interaction term, writeWith treatment contrasts, is the baseline logit, and are effects at the reference level of the interacting factor, and is an additional difference of log-odds differences. Exponentiating a main-effect contrast gives an odds ratio; exponentiating an interaction contrast gives a ratio of odds ratios. It is incorrect to interpret a main effect as a constant effect across the other factor when the interaction term is present.
A coefficient table should be read as estimate, standard error, a Wald estimate/error ratio and its reference-distribution probability. A whole multi-level interaction term is better tested by a nested likelihood-ratio test, using the decrease in deviance and the number of added independent coefficients. Null and residual deviances, residual degrees of freedom, convergence and fitted probabilities should all be checked. Large residual dispersion suggests lack of fit or dependence within sampled schools; a quasibinomial regression or an appropriate clustered analysis may then be preferable. Residual deviance is not automatically a valid chi-squared goodness-of-fit statistic for sparse groups or after estimating a free dispersion.
An interaction plot should display the group means or fitted probabilities against year, with separate lines for the interacting factor, and should also inspect the link scale. Nonparallel probability curves alone do not establish a logit interaction: even an additive logit model transforms nonlinearly to probabilities. As an independent descriptive illustration, the original study's Table 2 reports English boys' age-specific percentages. The following original plot shows their widening age differences after 1984 on both scales. It uses published descriptive values, not a reconstruction of the absent examination fit. The data are from pmc.ncbi.nlm.nih.gov/articles/PMC26603/ .
Published English boys' overweight prevalence by age and year, shown on probability and logit scales
. Details. For example, on the probability scale the 1984–1994 increase for the oldest group exceeds that for the youngest by percentage points using the rounded table values. On the logit scale the corresponding difference of differences isThis describes the interaction pattern, but its sampling uncertainty requires the group counts. The absent output prevents identifying the exam fit's coefficient estimates and significance tests.
There are two different uses of Poisson regression. A rare-event approximation models withThe fixed offset accounts for exposure, and exponentiated slopes are risk ratios, not odds ratios. The approximation is most appropriate when probabilities are small; it is not exact for appreciable prevalence because binomial variance is rather than .
An exact alternative stacks event and nonevent counts in each group and fits a log-linear model with a separate group intercept and event-by-predictor effects:Conditioning on their total gives the binomial event probability , whose logit is exactly . Profiling the group intercepts enforces the observed totals and reproduces the grouped-binomial logistic regression. This Poisson surrogate for a conditional multinomial model is exact and should not be confused with the rare-event approximation.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 28 5 iv Solution Created 2026-10-03 Updated 2026-10-14
A direct grouped-binomial logistic regression can dichotomize satisfaction, for example high versus low-or-medium. In each covariate stratum use the high count as successes and the sum of the other counts as failures, with total . This models and is appropriate if that binary contrast is substantively intended, but discards distinctions among the merged categories. Another cutpoint gives a different binary question.
There is also an exact sequential binomial factorization preserving all three categories. With their probabilities in one stratum,Multiplying these two conditional binomial likelihoods gives the multinomial likelihood: the combinatorial coefficients multiply to , and the probability factors reduce to . Continuation-ratio logits can therefore fit two logistic regressions, using the remaining stratum total as the second denominator. These are conditional stage models, not two independent counts with the same fixed denominator. Their regression restrictions need not equal those of the additive baseline-category model.
Finally, an ordinal analysis may fit cumulative binary contrasts and examine whether their slopes can be shared in a proportional-odds model. The binary indicators at different cutpoints from the same person are dependent. Do not stack them as independent binomial observations and multiply their marginal likelihoods; fit the joint ordinal likelihood or use a method with the appropriate dependence correction. This distinction separates a convenient descriptive collection of binary fits from a coherent multinomial or ordinal model.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 36 2 i Solution Created 2026-10-03 Updated 2026-10-14
For logistic regression, set and . Its Bernoulli log-likelihood, score function and Fisher information arewhere . Solve by Fisher scoring or iteratively reweighted least squares. One scoring step isEquivalently regress the working response on using weights . Iterate until the likelihood and coefficients stabilize, with rank and convergence checks. Separation in logistic regression can prevent a finite maximum: if a predictor direction strictly separates the zeros and ones, moving indefinitely along it improves the likelihood rather than producing a finite root.
Under the unrestricted model, each individual probability is estimated independently as . Every observed binary outcome then has probability one, so, using boundary limits,The resulting residual deviance is . It is a legitimate likelihood contrast and can be used to compare fitted models. However, individual Bernoulli deviance need not have a chi-squared calibration: the saturated model has one boundary-valued parameter for each single observation, and its dimension grows with . The fixed-dimensional regularity behind Wilks theorem does not justify a reference here.
For a concrete demonstration, let the true model contain only an intercept and have success probability . Its fitted probability is , andwhereas a variable divided by converges to one. Thus treating the raw Bernoulli residual deviance as an ordinary absolute goodness-of-fit statistic can reject a correct model systematically. In contrast, deviance differences between fixed-dimensional nested logistic models have their usual asymptotic chi-squared reference under the relevant regularity assumptions. For absolute fit use meaningful replicated covariate groups and grouped-binomial logistic regression, or assess residual patterns and prediction on held-out data; a model-specific parametric bootstrap can calibrate a chosen statistic.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 37 2 ii Solution Created 2026-10-03 Updated 2026-10-14
Use the logit link and independent counts . This gives a grouped-binomial logistic regression with 24 cells and 13 free coefficients: an intercept, 11 centre contrasts, and one period contrast. Reference treatment coding makes the intercept the log odds for Centre 1 in the earlier of the two included periods. The two factors are assumed to have been coded as specified in the question.
The binomial log-likelihood, apart from known constants, isMaximize by Fisher scoring or iteratively reweighted least squares. Using response proportions with binomial trial weights is equivalent to using the count response ; omitting those weights would give the wrong likelihood and standard errors. The coefficient covariance matrix is approximately the inverse of .
The fitted reference log odds are , and the period change is , givingThese are fitted probabilities under a common period effect, so they need not equal the separate empirical proportions at Centre 1. The estimated period odds ratio isThus the later-period death odds are estimated to be about 35% lower at each centre, with strong evidence of a period effect: the normal Wald statistic is . The displayed “t value” is a coefficient divided by its standard error; with fixed binomial dispersion its usual large-sample calibration is standard normal, not a Student distribution with an estimated Gaussian-error variance. The odds ratio is not a mortality probability ratio.
Each centre coefficient is a log odds ratio relative to Centre 1, adjusted for period. All its point estimates are negative, so all other centres have lower fitted mortality probabilities in either period. For example, Centre 11's odds ratio is , or about times greater odds at Centre 1 than at Centre 11. Individual unadjusted two-sided Wald tests find significant differences at the 5% level for centres 2, 4, 6, 7, 8, 9, 11 and 12; the coefficients for 3, 5 and 10 do not individually reach that threshold. These separate tests are correlated comparisons against a common reference and should not be presented as 11 independent discoveries without considering multiple testing. They adjust only for time period, not for differing patient case mix.
For fit assessment, the residual binomial deviance is on statistical degrees of freedom. Its upper tail is approximately , so there is no appreciable evidence of lack of fit to these binomial cell counts. In particular, comparing with a saturated centre-by-period model gives this same deviance and 11 additional parameters; the data do not strongly require a centre-period interaction. The moderate deviance residuals are consistent with that assessment, although a residual plot by centre and period would be more informative than the five-number summary alone.
The reduction from null to fitted deviance isIt tests the 12 centre-and-period coefficients jointly against an intercept-only model, with reference and . It is not a centre-only test adjusted for period. For that test, fit the period-only model and compare its deviance with the full fit: the pooled binomial probabilities in each period give deviance , soThus centre heterogeneity persists after allowing for period. Dispersion one is the stipulated binomial variance, and the five scoring iterations describe numerical convergence rather than statistical evidence. The fitted associations alone do not establish a causal difference in surgical quality.
Past exam of the mathematics course of the University of Cambridge 2005 ii Paper 4 5I Solution Created 2026-09-24 Updated 2026-10-14
The first two commands create vectors of observed successes and corresponding numbers of trials. The next two create the class labels and convert them into an R factor, so the labels are treated categorically. The final command fits a grouped-binomial logistic regression, using the proportions as responses and trial totals as binomial weights, and prints its summary. The model is , with class a as reference.
The intercept estimates the log odds in class a. Its value corresponds to probability . The class-b coefficient is the estimated increase in log odds, about , so the fitted probability in class b is and the estimated odds ratio is . The printed standard errors measure uncertainty in these estimated coefficients. The z values are estimate divided by standard error: the intercept tests whether the class-a probability is , while the class-b z value tests equal class probabilities. The two-sided normal-reference P-value for the latter is about , so it is just above a conventional threshold; this is a borderline result rather than strong evidence of a class effect.
The residual deviance compares the fitted two-parameter model with the four-probability saturated model. Its value on residual degrees of freedom is small relative to a reference, with approximate tail probability . There is no evidence of lack of fit by that check. Four Fisher scoring iterations were needed for numerical fitting. These interpretations presume independent binomial counts and the usual large-sample approximations; weights here encode trial counts, not extra independent observations.
Past exam of the mathematics course of the University of Cambridge 2006 ii Paper 1 13I Solution Created 2026-09-24 Updated 2026-10-14
The fitted grouped-binomial logistic regression generalized linear model treats seasonal hits as independent variables, with andThus the response supplied to
glm is a proportion, and weights=AB supplies its binomial denominator; it is not a regression with equally precise seasonal averages. I(Age^2) forms the numerical square rather than using a formula operator. The estimates maximize up to a constant, where , .The observed negative Hessian is , . Expanding the score around the true parameter and applying a central-limit approximation gives . The reported standard errors are square roots of the diagonal entries of this inverse; the binomial dispersion is fixed at one. Each
z value divides the coefficient estimate by its standard error, and the reported two-sided Wald test uses a standard normal approximation under the corresponding zero-coefficient hypothesis.The last line reports the deviance against the saturated model,with . There are 22 seasonal observations and three fitted parameters, so 19 degrees of freedom. Under the quadratic-logit model, independent binomial sampling and sufficiently large expected counts, . The value 23.345 gives an upper-tail probability about 0.22, no evidence of lack of fit at conventional levels. This approximation and the independence assumption should not be confused with an exact test of a player's ability.
The final commands recover the coefficients, apply the inverse logit , plot the observed averages against age, and join the fitted probabilities at the observed ages. The fitted curve is smooth, rises towards its peak at , then falls. Its maximum is about 0.373; the early and late observed points include markedly lower averages. The plot uses equally sized points even though their binomial precisions differ.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 43 3 i Solution Created 2026-10-03 Updated 2026-10-14
factor(day) treats the nine days as categorical rather than imposing a numerical time trend. rep(400,27) supplies the number of trials for every dish, and prop is the observed surviving proportion. The contrast setting uses treatment coding with day 1 as reference; the ordered-factor polynomial option is unused. Supplying these proportions to glm with the binomial family and weights gives precisely the grouped-binomial logistic regression likelihood for the counts. The weights represent trial counts, not additional independent dish observations. The binomial family's default link is the logit link and its dispersion is fixed at .Let be survivors in dish on day . Both fitted models assume independent . Model 1 specifiesso it has one common probability and one fitted coefficient. Its estimated probability is the total surviving count divided by the total trial count, .
Model 2 specifiesIt has nine coefficients and allows a separate probability for each day, while retaining a common probability for the three dishes within that day. The MLEs are the day totals divided by . In day order they areThe intercept is the first day's logit, and each other coefficient is its day's logit minus that reference. These are additive effects on log odds, not additive changes in survival probability.
The analysis of deviance adds the eight day indicators after an intercept-only model. Its residual deviance compares a fitted model with the saturated statistical model assigning one separate probability to each of the dishes. For fitted dish probabilities , the binomial deviance isThe binomial scale is one, so this is also scaled deviance. The reported decrease measures the extra fit provided by day. There are observational units for these residual statistical degrees of freedom, not separately fitted Bernoulli responses.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 41 4 b Solution Created 2026-10-03 Updated 2026-10-14
Index city by and age group by , with the youngest group the reference level. For each of the 15 observed cells, the grouped-binomial logistic regression assumeswith independent cell counts. The response supplied to R is , and the weights specify the binomial numbers of trials . They are not 15 arbitrary precision weights: the conditional variance of the proportion is . The logit link models log odds, and the two sets of factor coefficients use corner-point constraints.
There are nine parameters: one intercept, seven age contrasts and one city contrast. Hence the residual degrees of freedom are , not the total population minus nine. The null model has only an intercept and residual degrees of freedom. Adding age uses seven more parameters and reduces the binomial deviance from to , a drop of . Adding city then uses one parameter and reduces it by to . These are sequential likelihood-ratio tests, asymptotically compared with chi-squared distributions on seven and one degrees of freedom. Both provide extremely strong evidence of an effect; the printed age p-value is rounding, not an exactly zero probability. Because the table is incomplete, sequential main-effect sums need not be invariant to the order of fitting.
The intercept estimate is the log odds for the youngest Minneapolis–Saint Paul group. It implies baseline odds and a fitted probability about . Its standard error is ; its reported Wald test tests log odds zero, or probability , rather than a scientifically interesting comparison of groups.
The age coefficients are log odds ratios relative to the youngest group within the same city. Their exponentials are approximately , , , , , and as age increases through the seven other groups. All these comparisons have large positive Wald statistics and small p-values. Thus the fitted probabilities are much higher in the older groups than in the youngest group. The slightly smaller coefficient in the oldest group than in the preceding group does not itself prove a real decline: that claim needs a contrast and its standard error, including the covariance of the two estimates.
The city coefficient is the log odds ratio for Fort Worth relative to Minneapolis–Saint Paul, adjusted for age. Its standard error gives , so the null city effect is strongly rejected by the Wald test, consistent with the sequential likelihood-ratio test. The fitted constant-over-age city odds ratio and an approximate 95% confidence interval areThis is an odds ratio, not generally a probability ratio. The probabilities here are sufficiently small that the two ratios are close. The absence of an age-by-city interaction is an assumption of the fitted additive log-odds model.
The final binomial deviance is on six degrees of freedom; its approximate upper-tail p-value is . It gives no indication of substantial lack of fit against the saturated observed-cell model. The deviance residuals range from to , with median zero and no conspicuously large value in the five-number summary. Neither statement proves that every model assumption holds. In particular, the small case counts motivate checking the accuracy of the chi-squared asymptotic approximation, for example by a fitted-model parametric bootstrap.
The dispersion is fixed at one by the binomial distribution; it was not estimated as a free scale parameter. Four Fisher scoring iterations describe the numerical optimization, not four additional parameters. Residual and cellwise observed-versus-fitted comparisons would help assess adequacy and potential overdispersion.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 102 2 b Solution Created 2026-10-03 Updated 2026-10-14
Use grouped-binomial logistic regression, and . Center the year as . Maximizing gives score and information ; these determine the estimates and working covariance matrix.
A straight-line logit fit is , with naive binomial standard errors and . Its yearly odds multiplier is , with naive 95% Wald confidence interval . However, its residual deviance is on 12 degrees of freedom (), so those small standard errors do not describe an adequate independent-binomial fit.
Comparing polynomial mean structures gives residual deviances for degrees zero through three, with respective residual degrees of freedom . A quadratic term alone adds little; the cubic structure captures the middle-period acceleration and later leveling. Even the cubic independent-binomial fit has for its residual deviance goodness-of-fit test. A useful working model is therefore cubic quasibinomial regression, retaining the logistic mean and estimating overdispersion rather than claiming an exact binomial law:The Pearson estimate is . Using standard errors multiplied by and a reference, the approximate 95% coefficient intervals are , , , and . An approximate quasi-deviance comparison of cubic against linear gives and , supporting the added shape while acknowledging that only fourteen annual groups inform dispersion.
In this preferred mean model the odds change is not constant:The fitted annual change is larger around the middle than at the ends; the straight-line 4.6% increase is a useful overall summary, not an exact yearly effect in the cubic model. The fitted curve, uncertainty band and residual plot appear in the figure. Singleton success increased overall, but a constant log-odds trend with unit binomial dispersion fits poorly. Quasibinomial intervals remain working-model intervals: serial dependence, changing patient mix and treatment practices cannot be separated from annual aggregates alone.
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 2009 ii Paper 1 13I Solution Created 2026-09-24 Updated 2026-10-14
The first fit is grouped-binomial logistic regression: independently, , with the observed group sizes andThe reference group is under 50 with a nonmalignant initial tumour. The weights specify binomial numbers of trials, not six equally weighted individual observations. There is no age-by-malignancy interaction. Each age coefficient compares that age group with the reference age at fixed malignancy; is the common malignancy odds ratio.
The maximum-likelihood estimates are obtained by maximizing the binomial likelihood. The reported standard errors come from the inverse fitted Fisher information. Each displayed Wald test tests a coefficient equal to zero, using and the approximate standard normal distribution; its two-sided probability is . At the 5% level the middle age coefficient and the malignancy coefficient are significant, with negative signs; the oldest age coefficient is not, although its 9.17% probability is weaker evidence in the same direction. The oldest group has only 19 observations and its larger standard error does not establish absence of an age effect. The intercept tests reference log-odds zero, equivalently reference survival probability , rather than an age contrast. The reference fitted probability is about ; the fitted malignancy odds ratio is about .
The binomial deviance is twice the saturated-minus-fitted log-likelihood. The null fit has one parameter, hence residual degrees of freedom; the first fit has four parameters, hence . The improvement is an approximate likelihood-ratio test on three degrees of freedom, with probability about . The residual deviance , compared with , gives about , so there is no evidence of lack of fit. These are asymptotic comparisons, especially approximate for the small oldest strata. The Akaike information criterion is , here with .
Pooling the two older age groups gives a grouped-binomial logistic regression with a common coefficient for age at least 50 and three parameters in total. The similar older-age estimates and the sparse oldest group motivate examining this restriction, but the significance of either coefficient separately is not a test of their equality. The actual analysis of deviance for pooling compares the nested fits: the deviance increases by only for one lost parameter, giving a probability about . The pooled model also has smaller Akaike information criterion, rather than . Prefer the pooled model for its simpler adequate fit. Its common age and malignancy coefficients are negative and significant at 5% in the reported Wald tests.
There is a literal parenthesis error in the printed final R fragment: the first sum is not closed before subtracting the second sum. As printed, the expression is incomplete. Closing that sum gives twice the saturated-minus-fitted log-likelihood, including the binomial constants which cancel. Its intended final value is therefore the second fit's binomial deviance, .
Past exam of the mathematics course of the University of Cambridge 2010 ii Paper 4 13J Solution Created 2026-09-24 Updated 2026-10-14
A natural grouped-binomial logistic regression assumes independentwhere is beer intake and indicate Weird and Relaxed expressions. This uses the logit link. Independence of the individual throws conditional on the day's predictors gives the binomial sampling model; extra within-day dependence would instead produce overdispersion. The interactions let the beer slope depend on facial expression, rather than requiring one common slope. With the data frame named darts, R code is
darts$Expression <- relevel(factor(darts$Expression), ref = "Mad")
barney <- glm(cbind(BullsEye, 100 - BullsEye) ~ Beer * Expression, family = binomial, data = darts)Mad is the baseline category. Its intercept and beer slope are already represented by the first two coefficients; including all three category indicators together with an intercept would make the design matrix rank deficient. For three beers and Weird expression,The fitted probability is , approximately 0.347.
The Weird intercept and interaction are individually nonsignificant, suggesting that Mad and Weird might be combined. The Relaxed beer interaction is significant, so dropping all interactions would discard supported structure. A candidate reduced model retains only the Relaxed indicator and its interaction:
reduced <- glm(cbind(BullsEye, 100 - BullsEye) ~ Beer * I(Expression == "Relaxed"), family = binomial, data = darts)
anova(reduced, barney, test = "Chisq")This fits without changing the data file. The joint likelihood-ratio test, rather than the two separate coefficient p-values alone, decides whether the simplification is supported. Also inspect regression residuals and the ratio of residual deviance to residual degrees of freedom for overdispersion or lack of fit; a quasibinomial analysis may be appropriate if the binomial variance is inadequate.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 3 a Solution Created 2026-10-03 Updated 2026-10-07
Index independent experimental vials by , write for the observed total eaten and for the number of other-species eggs eaten. The grouped-binomial logistic regression usesHere and identify day and adult species, and the free effects are . There is no day-species interaction. The weights in the binomial generalized linear model are the denominators , so fitting the proportions gives this binomial likelihood, not 23 Bernoulli observations. The dispersion is fixed at one. This is a model for the composition of eggs eaten conditional on the total, rather than a model for the total appetite.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 33 5 b i Solution Created 2026-10-03 Updated 2026-10-06
For woman , write for the number of births, for the number with defects, for baseline age, and for exposure. Let be the common marginal defect probability for her births. The first fit is a grouped grouped-binomial logistic regression:It assumes independent women and, conditionally on their covariates, independent births with the same probability within each woman. The supplied birth totals are the binomial denominators; fitting the proportions with weights is equivalent to this grouped-binomial specification. The fitted linear predictor is .
The second fit is a generalized additive model with the same logit link function and the mean specificationThe functions are penalized cubic regression splines with natural boundary conditions. Centering constraints such as separate them from the intercept; the fitted centered intercept is . Their second derivative roughness penalties control complexity.
The call estimates a common scale rather than fixing it at one. Its working variance specification for the counts isEquivalently the variance of is . This is the working moment interpretation of an overdispersed binomial generalized additive model: the code uses binomial deviance for fitting and estimated scale for inference. With , it is not an exact independent-binomial sampling model. Women are still treated as independent groups, but within-woman dependence or unobserved heterogeneity can motivate the extra dispersion. The quasibinomial regression interpretation states what the scaled analysis assumes without inventing a full probability distribution for its counts.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 218 1 a Solution 2026-10-03
Let be the number healthy among patients and . The fitted grouped-binomial logistic regression isFor its mass has exponential dispersion family formwhereThus and
Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 4 13K a Solution Created 2026-09-24 Updated 2026-09-25
Let be the number of survivors among the patients in row . The fitted grouped-binomial logistic regression iswithSite A and nonmalignant tumours are the reference levels. There is no site-by-malignancy interaction, so the malignancy log-odds effect is assumed to be the same at all three sites. In the R call,
survive/total supplies the observed proportions and weights = total supplies the binomial denominators .
