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 satisfy
The 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 independent samples from normal distributions with separate unknown means, test equal variances against . Profiling the means gives sample means. Under the null the variance maximum is ; the separate maxima are and . If the latter obey the proposed order, their likelihood quotient is
It decreases strictly as increases. Otherwise the ordered alternative maximum lies on the equal-variance boundary and the quotient is one. Under the null, Cochran's theorem gives independent chi-squared residual sums with degrees , so rejection is in the upper tail of the displayed F-distribution statistic, calibrated at the desired significance level.
Write for the all-ones vector and set
The centering assumption makes . Thus the full normal linear model has fitted-value orthogonal projection , and its residual sum of squares is . Assume , as is needed to estimate the unknown error variance from residuals.
For the null that all slopes vanish, the reduced fitted value is , with residual sum of squares . The F-test is
Reject for an upper-tail value exceeding the quantile of this F-distribution. The required theorem is Cochran's theorem: for an isotropic normal distribution, projections onto orthogonal subspaces are independent, and the squared norm on a rank- subspace divided by has a chi-squared distribution with degrees of freedom. Here the null makes the projected mean in zero, so , independently of .
Let be the numbers of columns in the two predictor blocks. To test the first block while retaining the second as nuisance, form
The partial F-test for nested linear models is
Again reject in the upper tail. The difference of the nested fitted-value projections has rank , is orthogonal to the full residual projection, and annihilates the null mean, which gives the same independent chi-squared argument. If a block has no columns, the corresponding test is vacuous.
The phrase orthogonal statistical parameters refers to zero cross-block Fisher information, not to the numerical parameter vectors being perpendicular. In this model the cross-block information is , so the orthogonal coefficient blocks in a centered normal linear model condition is
Then the two fitted subspaces are orthogonal, the block least-squares estimators have zero covariance and are independent because they are jointly Gaussian, and each block's extra sum of squares is unchanged by including the other block. Centering also makes both blocks orthogonal to the intercept.
Assume the two normal samples are independent. Write , , and let denote their residual sums of squares about the respective sample means. The joint likelihood function, apart from its constant factor, is
where , . For every fixed variance pair the means maximize this likelihood at , because , and likewise for .
Under equal variances, differentiate the profiled log-likelihood to obtain . Without the order constraint, the separate variance maxima are , . If they lie in the alternative. If their order is reversed, maximizing over puts the optimum on the equal-variance boundary. These assertions also follow by strict concavity in the precisions .
Thus the one-sided likelihood-ratio test for two normal variances uses the quotient of the null maximum to the maximum over null and ordered alternative:
To identify the rejection direction, put . Up to constants, . Its derivative is , negative on the ordered branch . Hence small likelihood ratios mean a large sample variance ratio.
The null law must account for estimating both means. By Cochran's theorem, and are independent random variables with chi-squared distributions of 5 and 20 degrees of freedom. Consequently the exact null statistic is
It is an increasing multiple of , so an upper-tail critical region is the likelihood-ratio rejection region. The observed statistic is . The supplied 95th percentile is 2.71, so
The F-distribution degrees of freedom are , not , although the variance maximum-likelihood estimates themselves have denominators .
Minimizing the residual sum of squares gives the least-squares normal equations . Since the design matrix has full column rank, has a matrix inverse, so
The sampling distribution follows because a linear transformation of a multivariate normal distribution is again a multivariate normal distribution. Its expectation is , and its covariance matrix is .
The hat matrix is . It is the orthogonal projection matrix onto the column space of : , and . Thus the regression residuals are , with
This is fitted-residual orthogonality. The vectors are jointly normal, so independence of uncorrelated jointly normal variables strengthens both zero-covariance statements to independence.
For the quadratic linear regression, the columns of the design matrix are . The replicated design gives
For , the variance of a fitted regression mean is , hence
Writing , this is the quadratic . Its derivative vanishes at ; it decreases before that point and increases afterwards. Therefore the maximum is at , and the minimum is at .
At , and the expected yield is . The unbiased residual variance estimate is . By Cochran's theorem, independently of , giving the Student t confidence interval
The interval estimates the expected yield, so it uses the variance of a fitted regression mean without an additional future-observation error term. The supplied summary determines the half-width but does not give a numerical value of .
The Gaussian log likelihood function, apart from a constant, is
Differentiating in gives . Full column rank makes invertible, so
The distribution follows by applying this linear map to the Gaussian error vector. Differentiating the profiled likelihood function in gives
For its distribution, is symmetric idempotent, and the residual is . The needed form of Cochran's theorem says that quadratic forms in a standard Gaussian vector associated with orthogonal symmetric projection matrices summing to identity are independent random variables with chi-squared distributions with degrees equal to their ranks. Applying it to and gives
Thus the maximum-likelihood variance estimate uses divisor and has expectation ; the unbiased residual estimate would use divisor . The fitted coefficient and residual quadratic form are also independent.
A useful full statement is the rank-sum form of Cochran's theorem. Let and let be real symmetric matrices satisfying . Put and . Then , and the following conditions are equivalent: the ranks sum to ; the are orthogonal projection matrices with mutually orthogonal ranges; and the are independent, with . A rank-zero form is identically zero. In particular, the usual projection version of Cochran's theorem partitions the squared length of a standard normal vector into independent chi-squared distributions.
Here is a proof which also explains the rank condition. Let . Since every vector satisfies , the spaces span . Therefore their dimensions sum to at least . If they sum to , their sum is a direct sum, so every vector has a unique decomposition into vectors belonging to the . For , the identity is one such decomposition, while the decomposition with just in position and zero elsewhere is another. Uniqueness gives . Thus
A symmetric matrix with this idempotence is an orthogonal projection matrix. Its different ranges are orthogonal: for , , their inner product is . Choose an orthonormal basis for each range and concatenate them. The resulting change-of-basis matrix is an orthogonal matrix. In these coordinates, each is the sum of squares of the coordinates belonging to its range.
The transformed multivariate normal distribution still has density proportional to , which factors into the standard normal densities of its coordinates. The coordinates are independent, so the disjoint groups of squared coordinates give independent chi-squared distributions of the asserted degrees of freedom. This proves the forward implication. Conversely, if the have the asserted chi-squared laws, then , while has expectation . Taking expectations yields . This completes the equivalence and the proof of Cochran's theorem.
For the application, specify a normal linear model
with fixed full-column-rank design matrix of size , , unrestricted , and unknown . Test against , where has independent rows, , and is specified. The null contains an affine space of means of dimension , whereas the full mean space has dimension .
Let be the ordinary least squares and maximum-likelihood estimate in the full model, and write . The constrained estimate follows by minimizing the residual squared length under :
Indeed, and the correction is the required constrained projection in the inner product. The least-squares normal equations give the Pythagorean decomposition
Consequently the explicit residual quantities in the likelihood-ratio test statistic are
Here is the full-model residual sum of squares, and is the increase caused by imposing the null restrictions.
To see the geometry behind Cochran's theorem, choose any with , and let project onto and onto . For ,
The projectors and are orthogonal and have ranks and . Under , the mean of belongs to , so both of these projectors annihilate it. Thus Cochran's theorem gives
The nuisance variance cancels in the nested-model F-test statistic
Since the likelihood-ratio test statistic is
it is a strictly increasing function of . Therefore an exact level- likelihood-ratio test rejects when , where the right-hand side is the upper reference quantile of the F-distribution. This calibration is exact under the normal linear model, rather than an asymptotic chi-squared replacement.
Assume , so the residual sum of squares is positive almost surely. Write and . The log-likelihood is
The decomposition shows that, at every fixed positive variance, its constrained maximum-likelihood estimate of the mean is . Substituting this mean and differentiating with respect to the variance gives
The denominator is required by maximum likelihood estimation; is the unbiased variance estimate, which is a different estimator.
Under the null variance , maximize over the same mean . Subtracting the null maximum log-likelihood from the unrestricted maximum gives the likelihood-ratio test statistic
By Cochran's theorem, the residual sum of squares in a normal sample satisfies under the null. Set , so . Then
The normal mean is a nuisance parameter, but this null law does not depend on it.
A Bartlett correction removes the first-order discrepancy between the null mean of a regular likelihood-ratio test statistic and the degrees of freedom of its limiting chi-squared distribution. In the convention used here, if the limiting degrees of freedom are and
then is the Bartlett correction coefficient, also called the Bartlett correction factor, and the Bartlett-corrected likelihood-ratio statistic is . Its null mean is . The finite- divisor is , rather than itself. There is one restriction on the variance here, so .
Expand the logarithm around and use the permitted termwise asymptotic integration:
Using the supplied raw moments of the chi-squared distribution and expanding gives
For instance, and give the first formula after subtracting . The same binomial expansion, using the raw third and fourth moments, gives the other two formulas.
We must justify why higher moments cannot change the coefficient. Represent for independent standard normal variables, and put . Each is centered and has all absolute moments finite. With , one has . The supplied centered-sum bounds say, for each fixed integer ,
Also and . Therefore, for every fixed , expanding gives
These are bounds on the absolute values of signed moments; the odd-moment estimate must not be misread as a bound on . In particular, each fixed Taylor term of degree has or smaller. Combined with the question's permission to integrate the asymptotic expansion term by term, this controls the higher-order contribution at the required order. It does not require a globally convergent Taylor series for every realized .
Substituting the first three moment formulas now gives
Thus the Bartlett correction for a normal variance with unknown mean is
Its null mean is , and the usual reference law is . Keeping the estimated mean's loss of one residual degree of freedom, and using the maximum-likelihood variance divisor , are both essential to the coefficient .
Assume , the ordinary nonsaturated Gaussian linear model. The log likelihood is, up to a constant,
The normal equations and full column rank give the least-squares estimator . Write and , an orthogonal projection of rank . Maximizing in yields
Since , the residual sum of squares is . Expanding its expectation uses only :
This does not use Cochran's theorem. It proves bias and gives
In the saturated case , residuals vanish identically, the likelihood is unbounded as the positive variance tends to zero, and the unbiased residual estimator is unavailable. Thus the usual variance-estimation request requires .
For the normal linear model, the log-likelihood is
The full column rank of the design matrix makes invertible. Differentiating in gives the normal equations . With the minimized residual sum of squares substituted, differentiation in gives
These are the maximum-likelihood estimators almost surely; almost surely when and . The linear transformation of the multivariate normal distribution yields
Define the hat matrix . The fitted values are , the regression residuals are , and . The orthogonal projection has rank and annihilates . By Cochran's theorem,
Consequently , with bias . The unbiased estimator is
Its square root, the reported residual standard error, estimates ; the assertion of unbiasedness applies to the variance, not generally to its square root.
For the paper-strength analysis, let be the measured percentage and . Both normal linear models use independent errors of common variance . Their mean functions are for lm1, and for lm2, with separately fitted coefficients. The reported residual standard errors are and , respectively.
For lm1, the estimated conditional expectation at a new percentage is
The original data mean must be used for centering the new percentage; its numerical value is not supplied in the excerpt. Because , the two columns of this design matrix are orthogonal, and . Hence the coefficient standard errors in the output give
This estimates uncertainty in the mean. Predicting an individual future batch would additionally require the new-error variance, estimated by .
To compare the nested normal linear models, test against within the quadratic model. The Student t-test statistic is
Its two-sided p-value is . Equivalently is a partial F-test statistic with null distribution . Reject the linear restriction and prefer lm2 at the 5% level. Its residual spread is much smaller; the increase in the coefficient of determination from to supports the same conclusion, although the test is the relevant complexity-adjusted comparison.
For regression diagnostics, inspect regression residuals against fitted means and hardwood percentage for omitted curvature, a scale-location plot for nonconstant variance, and a quantile-quantile plot against the normal distribution for departures from the error assumption. Check unusual observations using regression leverage and Cook's distance, and examine residuals in collection or batch order if dependence is plausible. Independence and a common variance require substantive justification as well as these plots; a small p-value for a polynomial term does not itself check the error model.
The command performs a nested-model F-test for against , retaining the intercept and coefficient in both models. Write and for the residual sum of squares in the reduced and full fits. Under and the independent normal-error assumptions,
By Cochran's theorem, the numerator and denominator are independent scaled chi-squares with one and degrees of freedom. Equivalently, for this single-coefficient restriction, , so its p-value equals that of the two-sided coefficient Student's t-test in model3.
Using the printed value gives and . The printed estimate and standard error instead give
This discrepancy is present in the PDF and is too large to be explained by rounding at the shown precision; the underlying ANOVA output is omitted, so an exact unique statistic cannot be recovered. The univariate correlation and value imply , consistent with after rounding. With denominator degrees of freedom 97, the two versions give p-values approximately and , respectively. Either way the partial effect is not significant at 5%.
The sample mean is
Write the Gaussian sample vector as its orthogonal projection onto the span of plus its projection onto the orthogonal complement. These two Gaussian projections are independent. Their squared standardized lengths give Cochran's theorem:
The hat matrix is an orthogonal projection of rank , so is an orthogonal projection of rank . Because is a standard multivariate normal distribution vector, Cochran's theorem gives
Thus . Substituting this into the preceding formula gives the Distribution of the Akaike information criterion in a normal linear model:
Since is an affine transformation of ,
The residual projection has rank . Cochran's theorem therefore gives
The derivative of the log ratio is , so increases from zero to one on and decreases to zero on . Rejecting for a sufficiently small ratio therefore gives two tails with .
Under , Cochran's theorem gives the exact sampling distribution , independently of the unknown mean. Writing for its cumulative distribution function, the two cutoffs are determined by
The first equation calibrates the exact size of a statistical test. The second is , so both tails belong to one likelihood ratio cutoff. Hence the exact critical region is . Its two tail probabilities are not generally equal: equal-tailed chi-squared cutoffs give a different test.