With fixed , compare and by maximizing the ordinary likelihood function in both models. Their likelihood-ratio test statistic is unchanged by , , because both maximized log-likelihoods change by the same . Its null law can therefore be simulated using independent responses. Comparing the observed statistic with simulated statistics by gives a conservative finite-sample Monte Carlo p-value, subject to correctly maximizing both likelihoods.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 207 3 c iii Solution Created 2026-10-03 Updated 2026-10-05
Use one joint hypothesis test for . Fit the unrestricted model with statistical parameters , where and for treatment indicator . Refit under , estimating the two common baseline intensities; do not fix them at their unrestricted estimates. The likelihood-ratio test statistic isUnder regular identifiable positive-rate models, sufficient independent patient trajectories, and the null hypothesis, Wilks theorem gives two degrees of freedom because two coefficients are constrained. Reject if exceeds the chosen upper chi-squared distribution quantile. Alternatively a two-dimensional Wald test uses , including the off-diagonal covariance. Two separate tests do not provide this single calibrated assessment. The point estimates alone cannot produce a numerical p-value without fitted likelihoods or a coefficient covariance matrix.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 1 d Solution Created 2026-10-03 Updated 2026-10-05
There are two defects. The mixed fit supplies a restricted maximum likelihood, whereas the ordinary fit supplies an ordinary log-likelihood, so their difference is not a likelihood-ratio test statistic. Also, lies on the boundary of ; the usual Wilks theorem does not give a null law.
A valid approach first refits the mixed model by ordinary maximum likelihood estimation, setting REML to false, and fits the same fixed effects under . For , maximizeover , and separately over with . Set .
For finite-sample calibration, use the location-scale invariant simulation test for a Gaussian variance component. With the actual fixed, simulate independent vectors , refit both models by ordinary maximum likelihood estimation to each, and calculate in exactly the same way. Under , . Translating by a vector in the column space of and multiplying by a positive scalar preserves the statistic: both maximized log-likelihoods acquire the same scale constant. Thus this simulation has the correct null law without knowing or . A conservative Monte Carlo p-value isIn the usual regular limit with increasing independent groups, a variance-component likelihood-ratio test at a boundary instead uses : for , its approximate tail probability is , and at the nonrandomized p-value is one. This approximation is not an exact guarantee for sixteen rats. Alternatively one can compare consistently defined restricted likelihoods with the same and simulate their restricted-ratio null distribution, as in the RLRsim documentation.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 1 5J Solution Created 2026-09-24 Updated 2026-10-03
Write for the request count on day . Both fits are Poisson regression models with independentIn model 1,where the variables are indicator variables for winter, weekend, bank holiday, and low or medium pollution; non-winter weekdays that are not bank holidays and have high pollution form the baseline. Model 2 imposesretaining only winter and weekend effects.
The models are nested, and the likelihood-ratio test statistic is the decrease in residual deviance,There are three restrictions. By Wilks theorem, under this statistic is asymptotically a chi-squared distribution with three degrees of freedom. Sincewe reject model 2 at the level in favour of model 1.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 2 5J Solution Created 2026-09-24 Updated 2026-10-03
Let and be the residual sums of squares under the restricted model with coefficients and the full model with coefficients. Assuming has full column rank, the nested-model F-test usesUnder the null hypothesis this has the distribution.
Maximizing the Gaussian likelihood over and the unknown variance gives . Thus the likelihood-ratio test statistic isSincewe obtainThe logarithm is strictly increasing, so the two test statistics give exactly the same rejection ordering.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 1 13J c Solution Created 2026-09-24 Updated 2026-09-29
The null hypothesis is that price and score are independent, equivalently that the independence log-linear model for a two-way contingency table is correct. Against the saturated alternative, the reported Poisson deviance is the likelihood-ratio test statisticUnder the null and the usual large-sample regularity assumptions, Wilks theorem givesThe observations must be independent, the cell probabilities must not lie on the boundary of the parameter space, and the expected counts must be large enough for the chi-squared asymptotic approximation. The fitted counts are either or , so the customary expected-count check is comfortably satisfied. Since(equivalently, the p-value is about ), we do not reject the null at the significance level. The data provide no significant lack of fit for independence.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 4 13J b Solution Created 2026-09-24 Updated 2026-10-03
Testing a single nonnegative random-effect variance against zero puts the null on the boundary of the parameter space. In the usual regular increasing-independent-groups limit, the likelihood-ratio test statistic has limit , rather than . A finite-sample simulation calibrated for the actual design avoids relying on this asymptotic approximation.