Past exam of the mathematics course of the University of Cambridge 2002 ib Paper 4 3H Solution Created 2026-09-24 Updated 2026-10-14
Let be the number of failures in mix . The total observed failures are among blocks. Equal marginal failure probabilities give , regardless of dependence within a mix. Thus the unbiased estimator based on grouped Bernoulli failure counts isFor a conventional binomial confidence interval, additionally assume independent block outcomes. Then the total has binomial distribution and the estimated standard error is . The normal approximation gives the approximate 95 percent intervalOne can instead obtain an exact, generally conservative binomial interval by solving and for the two endpoints. These equations invert binomial tail tests.
Equal marginal probabilities alone do not imply independent blocks. If the mixes are independent but blocks within a mix can be dependent, use the sample variance of the 100 counts. Here and , so . The estimated variance of is ; its standard error is , giving the large-sample interval approximately . If even between-mix independence is absent, no stated model justifies either numerical coverage claim. The estimate remains unbiased, but the uncertainty calculation needs its sampling assumptions.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 36 1 ii Solution Created 2026-10-03 Updated 2026-10-14
Both fits are the same additive two-way analysis of variance model: a common intercept, five country effects represented by four contrasts, and eight item effects represented by seven contrasts. The three missing cells are omitted, leaving observations and model rank , hence residual degrees of freedom. The residual sum of squares is in either ordering, giving
These are sequential sums of squares, so each row measures the improvement when that factor is added after the preceding factors. The country-first sum describes its unadjusted contribution before accounting for item; its displayed and are not the country-adjusted-for-item test. When country is added after item, its extra sum is , givingThus the additive normal linear model gives strong evidence of country differences after accounting for the different products. Conversely, item added after country has extra sum , soThe printed zero for this probability is numerical formatting, not a probability literally equal to zero. Product differences are much larger than residual variation, as expected from their different scales.
The explanation for the order dependence is that missing cells can destroy factor orthogonality in two-way ANOVA. A complete equally replicated crossed design would make centered country and item indicator columns orthogonal. Here the missing observations change the item mix across countries and the country mix across items, so the two factor subspaces are not orthogonal. The two sequential partitions still have the same total explained sum: to the displayed precision. For inference about either factor conditional on the other, compare the full model with the reduced model that omits that factor, rather than interpreting its first-entry sum as adjusted evidence.
The omnibus country test does not identify the particular country contrasts. As an extension, fitting the supplied price table gives the item-adjusted UK-minus-US contrast about pounds, with standard error and an ordinary Gaussian-model confidence interval approximately pounds. This is a derived model contrast, with Student t-distribution reference on degrees of freedom; simultaneous exploration of many country pairs requires control for multiple hypothesis testing.
Check residuals against fitted values, product and country, together with a normal Q-Q plot and influential observations. The homoscedasticity assumption on absolute prices may be doubtful because expensive products can have larger absolute variation. A model for logarithmic prices gives multiplicative country effects and can make the scale assumption more plausible. Country-by-item interaction terms would allow discounts to differ by product, but there is at most one observed value per cell: an unrestricted interaction saturates the observed means and leaves no pure-error degrees of freedom, so it cannot be tested against independent measurement noise from these data alone. Additional products or genuine cell replication would support that extension. The selected products and non-random missing entries also limit claims about a whole country's consumer prices; the conditional inference is for the stated additive model and observed price collection.
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 2002 iii Paper 36 3 i Solution Created 2026-10-03 Updated 2026-10-14
Use for the expected accident count, not for the accident rate. With a design row consisting of an intercept, seven non-reference site indicators and the after-treatment indicator,Here is a known generalized linear model offset, with coefficient fixed at one. Differentiating the Poisson regression log-likelihood gives the score function equationsThese nine equations estimate the intercept, seven site contrasts and one treatment contrast, with the stated reference-level constraints.
The Fisher information is , where . A Fisher scoring update adds to the current coefficient vector. In iteratively reweighted least squares, the working response is ; regress on the design with weights . Thus the reported four iterations solve the likelihood equations while accounting for unequal exposure periods.
The common adjusted rate ratio is obtained by exponentiating the after coefficient:This estimates a lower accident rate after the intervention, conditional on the additive site model. The standard error gives normal Wald statistic , two-sided , and an approximate confidence interval for the rate ratioThe label t value is again a normal-reference Wald ratio under fixed Poisson dispersion, rather than an exact Student statistic.
The intercept gives the before rate at reference site one: accidents per year. The seven site coefficients are log baseline-rate ratios relative to that site. In site order two through eight, their exponentials are about . The third site has the largest estimated rate and a nominal Wald ratio about against the reference. These are adjusted baseline comparisons, not differences in absolute accident counts. The overall unadjusted before/after rate ratio is , and it differs from because site risks and their relative exposure weights differ.
An independent way to solve the fit is the profile likelihood for a common Poisson rate ratio with unequal exposures. Put and . For fixed , the site score gives . The remaining equation isIts positive root reproduces the reported treatment estimate. Comparing the same site model with to the fitted model gives a deviance improvement about on one degree of freedom, with nominal likelihood-ratio .
There are count observations and fitted mean parameters, leaving residual degrees of freedom. The null deviance on degrees of freedom is for the intercept-only rate model, still including the exposure offset. The residual Poisson deviance is on degrees of freedom. A chi-squared comparison gives approximately , suggesting potential lack of fit of a single common treatment ratio; the extreme deviance residuals near and also deserve inspection. Several after-cell expected counts are below one or near two, so this absolute-fit calibration is only approximate. Site-specific treatment effects, overdispersion or temporal dependence are possible explanations to investigate, with a parametric bootstrap available to calibrate the sparse-count fit statistic. A before/after association alone does not isolate a causal effect from secular changes or regression to the mean at selected sites.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 36 4 iv Solution Created 2026-10-03 Updated 2026-10-14
Use a generalized estimating equation with any well-behaved positive-definite working correlation matrix. Let collect the marginal intercept and slopes, let be the vector of three correct marginal means, and put . Write the working covariance as , where the proposed Poisson variance gives ; working independence is also allowed. SolveAt the true mean, each cluster residual has expectation zero, so the estimating equation is unbiased regardless of whether equals the actual covariance. With independent students, sufficient covariate variation and regularity as , this gives consistent mean coefficients.
Replace the model-based covariance by the cluster-level sandwich covariance matrix. Evaluated at the fitted values, defineThenThe residual outer products estimate the actual within-student variability, including correlations and extra-Poisson variance absent from the working model. Use these standard errors for asymptotic Wald tests and confidence intervals; exponentiating the treatment coefficient and its interval gives the mean-count rate ratio and interval. Treating the observations as independent when forming the sandwich meat would miss the within-student dependence. The effective asymptotic replication is the number of students, so a small number of clusters requires further finite-sample care rather than assuming that three measurements per student repair the large-sample approximation.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 38 6 iii Solution Created 2026-10-03 Updated 2026-10-14
An ancillary statistic has a sampling distribution independent of the unknown parameter. It describes a realized aspect of the sample configuration without supplying a marginal likelihood for the parameter. Its observed value can nevertheless be crucial to the precision of inference from the rest of the data. In a transitive transformation model, invariance gives a common distribution under every parameter value, so maximal invariants provide natural ancillaries, such as the standardized configuration in a location-scale family.
Conditional inference uses the sampling distribution of an estimator or sufficient statistic conditional on the observed ancillary. With joint coordinates , the factorizationshows that the conditional likelihood and the joint likelihood differ only by a parameter-free data factor. Conditional reference distributions, confidence intervals and p-values can still differ markedly from unconditional ones, because they adapt to the realized configuration. For a continuous ancillary one uses a regular conditional distribution or conditional density; dividing by the zero probability of a single ancillary value is not a valid definition.
An exact example makes this adaptation visible. Let independent observations be uniform on , with . Put , , and . Specifying the minimum and maximum contributes choices of observations, while each remaining observation must lie between them. HenceThe transformation , has unit absolute Jacobian determinant. Its support is , . Integrating over giveswhich is independent of , proving that the range is ancillary. Dividing the joint density by this marginal density givesThe centered conditional pivot is uniform, sohas conditional coverage at every , and hence unconditional coverage as well. A large realized range leaves little room for translating the interval and gives more precise inference. This is range-conditioned uniform location inference. The range and center are not independent: the conditional spread depends on the range, even though the range is ancillary.
Completeness can give independence in other models. Suppose is a complete sufficient statistic and is ancillary. For any bounded measurable , sufficiency makes a function independent of , while ancillarity makes independent of . Since for every , completeness implies almost surely. Taking all bounded indicator functions proves independence of and . This is the content of Basu's theorem, with the proof displaying precisely where sufficiency and completeness are used. Without completeness the conclusion fails: in the uniform location example the minimum and maximum are sufficient, and contain the nondegenerate ancillary range.
There are practical qualifications. Ancillaries need not be unique, and some models supply only approximate ancillary coordinates; one must specify the conditioning surface and the accuracy intended. Conditioning on a statistic sufficient for a nuisance parameter is a different device: it may remove that nuisance even though the statistic is not ancillary for the full parameter. Conditioning indiscriminately can discard useful information. In higher-order likelihood inference, the ancillary coordinates specify how the fitted data are varied, entering both the p* density and the sample derivatives in the modified profile likelihood. Their role is therefore substantive, rather than merely a label for an extra statistic.
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 40 3 ii Solution Created 2026-10-03 Updated 2026-10-14
- Different patients imply different baseline risks. Raw death rates confound performance with case mix, including urgency, disease severity and comorbidity. Use a prespecified, validated risk-adjusted provider comparison, standardizing to comparable patients or comparing observed deaths with . Check overlap and model calibration rather than assuming adjustment removes all confounding.
- Small annual volumes produce unstable rankings. A few deaths can move a surgeon far up or down a league table; zero deaths need not indicate zero risk. Display counts and suitably calibrated confidence intervals for binomial proportions, preferably in funnel plots against volume. Pool suitable periods or use a hierarchical Bayesian model to stabilize estimates, while allowing genuine time changes.
- Many simultaneous comparisons generate chance outliers. With independent null comparisons, the probability of at least one false positive is , and ranks amplify selection of extremes. Use multiple testing adjustments or simultaneous control limits and seek confirmation before interpreting an apparent outlier. Dependence through the national comparator must also be accounted for.
- The endpoint and unit of attribution can mislead. In-hospital death depends on discharge and transfer policy, and care is delivered by a team; follow-up after discharge is omitted. Use an independently audited fixed-horizon endpoint, such as a prespecified 30-day mortality outcome, linked across hospitals and to death registrations, and report an appropriate team or institutional comparison alongside any surgeon-level estimate. Reliable attribution and consistent inclusion criteria reduce incentives to manipulate coding or case selection.
A confidence interval containing the national rate does not demonstrate equivalence, and a raw ranking does not establish a causal performance difference. The improved presentation should convey precision and uncertainty as well as the estimated outcome.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 37 3 Solution Created 2026-10-03 Updated 2026-10-14
The first output uses the equal-variance, pooled Student's t-test, as shown by its seven statistical degrees of freedom. Its exact model assumes two independent samples from normal distributions, with means and a common unknown variance . The hypotheses are against . The sample means are and , and the unbiased within-sample sample variances areThe pooled sample variance and its resulting standard error areHenceTo justify its reference distribution, under the null is standard normal, while is , independently of the two sample means. Dividing the first variable by the square root of the second divided by seven gives the exact pooled two-sample t statistic, with Student t-distribution . Its one-sided p-value is the lower tailThe associated one-sided 95% confidence interval for isThe printed missing lower bound means that this is a one-sided upper confidence limit, not that a finite lower endpoint should be estimated. With such small samples the normality and common-variance assumptions matter; a Welch analysis would use a different variance estimate and generally different degrees of freedom.
The second output is the Wilcoxon rank sum test for two independent continuous samples. Under a common-distribution null hypothesis, labels are exchangeable conditional on the pooled values, so the four ranks assigned to the first sample form a uniformly chosen four-element subset of . The first sample receives ranks , giving raw rank sumEquivalently the Mann–Whitney U test statistic is , the number of cross-sample pairs with an observation larger than a observation. This output reports the raw rank sum, rather than the shifted statistic used by some software.
A first sample tending to be smaller has a small rank sum. Under the null, all rank allocations have equal probability. Only and have rank sum at most 11. By the exact rank-sum tail one above the minimum, the exact lower-tail p-value isNo large-sample normal approximation or continuity correction is involved; the absence of ties makes this simple enumeration valid. For a common-shape location-shift family, the test's alternative is a negative location shift of relative to . Without that model, the null is equality of distributions and the rank comparison is not simply a test of equality of means or medians.
Both tests reject at the 5% level in the direction of smaller observations; only the pooled t-test rejects at 1%. The t-test uses the numerical spacing and targets a mean difference under its normal model. The rank-sum test uses ordering and an exact exchangeability calculation, avoiding the normality and common-normal-variance assumptions. Their different p-values therefore reflect both different statistics and different modelling assumptions, not a numerical contradiction.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 37 5 ii b Solution Created 2026-10-03 Updated 2026-10-14
For a homogeneous continuous-time Markov chain, the holding time in a living state before the next transition has survival probability , where . Indeed, conditional on still occupying that state, the probability of leaving in the next is , so its survival function satisfies and . Integrating gives the mean holding time from a transition intensity matrix:This is the mean time until any allowed exit from that state, not necessarily the patient's remaining lifetime.
For confidence limits, use the supplied standard error of the corresponding diagonal generator estimate. Changing its sign does not change its standard error, so it is also the standard error of . The delta method, with derivative , givesThe resulting approximate 95% Wald confidence intervals areThe diagonal standard errors already incorporate the covariance among outgoing rates. They should not be replaced by the square root of a sum of squared off-diagonal standard errors, which would silently assume those rate estimates independent.
Alternatively construct a positive rate confidence interval and apply the confidence interval for an inverse rate transformation. Here every normal rate interval has a positive lower endpoint, givingThese approximate intervals are, respectively, , , and years. They are asymmetric because inversion is nonlinear; positive log-rate or likelihood-based intervals could also be inverted. The symmetric delta intervals and the inverted-rate intervals are two legitimate first-order approaches and need not have numerically identical endpoints.
The death state has zero exit rate, so its holding time is infinite. There is no finite mean-sojourn estimate or ordinary finite confidence interval for this structurally absorbing state. All intervals above concern the mean parameter, not a prediction interval for one patient's realized holding time.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 38 5 c Solution Created 2026-10-03 Updated 2026-10-14
Under the target model , the normal approximation givesThe pointwise 95% binomial funnel control limits are thereforeDraw these curves around the horizontal 20% target, as in the figure. At , the approximate limits are and , so B and H are outside the nominal bands; that is a signal for investigation, not proof of inferior or superior care. The bands use the target variance rather than each hospital's observed rate. They are control limits for possible observations under the target model, not confidence intervals centered on the observed points.
Normal coverage is approximate, especially for the small hospitals; clipping does not repair that approximation. Exact binomial tail limits can be used if exact calibration is needed.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 39 1 vi Solution Created 2026-10-03 Updated 2026-10-14
The asymptotic normality of the Watterson estimator gives approximate standard error . Thus precision at a fixed nonrecombining locus improves only logarithmically with sample size. To halve the asymptotic standard error, one needs , or roughly , rather than four times as many sampled chromosomes.
For large samples and positive , a plug-in normal approximation gives as an approximate 95% confidence interval. At low mutation counts it can perform poorly or give a negative endpoint; the exact count model is then preferable. Multiple independent, comparable loci can provide additional independent information, whereas tightly linked chromosomes still share the random ancestry at one locus. Genetic recombination, nonneutral evolution and changing population size require corresponding changes to the model.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 41 1 Solution Created 2026-10-03 Updated 2026-10-14
scan reads the numerical prices, including the three missing-value markers, into a vector. The data must be read row by row for the subsequent factor construction to match them. The sample size available for analysis is therefore , rather than . The numerical summary describes the observed prices: the sample median is £43.54 and the sample mean is £46.94. The upper tail, particularly the boots, raises the sample mean above the sample median. These summaries mix very different products and are not adjusted country comparisons.The two character scans create labels.
gl(8,5,length=40,labels=item) makes a regression factor with each of eight item labels repeated five times. gl(5,1,length=40,labels=country) cycles through the five country labels once for each item. For a regression factor and numerical response, the two plot commands produce grouped box plots. The country box plots suggest lower US prices, while the item box plots show particularly expensive boots and inexpensive cardigans. They are descriptive displays of this small basket, with different item compositions where prices are missing; they cannot separate country effects from item effects.The first
lm fits an additive two-way analysis of variance:The constraints are R's usual treatment coding. The normal linear model used for the printed tests assumes independent errors with common variance and approximately a normal distribution, and no item-by-country interaction in the mean. Missing prices are omitted, leaving responses and independent mean coefficients. Thus the residual degrees of freedom are . This deletion is defensible for the conditional price model when missingness does not depend on the unobserved error after conditioning on the two factors; the output itself does not establish such a missing-data mechanism.The
anova tables report sequential sums of squares, rather than order-independent adjusted effects. If are the residual sums of squares from the intercept-only, country-only, item-only and additive fits, the first order allocates to country and to item. The second order allocates to item and to country. Both allocations sum to the same total explained sum of squares, and both end with the same residual sum of squares . The three missing combinations destroy balanced factorial orthogonality, so the allocation changes with order. To test country after allowing for items, use the country row in the second table; to test item after allowing for countries, use the item row in the first table. The first-entered rows do not supply those adjusted tests.Each mean square in ANOVA divides its sum of squares in ANOVA by its statistical degrees of freedom, and each printed F-statistic divides that mean square in ANOVA by . In particular, the adjusted country partial F-test haswith an reference F-distribution and p-value approximately . The adjusted item partial F-test gives on statistical degrees of freedom. Both factors contribute strongly under the additive normal linear model. The larger item sum of squares in ANOVA measures the much greater differences between these products, but is not evidence that every pair of items differs significantly.
The intercept is the fitted UK price for the reference jeans, not their observed price and not the overall sample mean. Each country regression coefficient is its adjusted price difference from the UK, assumed common across items: Sweden is £5.224 lower, France £10.708 lower, Germany £7.676 lower and the US £21.328 lower. Each item regression coefficient is its adjusted difference from the reference jeans, assumed common across countries. Thus the fitted UK boots price is , and the fitted US boots price is .
The coefficient standard errors come from , where and is the design matrix. Dividing each estimate by its standard error gives the displayed Student t-test statistic, with statistical degrees of freedom. The stars summarize the corresponding two-sided p-values. The individual tests compare each indicated country or item with its reference level, conditional on all other additive terms; they are neither tests of every pairwise comparison nor a simultaneous confidence interval procedure. In particular, Sweden's p-value provides weaker evidence than the other country contrasts, and does not establish equality with the UK. The intercept test has little substantive relevance, and interpreting many individual stars also raises multiple hypothesis testing issues.
The residual standard error measures unexplained prices in pounds. With total corrected sum of squares , the coefficient of determination and adjusted coefficient of determination areMuch of this impressive fit is due to the large differences between items. The overall F-test compares the additive fit with a constant mean: on statistical degrees of freedom. It tests that all eleven non-intercept coefficients vanish, not that the additive model is adequate. Regression diagnostics should examine regression residuals, changing price variability across items and possible interaction. Percentage differences may be more plausible than common pound differences, motivating a natural logarithm of price. No random sample of countries or products, and no independent replication of a price within a cell, is supplied; broad claims about all designer goods or the causes of country differences require more than these conditional tests.
Finally,
Item*Country expands to both main effects and their full interaction. A cell-means parameterization has one separate fitted mean for every observed cell. With one response per cell its design matrix has row matrix rank , while the full layout nominally has coefficients. Three coefficient combinations are aliased because their cells are missing. This is saturation of an unreplicated two-factor regression: every observed price is fitted exactly and the residual degrees of freedom are zero. The final fit has zero residuals, and no residual-based estimate of the error variance or ordinary interaction significance test. The printed numerical summary will mark three coefficients unestimable; coefficient standard errors, tests and adjusted involve undefined division by zero, potentially appearing as NaN or Inf according to numerical roundoff. Perfect interpolation here is a consequence of a saturated statistical model, not evidence for a superior predictive model. 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 2005 iii Paper 41 5 iii Solution Created 2026-10-03 Updated 2026-10-14
The incremental cost-effectiveness ratio must be read with the signs of both increments. A negative ratio can mean either greater effectiveness at lower cost, which is favorable, or lower effectiveness at greater cost, which is unfavorable. A positive ratio can likewise lie in either the more-costly/more-effective or cheaper/less-effective quadrant. Thus ordering ratio values without locating the cost-effectiveness plane quadrant can reverse a decision.
The incremental cost-effectiveness ratio is undefined at a zero effect increment and extremely unstable near it. Its sampling distribution can be highly skewed and its mean may fail to exist; a usual symmetric confidence interval or an interval spanning positive and negative ratios can conceal that instability. Cost-effect correlation must be retained, as the Fieller confidence set calculation illustrates.
Interpretation also requires a specified comparator, effect unit, costing perspective, follow-up horizon and willingness-to-pay threshold. Different comparator choices give different incremental ratios, and lower ratios alone do not settle decisions across differently scaled outcomes. Longer survival need not mean a proportional quality-of-life gain; extrapolation, censored outcomes and omitted costs can affect the increments. Point estimates conceal both sampling uncertainty and uncertainty in these assumptions.
For a positive effect increment, comparison with a threshold is equivalent to . For negative effect increments that inequality reverses when multiplied by , so a rule that blindly compares all ratios with is wrong. Use the signs and joint cost/effect uncertainty, or the incremental net monetary benefit , rather than the ratio alone. No particular threshold is given in the paper, so the point estimate does not establish whether reimbursement should occur.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 41 5 ii Solution Created 2026-10-03 Updated 2026-10-14
Assume the two trial arms are independent samples, their cost and survival means have a valid joint normal approximation, and the supplied standard errors and correlation coefficient estimate the joint uncertainty in their mean differences. This could follow from a central limit theorem for patient-level cost/survival pairs, with finite second moments and suitably handled survival follow-up. The supplied covariance matrix for isThe off-diagonal entry has units pounds times days, and must not be discarded. Independence of trial arms does not mean cost and survival increments are independent: patient-level cost and survival are paired within each arm.
For a proposed ratio , the null assertion is . Its estimated variance is . Fieller's theorem inverts the associated two-sided normal tests. With , retain whenExpanding givesThe leading coefficient is positive, since ; the effect increment is separated from zero at this level. With , the polynomial is approximatelyIt is nonpositive between its two real roots. The resulting approximate Fieller confidence set is therefore a bounded confidence interval:On the -day life-year scale the endpoints are approximately £9,133 and £36,376. Exact coverage would need an exact pivot with its corresponding critical value; using estimated covariance and a central limit theorem makes this an asymptotic interval. In other data, a poorly determined denominator can give unbounded or disconnected Fieller confidence sets, which should not be replaced by an artificially bounded interval.
An alternative is a paired bootstrap: independently resample patients within each randomized arm, keeping each patient's cost and survival together; recompute both mean differences and their ratio in each replicate. The and empirical ratio quantiles give a percentile bootstrap confidence interval. The raw paired data are needed to calculate it, so the numerical endpoints cannot be obtained from this summary table alone. Near-zero bootstrap effect increments or sign changes warn that ordinary ratio-percentile intervals may be unreliable; one should retain the joint cost/effect uncertainty or invert a suitable bootstrap test instead.
A simpler first-order alternative is the delta method. For , the gradient is , givingThe resulting approximate Wald confidence interval is pounds per day. Its symmetric first-order form misses the denominator's nonlinear effect, explaining its marked difference from the Fieller confidence set; it is not the preferred ratio interval here.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 44 5 c Solution Created 2026-10-03 Updated 2026-10-14
Use the original PDF's value ; the TeX aid misreads its last digit. In the fitted conditional mixture, means that about 57.5% are assigned to the structural-zero, or modelled cured, component. Its asymptotic 95% confidence interval of shows substantial uncertainty about that fraction. An observed post-treatment zero alone is not proof of cure, since the non-cured Poisson distribution can also produce zero.
The parameter is a conditional allocation probability, not the ratio of post-treatment to pre-treatment means. That ratio among non-cured patients is . HenceThe map is strictly increasing, so transform the endpoints of the supplied 95% confidence interval:No change in the non-cured mean is , equivalently , which lies in this interval. Thus the point estimate suggests a reduction, but this interval does not firmly establish one among the non-cured patients at the corresponding two-sided 5% level. It is not correct to describe itself as a 61.4% reduction in their mean count.
Under a full pre-conditioning mixture with cure independent of the baseline rate, the population mean ratio would be , whose plug-in value is about . This combines disappearance of counts in one component with a change of rate in the other; it is distinct from the conditional estimate's direct interpretation. The two marginal confidence intervals cannot simply be multiplied to obtain a calibrated joint 95% interval for this derived quantity.
Only 12 patients were observed, so the asymptotic intervals, particularly for a mixture parameter near a boundary, should be interpreted cautiously. The data describe one-minute counts and do not establish permanent cure. Nor does an uncontrolled before-and-after comparison alone prove a causal effect of the drug: natural count variability, secular changes and regression to the mean remain possible. The structural-zero interpretation and the reduction among non-cured patients are conclusions within the specified statistical model.