For independent affected sib pairs with IBD counts , the likelihood function of the recombination fraction is proportional to , with . At fixed sample size, the total shared-copy count is a sufficient statistic by the Fisher-Neyman factorization theorem. Thus a one-sided likelihood-ratio test has the same ordering as a test for excess mean IBD sharing. This equivalence depends on the stated fully penetrant recessive model and does not extend to arbitrary disease models.
// Target: biology.bigb
For a continuous predictor and a categorical factor, an additive Poisson regression with log link has . The log-mean curves are parallel and is constant in . Adding a predictor-by-factor interaction gives , so this ratio becomes . With factor levels, the common-slope restriction has independent constraints. A likelihood-ratio test compares the two deviances with an asymptotic chi-squared distribution on degrees of freedom. Evidence against common slopes establishes varying effects on the log scale; it does not by itself determine their signs or the ordering of the mean curves.
Grouped Poisson likelihood 2026-10-31
When a Poisson distribution is observed in cells , the last cell probability is a tail sum, not the probability of exactly . With and , telescoping derivatives give . Thus an interior maximum-likelihood estimate solves . Substitution of the estimate into these cell probabilities supplies fitted expected counts for a likelihood-ratio test. With cells and one regular fitted parameter, the asymptotic chi-squared distribution has degrees of freedom. Replacing every grouped tail observation by changes the data model and generally does not give the grouped maximum likelihood estimate.
A logistic regression fitted to ungrouped Bernoulli observations has residual deviance . Comparing it automatically with is generally invalid: the saturated dimension grows with , with one observation per fitted probability. If the true model has only an intercept and success probability , then , whereas . Fixed-dimensional nested-model likelihood-ratio tests can still use Wilks theorem under regularity. For absolute fit, use meaningful grouping, residual diagnostics, or a fitted-model parametric bootstrap.
Likelihood-ratio confidence interval 2026-10-14
Invert a likelihood-ratio test for a scalar parameter, maximizing over nuisance parameters for each fixed candidate value. Under regularity, a level interval includes values whose profile log-likelihood is at most below its maximum. This explains the horizontal cutoff on a Box–Cox transformation likelihood plot.
Likelihood-ratio test for a normal variance 2026-10-25
For an independent normal distribution sample with unknown mean, test against unrestricted positive variance. Put and assume . Profiling the mean and variance gives the likelihood ratio for a nondegenerate sample. Its logarithmic derivative changes sign at , so small ratios select a lower and an upper tail.
Under the null hypothesis, Cochran's theorem gives . The exact size- cutoffs therefore satisfyThe second equation makes the two boundary ratios equal. Rejection on or is consequently the exact likelihood-ratio test, and its tails need not have equal probability. For a large sample, the Wilks theorem instead calibrates by . A Bartlett correction for a normal variance with unknown mean improves this asymptotic calibration; it is unnecessary when using the exact distribution.
For two independent statistical samples from exponential distributions with positive means and , write , and . The unconstrained maximum-likelihood estimators are and ; under equality of the means the common fitted mean is . Dividing the constrained maximum likelihood function by its unrestricted maximum gives the displayed likelihood ratio. Its maximum is one at , so the likelihood-ratio test rejects for sufficiently small values, in either tail of .
Under the null hypothesis, the sums have independent gamma distributions with a common rate, so by beta sampling by gamma ratios. This permits exact calibration. For large samples with , the Wilks theorem gives . Its upper-tail probability is the asymptotic p-value. The one statistical degree of freedom is the difference between the unrestricted and constrained parameter dimensions.
Nonregular mixture model selection 2026-10-06
Testing the number of components in a finite mixture model is nonregular: absent components have zero weights on the parameter boundary and their means or other parameters are unidentified. The usual chi-squared limit for a likelihood-ratio test therefore need not apply. Information criteria are useful working comparisons, while parametric bootstrap and predictive cross-validation can provide more appropriate evidence. Neither a mixture fit nor a selected component count proves genuine latent populations.
Null deviance 2026-10-14
The null deviance is the unscaled deviance of the intercept-only mean model relative to the saturated model at a common dispersion parameter , retaining any known generalized linear model offset. It supplies a baseline against which predictor terms improve the fit. Its difference from a fitted model's residual deviance, divided by , is the statistic for a likelihood-ratio test of those added terms, with nuisance parameters handled consistently in both fits. In Poisson and binomial families, .
Age and observed populism classification are associated, but the overall association is small and not a strictly monotone age trend. Populist classification is most common in the 55+ group, about 77.12%, versus 66.77% at ages 18–24; it also falls back to 66.38% at ages 35–44.
This table has 1692 observations, all respondents with an observed populism classification, because age has no missing values. The within-age Populist percentages are 66.77%, 73.18%, 66.38%, 74.03% and 77.12%, in ascending age-group order. Their Not-populist complements are 33.23%, 26.82%, 33.62%, 25.97% and 22.88%. Comparing the oldest and youngest Populist percentages gives about 10.35 percentage points, but the intermediate reversal prevents describing a uniform rise at every age transition. The row totals 310, 302, 348, 308 and 424 are the classified cases; their differences from the age totals in Figure 1 sum to the 92 missing classifications.
The Pearson chi-squared test of independence gives on statistical degrees of freedom, . The likelihood-ratio test gives and . Both reject independence at 5% and 1% under the usual sampling assumptions. The minimum expected frequency is about 85.317, so the large-sample approximation is not threatened by sparse expected counts here. Neither test is specifically a test of a linear or monotone age trend.
The generalized phi coefficient and Cramér's V are about 0.097, and the contingency coefficient about 0.096: small unsigned association magnitudes. If the binary classification is coded Not populist before Populist and age groups are ordered younger to older, the ordinal output has a meaningful conventional direction. The 258482 concordant and 205602 discordant pairs give Goodman and Kruskal's gamma about 0.114; Somers' D for classification given age is about 0.046, Kendall's tau-b 0.065 and Stuart's tau-c 0.074. These small positive summaries describe an overall older–Populist tendency while allowing the middle-age reversal. They use different tie or table-size adjustments and are not percentages of respondents caused to change classification by ageing.
Goodman and Kruskal's lambda for predicting classification from age is zero because Populist remains the modal classification in every age row. In the reverse direction, predicting age group from classification improves modal predictions slightly: without classification the most frequent age group has 424 cases, whereas choosing a separate modal age group for each classification yields correct predictions. The error reduction is , matching the displayed 0.016. Direction must therefore be stated, rather than treating both lambda numbers as interchangeable. Age is a relevant control variable for the later comparison, but these cross-sectional associations do not establish an age-related causal mechanism or remove other confounders.
Every displayed age stratum has a higher reported-Yes proportion among Populist respondents, but the size varies considerably. The largest difference is at ages 25–34 and the smallest at 45–54. The omnibus tests reject within-stratum independence for ages 25–34 and 35–44, but not for the other three groups; comparing those significance labels is not itself a test of statistical interaction.
The five strata contain 298, 291, 339, 296 and 405 complete cases. They sum to 1629 and reproduce every cell of the overall table, so the comparison is a coherent age stratification. Each body percentage estimates a blocking-response conditional distribution within a particular age and populism combination. Not know is retained as the third valid response. The ordinal statistics discussed below are numerical summaries of the displayed order only, because that response order has no established behavioural rank.
For ages 18–24, reported blocking is among Not-populist respondents versus among Populist respondents, a difference of about 8.11 percentage points. No is 71.43% versus 66.00%, and Not know is 9.18% versus 6.50%. The Pearson result is on 2 statistical degrees of freedom, ; the likelihood-ratio test gives , . Thus neither rejects at 5%. The minimum expected frequency is 7.235, so no cell falls below five. Cramér's V and the generalized phi coefficient are about 0.095, with contingency coefficient about 0.094. The ordered-label summaries are gamma 0.203, Somers' D 0.095, tau-b 0.092 and tau-c 0.084. Both lambdas are zero. These figures allow a positive descriptive Yes difference alongside considerable uncertainty; nonrejection does not establish identical response distributions.
For ages 25–34, reported blocking is versus , a difference of about 19.57 percentage points. No falls from 75.68% to 64.06% and Not know from 14.86% to 6.91%. Pearson gives , on 2 statistical degrees of freedom; the likelihood ratio gives , . Its printed 0.000 is rounding, not an exact zero. Both indicate nominal evidence against independence, although the Pearson value is just above 0.001 rather than below it. The minimum expected count is about 6.612. V and generalized phi are about 0.218, and the contingency coefficient about 0.213. The ordered-label gamma is about 0.500, Somers' D 0.239, tau-b 0.211 and tau-c 0.181. Neither direction of lambda improves modal prediction: No remains the modal response in both rows and Populist the modal group in each column. In particular, gamma 0.500 does not mean that populism explains half the variation in blocking.
For ages 35–44, reported blocking is versus , a difference of about 10.73 percentage points. No is nearly unchanged, 76.58% versus 76.32%, while Not know falls sharply from 14.41% to 3.95%. The full categorical association therefore includes a substantial awareness-category difference. Pearson gives , ; the likelihood ratio gives , , each on 2 statistical degrees of freedom. The minimum expected count is about 8.186. V and generalized phi are about 0.220 and the contingency coefficient about 0.215. Ordered-label gamma is 0.477, Somers' D 0.187, tau-b 0.200 and tau-c 0.165. Lambda for predicting the blocking category from populism is zero. In the reverse direction it is about 0.063: Not know has more Not-populist than Populist respondents, so allowing the response to change the predicted classification slightly reduces errors. This is a nominal prediction result, not a causal mechanism.
For ages 45–54, reported blocking is versus , only about 0.45 percentage points apart. No is 71.62% versus 78.38%, and Not know is 16.22% versus 9.01%. Here most of the descriptive distributional difference is between No and Not know rather than between the reported-Yes proportions. Pearson gives , ; the likelihood ratio gives , , with 2 statistical degrees of freedom. The minimum expected count is 8. V and generalized phi are about 0.101 and the contingency coefficient about 0.100. Ordered-label gamma is 0.164, Somers' D 0.067, tau-b 0.066 and tau-c 0.050; both lambdas are zero. A positive ordered-label coefficient therefore should not be substituted for a substantial difference in Yes rates.
For ages 55+, reported blocking is versus , a difference of about 3.02 percentage points. No is 87.78% versus 86.35%, and Not know is 6.67% versus 5.08%. Pearson gives , ; the likelihood ratio gives , , with 2 statistical degrees of freedom. V and generalized phi are about 0.053, with contingency coefficient about 0.053. One of six expected counts is below five, with minimum about 4.889. This is a mild sparse-cell qualification rather than a missing observation; an exact conditional test or fixed-margin Monte Carlo test could check calibration if needed. No simulated p-value is claimed. Ordered-label gamma is 0.184, Somers' D 0.043, tau-b 0.052 and tau-c 0.030, with both lambdas zero.
The Goodman and Kruskal's gamma, Somers' D, Kendall's tau-b and Stuart's tau-c values differ because their denominators handle ties or table dimensions differently. All the supplied pair partitions and numerical values agree with the counts. Their substantive ordinal interpretation remains limited by Not know. In contrast, Cramér's V and Goodman and Kruskal's lambda permit nominal categories; zero lambda means no improvement in modal classification, not absence of all association.[ref]
DescTools documentation for gamma, Somers' D and lambda. Details: ordinal-scale assumptions for gamma and Somers' D, versus nominal modal prediction for lambda
[ref]Ordinal association measures in the DescTools documentation. KendallTauB and StuartTauC: different tie and table-size conventions
Reported blocking within age and populism groups, with count-derived age-specific and standardized percentage-point contrasts; Not know remains a valid response
. Details. Holding age fixed does not eliminate the positive descriptive difference in reported Yes rates: none of the five differences reverses sign. Thus the evidence does not show a Simpson's paradox in which every conditional direction opposes the pooled direction. There is also little evidence for a single common magnitude from inspection: differences range from about 0.45 to 19.57 points. The elaboration model provides a useful language of persistence and possible specification, but these tables alone do not establish causal explanation or population effect heterogeneity.
As a clearly defined descriptive adjustment, use the complete-case age shares as common weights for both groups. Standardization with common weights gives reported-Yes proportions about 10.70% for Not-populist and 18.75% for Populist respondents, a difference of 8.04 percentage points, compared with the crude 7.26-point difference. Equalizing that age composition therefore does not explain away the observed contrast. It is not a causal effect, and its target remains the observed complete-case sample.
There is also nominal combined evidence against conditional independence. The joint conditional independence test for stratified contingency tables sums the five Pearson statistics to about 37.0169; under the usual independent-stratum asymptotic model this has 10 statistical degrees of freedom and . This derived test addresses whether all five full response distributions are conditionally independent, not whether their effects are equal or whether Yes alone differs in every stratum. A direct interaction contrast or appropriate categorical-response model is needed to test effect differences on a specified scale. Multiple separate tests additionally create a multiple testing issue if used selectively. The warranted conclusion is a persistent positive descriptive Yes association after age stratification, strongest at 25–34, with formal heterogeneity, missing-data and causal questions still requiring explicit assumptions and targeted analysis.
The White stratum retains the overall distrust–lower-efficacy pattern, the Asian stratum shows a stronger but irregular version of it, and the Black stratum has an opposite descriptive ordinal direction. This supports replication in the dominant stratum together with possible specification by ethnicity in the elaboration model. Sparse minority tables and different significance labels do not by themselves establish a population statistical interaction.
Each table fixes ethnicity and compares the efficacy conditional distributions across technology responses. The body percentages use the technology-response row total within that stratum. The same labels, coding direction and efficacy order apply as before. The strata contain 77, 57 and 2332 observations; they sum to 2466 and their cells reproduce the overall table exactly. Consequently the comparison is genuinely a stratification of the supplied overall counts, rather than a comparison of unrelated samples.
For Asian respondents, High efficacy is 78.95% among those who strongly disagree with the distrust statement, falling to 23.81% among those who disagree, 18.75% among neutral respondents and 19.05% among those who agree. The strong-disagreement versus agreement contrast is about 59.90 percentage points, based on 15 of 19 versus 4 of 21 respondents. This is a large descriptive contrast, but the rest of the table is not a simple monotone progression: Low efficacy peaks at 47.62% in Disagree, versus 10.53% in Strongly disagree, 18.75% in Neutral and 23.81% in Agree; Medium efficacy exceeds 57% in the last two rows. The striking first row is part of a more irregular categorical pattern.
The Asian Pearson chi-squared test of independence gives , 6 statistical degrees of freedom, . The likelihood-ratio test gives , ; its displayed 0.000 is a rounding convention. Cramér's V is about 0.430, compared with 0.148 overall. The generalized phi coefficient is 0.608 and the contingency coefficient 0.519. Two of twelve expected frequencies are below five, with minimum 4.156. This is a modest sparse-cell warning rather than a reason to delete the observed cells, but asymptotic calibration should still be qualified and could be checked by an exact or fixed-margin Monte Carlo test.
The Asian Goodman and Kruskal's gamma is about 0.323, from 1025 concordances and 524 discordances, so its displayed-order direction agrees with the overall association. Somers' D for efficacy given technology is about 0.226, Kendall's tau-b 0.241 and Stuart's tau-c 0.253. These stronger ordinal summaries do not imply that every individual row transition is monotone. Goodman and Kruskal's lambda is about 0.362 for predicting efficacy from technology and 0.286 in the reverse direction: the technology row changes the modal efficacy prediction sufficiently to reduce its errors by about 36.2%. This is a reduction in modal-classification errors, not a fraction of efficacy variance explained.
For Black respondents, High efficacy is 0 of 6, or 0%, in Strongly disagree; 8 of 24, or 33.33%, in Disagree; 2 of 15, or 13.33%, in Neutral; and 7 of 12, or 58.33%, in Agree. Low efficacy is 16.67%, 25.00%, 20.00% and 8.33%, respectively. The strongest-disagreement versus agreement High-efficacy contrast is therefore percentage points, opposite to the Asian and White contrasts. The zero observed High count in the first row does not prove zero population probability, especially with only six respondents in that row. These percentages are compatible with a reversed tendency, but considerable sampling uncertainty is unavoidable.
The Black Pearson chi-squared test of independence gives , 6 statistical degrees of freedom and . The likelihood-ratio test gives , , also above 5%. Thus neither nominal test rejects at 5%; this does not establish exact independence. Eight of twelve expected frequencies are below five, with minimum about 1.158, making the usual large-sample calibration particularly questionable. An exact conditional analysis or Monte Carlo test would be more defensible for a calibrated inferential claim; no uncomputed simulated p-value is asserted.[ref]
Pearson's Chi-squared Test for Count Data in the R documentation. Details: fixed-margin sampling for simulated contingency-table tests
The Black Cramér's V is about 0.308, the generalized phi coefficient 0.435 and the contingency coefficient 0.399. An unsigned magnitude of this size can coexist with a nonsignificant test in a small sample. There are 254 concordances and 457 discordances, giving Goodman and Kruskal's gamma about , Somers' D about , Kendall's tau-b about and Stuart's tau-c about . Their negative signs agree with the reversed displayed-order direction. Goodman and Kruskal's lambda is about 0.107 for efficacy given technology and zero for technology given efficacy. In the latter direction, Disagree remains a modal technology category within every efficacy column, so modal prediction gains nothing despite the changed conditional percentages.
For White respondents, High efficacy decreases from 48.55% in Strongly disagree through 43.10% and 32.03% to 27.45% in Agree. The extreme-row contrast is about 21.11 percentage points, from 151 of 311 versus 188 of 685. Low efficacy is 21.22%, 17.10%, 21.57% and 35.04%, respectively. This closely resembles the overall distribution, including the fact that the Low category is not monotone at every step. The White Pearson chi-squared test of independence gives , 6 statistical degrees of freedom and ; the likelihood-ratio test gives , . All expected frequencies exceed 74, so sparse cells are not the problem for these nominal tests.
The White Cramér's V is about 0.152, the generalized phi coefficient 0.215 and the contingency coefficient 0.210. Goodman and Kruskal's gamma is about 0.236, Somers' D 0.155, Kendall's tau-b 0.162 and Stuart's tau-c 0.167: close to the overall ordinal summaries and in the same direction. The two values of Goodman and Kruskal's lambda are about 0.061 for efficacy given technology and 0.062 for technology given efficacy. They again indicate only a small improvement in modal prediction. The large sample size helps explain why the White test has a much smaller p-value than the smaller strata, without implying that its association magnitude is the largest.
The original figure below plots selected empirical conditional probabilities from all the cells. It gives the opposite small-stratum pattern and the dominant White pattern a common scale; it is not a reproduction of a source figure, an estimated continuous trend or a display of uncertainty intervals.
Efficacy distributions across technology-distrust responses: contrasting ethnic strata and the pooled sample. Lines only connect the four ordered categories; group sizes and sparse cells limit inference.
Details. The elaboration model asks how the original association changes when a third variable is held fixed. If the association disappeared throughout the strata, an explanation by the control variable might be plausible, subject to a credible causal ordering. Here it persists in the White group, which supplies 94.57% of the sample, and is stronger on several descriptive measures in the Asian group. Therefore ethnicity does not simply explain away the relationship. The White result is a replication of the broad pattern; the reversed Black direction and the Asian shape suggest descriptive specification or possible effect modification. The output supplies no temporal or causal design that would distinguish an actual causal mechanism from other confounding, measurement differences or sampling variation. It also does not demonstrate a Simpson's paradox in which the association reverses in every stratum: that is not what the displayed tables show.
The predominance of White respondents explains why the pooled pattern resembles theirs. By the law of total probability, each technology row's efficacy distribution is a mixture over ethnicity, using the ethnic proportions within that technology row. Those weights need not equal the overall ethnic proportions. As an optional descriptive comparison, standardization with common weights using the overall ethnic shares gives High-efficacy proportions of about 48.38% in Strongly disagree and 27.90% in Agree, a 20.48-percentage point contrast, compared with the crude 21.69-point contrast. This explicitly defined adjustment leaves the broad contrast intact; it is not a causal estimate and does not turn the three different stratum patterns into one common effect.
Finally, a significant test in one group and a nonsignificant test in another is not itself a test that the groups' associations differ. A formal statistical interaction requires a directly specified heterogeneity test or model on a chosen effect scale. The omnibus tests also address whole categorical distributions, whereas gamma and the High-efficacy contrast describe particular ordered features. Multiple stratum tests create a multiple testing issue if used to select a discovery. The defensible result is an association that survives stratification in the dominant group, with important descriptive heterogeneity that merits a direct, sparse-cell-aware investigation rather than an assertion that ethnicity causes the difference.
The displayed age groups have fairly similar employment proportions, with no coherent monotone age trend. The printed test reports no evidence against age–employment independence; recomputing from the five visible rows reaches the same qualitative conclusion. Their totals and several auxiliary fields nevertheless do not represent one consistent table.
Each row percentage estimates an employment proportion within that age group. For example, of the youngest displayed group are employed. The employed proportions in the next four rows are , , and . The largest displayed proportion is in the 45–54 group and the smallest in the 55–64 group, a difference of about percentage points. These are conditional percentages, not the age distribution of employed people. The sequence rises and then falls; there is no simple increasing or decreasing pattern.
The null hypothesis for a Pearson chi-squared test of independence is that the joint category probabilities factor into their age and employment marginals. Its expected frequencies are , and its test statistic adds the standardized squared count discrepancies, . For a complete contingency table with positive margins, the large-sample reference chi-squared distribution has statistical degrees of freedom. Independent observations and an appropriate sampling scheme are essential; adequate expected counts make the approximation more plausible.[ref]
Pearson's Chi-squared Test for Count Data in the R documentation. Details: independence null, asymptotic reference distribution and observed/expected counts
Reading only the printed test block, , statistical degrees of freedom and are mutually compatible. The printed likelihood-ratio test gives nearly the same p-value, about . At a prechosen 5% significance level neither rejects independence. This is a failure to find evidence, not proof of equal employment probabilities at every age. The printed Cramér's V around suggests a small sample association; the contingency coefficient around has the same broad message. The generalized phi coefficient is an unsigned chi-squared magnitude here, not evidence for a positive age trend. A small association magnitude and a large p-value answer different questions.
But only a table is actually visible. Those rows total , with employment column sums and , rather than the printed with columns and . Computing solely from the five visible rows givesIts likelihood-ratio test statistic is about , again with statistical degrees of freedom. The smallest count-based expected frequency is about , comfortably large for this ordinary approximation, but different from the printed minimum . These figures are a labelled analysis of the visible subset, not a repaired full dataset. An unprinted sixth age row might explain some intended metadata, but neither its label nor a uniquely justified reconstruction is supplied. The oldest printed label also conflicts with Figures 1 and 8.
The ordinal measures look for an ordered tendency. Goodman and Kruskal's gamma compares concordant pairs with discordant pairs among pairs untied on both variables. The printed negative gamma, Somers' D, Kendall's tau-b and Stuart's tau-c therefore suggest, at most, a very weak tendency toward lower employment at higher age categories under the specified ordering. Their precise magnitudes are not reliable here. The ordinary unordered-pair partition for ordinal data fails for the printed pair counts, even when compared with the printed cases. On the five visible rows the respective count-based values are about , for employment conditional on age, and . None gives a substantial monotone pattern; a near-zero ordinal measure would not exclude a nonmonotone relationship in general.
Goodman and Kruskal's lambda is zero in both predictive directions on the visible table: knowing age does not improve the number of correct predictions made by always choosing the most common employment category, and knowing employment does not improve modal age-category prediction. Zero modal-prediction improvement does not mean every category distribution is identical. Both the reported test block and the separately recomputed visible-table test fail to reject independence; neither justifies asserting no association, a causal age effect, or a coherent full-sample calculation from the contradictory printout.
The deviance entries are for these fitted models. The completed values areThe likelihood-ratio test compares a model with one age coefficient against its restriction . Its small p-value, approximately , supports a positive age association under the assumed Gaussian linear mixed model. Refitting with maximum likelihood estimation is essential here: restricted maximum likelihood values from models with different fixed-effect design matrices cannot be compared by this likelihood-ratio test.
Yes. The bootstrap confidence interval for the age coefficient, , excludes zero and supports the same positive association. A well-implemented parametric bootstrap can give better finite-sample calibration than the asymptotic likelihood-ratio test, especially with only eleven year groups and estimated variance components. Its advantage depends on simulating the full fitted Gaussian linear mixed model and refitting correctly; resampling individual records as if they were independent would discard the grouping. A bootstrap confidence interval is also not literally the same procedure as a bootstrap-calibrated test.
The bird-level standard deviation is appreciable, with interval hatchlings, whereas the year-level estimate is much less precise, with interval . The residual standard deviation is approximately –. Boundary fits in 23 of the 1000 replicates indicate that at least one fitted variance component sometimes reaches zero; the convergence warning should also be investigated before trusting the reported intervals. Neither the asymptotic test nor a model-based bootstrap repairs incorrect response-distribution or mean-structure assumptions.
Past exam of the mathematics course of the University of Cambridge 2001 ib Paper 1 12D Solution Created 2026-09-24 Updated 2026-10-14
A simple hypothesis specifies a single probability law, with no unknown parameter remaining. For a possibly randomized hypothesis test, let be its conditional rejection probability. Its test size is and its statistical power against the specified alternative is .
The Neyman-Pearson lemma states that for two densities with respect to a common measure, a likelihood-ratio test rejecting when , accepting when it is below , and randomizing on equality to obtain size , maximizes power among all tests of size at most .
Here the likelihood ratio isWriting , its logarithm apart from the constant is . This decreases until and then increases. In particular it is nonpositive for and positive for . The supplied normal-tail value and imply that the quantile defined by satisfies . Hence the threshold is above every central value on ; outside that interval the ratio is strictly increasing. The Neyman-Pearson lemma therefore selects precisely the two tails:The equality boundary has probability zero under both continuous laws, so no randomization is needed. Under the alternative density, the statistical power isThe central dip in the likelihood ratio is why checking the threshold against the entire central region, rather than assuming monotonicity in everywhere, is necessary.
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 2002 iii Paper 36 2 ii Solution Created 2026-10-03 Updated 2026-10-14
The family-history table contains men, of whom have the response present, giving an overall observed fraction . The unadjusted fractions are with a positive family history and without one. Their crude odds ratio is ; this is not the covariate-adjusted effect from the fitted logistic regression.
The full model has an intercept and nine slopes, hence residual degrees of freedom. The binomial distribution dispersion is fixed at one. Although the software labels coefficient-to-standard-error ratios as t values, here they are asymptotic normal Wald statistics, not statistics with an estimated Gaussian residual variance and an exact Student reference. The full conditional coefficients provide evidence for tobacco, cholesterol, family history, behaviour score and age: their absolute Wald ratios are approximately . The other four ratios are smaller in magnitude, especially alcohol at about . These are conditional associations; a weak adjusted coefficient does not by itself establish absence of an underlying association, and multicollinearity can affect the estimates.
The null deviance is on degrees of freedom and the full residual deviance is on . Their difference has a nominal nine-degree-of-freedom likelihood-ratio test reference for the nine slopes jointly. The absolute residual deviance should not automatically be compared with for the reasons in part (i).
The shown stepwise selection by the Akaike information criterion follows a backward path. For individual binary observations the saturated log-likelihood is zero, sowhere includes the intercept. Removing a one-parameter term improves AIC exactly when the increased deviance is less than two. The successive deletions are alcohol, adiposity, blood pressure and obesity. The corresponding values areAt the final step, every remaining single-term deletion increases AIC. This is a local stopping condition of the search, not a proof that it found the best subset among all possible models. Obesity is retained for several steps because its successive deletion costs differ after the other terms are removed; the procedure does not simply sort the initial Wald ratios.
For the selected fit, write for positive family history and otherwise. The fitted linear predictor isHolding the other predictors fixed, a unit increase multiplies the odds by . In the same variable order, the unit odds ratios areA ten-year age difference multiplies the fitted odds by , and ten behaviour-score points by . Family history has adjusted odds ratio about , with ordinary fitted-model confidence interval . The intercept is the log odds at zero numerical covariates and absent family history; that extrapolated baseline is not a typical man's risk. Odds ratios are not risk ratios.
The selected model's residual degrees of freedom are , consistent with its six coefficients. All five retained slopes have nominal normal-Wald values below in that model, but these tests and confidence intervals do not incorporate the prior model selection. Its improvement over the intercept-only fit is on five nominal degrees of freedom; it loses only deviance units relative to the nine-slope fit while using four fewer parameters. Selection optimism remains relevant to predictive performance. Check possible nonlinear continuous-predictor effects, influential observations and clinically motivated interactions; assess out-of-sample discrimination and agreement of predicted probabilities with observed frequencies by cross-validation or external data. The printed output alone does not supply those diagnostics, and the selected high-risk male population limits extrapolation to other populations. Nothing here establishes causal effects of these observational predictors.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 38 2 Solution Created 2026-10-03 Updated 2026-10-14
The prose names a second year that differs from the table label. The calculations use the four supplied counts, interpreting the first and second rows as the two displayed periods; no numerical conclusion depends on resolving that label discrepancy.
The first generalized linear model treats the four counts as independent Poisson random variables, with a log link and both row and column regression factors. The row-by-column interaction makes the log-linear model saturated. With , writeIts four maximum-likelihood fitted values equal the observed counts. Thus , , , andThe interaction is the log odds ratio measuring association of row and column. Under independent Poisson sampling, the delta-method variances are for the intercept, for the row contrast, for the column contrast, and for the interaction. Their square roots reproduce the printed standard errors. Although the software labels the standardized ratios as t values, these are asymptotic normal Wald statistics, with known Poisson dispersion one, not exact finite-df Student tests.
The statistical saturated model has zero residual deviance and zero residual degrees of freedom; this is a perfect interpolation, not evidence of predictive adequacy. The null deviance compares the four observed counts with an intercept-only model, whose four fitted means are . Fisher scoring is the numerical score/information iteration used to fit the model; the iteration count is a convergence report, not a test statistic.
Dropping the interaction gives the independence log-linear model for a two-way contingency table, . Its Poisson regression margin-matching score equations match the row and column totals, soHere and denote the observed row and column totals. In particular the fitted row multiplier is , the column multiplier is , and the intercept is . These produce the second coefficient table. Their standard errors follow from the inverse Fisher information matrix; for the row and column contrasts their squared values are and , while the intercept variance is .
The Poisson deviance relative to the saturated fit isThe linear terms cancel because fitted and observed totals agree. The additive model has three coefficients, leaving one degree of freedom. Wilks theorem calibrates this likelihood-ratio test approximately by , giving . The interaction Wald test instead gives ; the two are only asymptotically equivalent.
Fisher's exact test conditions on both margins under independence. If is the upper-left count, thenIts usual two-sided p-value sums the probabilities of all tables no more probable than the observed . That sum is , reproducing the output without an asymptotic approximation. It tests the same absence of row-column association, but conditioning and discreteness explain the numerical difference from the likelihood-ratio test.
In ordinary language, the male proportion among the cases is in the first row and in the second. The estimated case-sex odds ratio is , but its approximate 95-percent confidence interval is wide, . These small samples do not give convincing evidence that the sex composition of cases changed between the two periods. Failure to reject is not evidence that the compositions are exactly equal. Nor do these counts establish a male-to-female disease-incidence ratio or an incidence trend: population denominators and comparable ascertainment would be needed for those interpretations.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 42 1 iii Solution Created 2026-10-03 Updated 2026-10-14
Under the unrestricted model, insert the maximum-likelihood estimates . Under the diagonal-covariance restriction, the quadratic form is minimized over the mean at , and the remaining objective separates over the diagonal entries:Differentiating in gives ; the derivative changes from negative to positive there. Put . The fitted trace term is under either model, since . Consequently the likelihood-ratio test statistic is determined byThis is the Gaussian diagonal-covariance likelihood-ratio test. Reject for sufficiently small , equivalently for large . Under the regular large-sample calibration, Wilks theorem gives , since diagonality removes that many free covariance parameters. The exact critical constant can instead be obtained from the null distribution at the actual sample size.
For , write the sample correlation coefficient as . Then , so the likelihood-ratio test rejects for large , not merely for large positive . Under the null, the two variables have a bivariate normal distribution and are independent, and the exact test isIndeed, condition on the centered first-variable observation vector. Decompose the second centered Gaussian vector into its component along that direction and the -dimensional orthogonal complement. Their squared lengths give independent and variables. Their ratio shows that has Student's t-distribution with statistical degrees of freedom.


