For a normal sample of size ,
Then and with . These two statistics are independent.
Combining the difference distribution and pooled variance calculation gives, with ,
The printed statistic has the sign of the centering term reversed. Its numerator subtracts , so it is not generally a central Student statistic; the corrected centering above is necessary. Under the null hypothesis , the two expressions coincide, so the requested test is unaffected. Reject the two-sided null at significance level when
Here and , so do not reject at the 5% level. This does not establish equality of the population means.
Age matching means that the two observations in a pair share an age effect, while ages vary across pairs. The independent, identically distributed two-sample model no longer represents this design: random pair effects induce within-pair dependence, and fixed differing ages can instead produce different individual means. Pairing by itself need not cause stochastic dependence when ages are treated as fixed. The appropriate alternative is a paired t-test on the within-pair differences. Removing shared age variation can reduce the noise and improve power when age strongly affects volume and the members of a pair are positively associated. Improvement is not automatic, since the paired test also uses fewer degrees of freedom.
For a normal sample of size ,
Then and with . These two statistics are independent.
Combining the difference distribution and pooled variance calculation gives, with ,
The printed statistic has the sign of the centering term reversed. Its numerator subtracts , so it is not generally a central Student statistic; the corrected centering above is necessary. Under the null hypothesis , the two expressions coincide, so the requested test is unaffected. Reject the two-sided null at significance level when
Here and , so do not reject at the 5% level. This does not establish equality of the population means.
Age matching means that the two observations in a pair share an age effect, while ages vary across pairs. The independent, identically distributed two-sample model no longer represents this design: random pair effects induce within-pair dependence, and fixed differing ages can instead produce different individual means. Pairing by itself need not cause stochastic dependence when ages are treated as fixed. The appropriate alternative is a paired t-test on the within-pair differences. Removing shared age variation can reduce the noise and improve power when age strongly affects volume and the members of a pair are positively associated. Improvement is not automatic, since the paired test also uses fewer degrees of freedom.
The log likelihood ratio statistic comparing the unrestricted fit with the independence fit is
The unrestricted model has free parameters. Independence has , so the difference is . By Wilks theorem, under the null hypothesis the statistic has asymptotically a chi-squared distribution with degrees of freedom, rather than , , or .
For the supplied statistic, the approximate p-value is . Thus reject independence at the 5% level, but not at the 1% level: the data provide evidence of an association. The approximation is reasonable here; the smallest fitted cell count is , so all fitted counts exceed . The statistical hypothesis test concerns association, not a causal effect of personality.
For independent Gaussian measurements with correctly specified standard deviations, model residuals give the chi-squared test statistic
For a linear fit of identifiable parameters under the null model, it has a chi-squared distribution with degrees of freedom. The upper-tail p-value tests unusually large residuals; a nonlinear fit generally uses this distribution only approximately. Correlated Gaussian errors instead require .
For counts, Pearson's chi-squared test uses , with calculated under the null hypothesis. For multinomial categories and fitted parameters the usual asymptotic degrees of freedom are ; the subtraction of one reflects the fixed total count. Sparse expected counts can invalidate this approximation, requiring a suitable exact or simulation-based test. Contingency-table independence gives degrees of freedom.
A small p-value indicates tension with the specified model and error assumptions; it is not the probability that the null is true. Excessive may reflect a wrong model, underestimated errors, correlations or outliers. An implausibly small value may suggest overestimated errors or hidden constraints. For an adequate fitted model is typically near one, with fluctuations, rather than required to equal one.
A chi-squared test compares squared deviations with the size expected from the assumed random errors. For independent observations with a normal distribution with known standard deviations and predictions , use
For a correct fixed model, the standardized independent residuals are unit-variance normal distributions, so has a chi-squared distribution with . Fitting independent linear parameters removes residual directions, giving . This distribution is exact for a full-rank linear model with known errors with a normal distribution; it is an approximation for many nonlinear fits. With known correlated errors with a multivariate normal distribution, replace the sum by , where is the covariance matrix and its rank and fitted constraints determine the available statistical degrees of freedom.
Under the null hypothesis, and . The reduced statistic should therefore be near one, with standard deviation , rather than equal to one exactly. An upper-tail p-value is
Compare it with a significance threshold chosen in advance. A small value indicates tension with the model together with its error assumptions; it can arise from a wrong mean model, underestimated uncertainties or neglected correlations. An unusually small statistic can suggest overestimated uncertainties, correlations or overfitting. A p-value is not the probability that the model is true, and failure to reject is not proof of the model.
For counts in categories, the Pearson form is . Its chi-squared distribution is an asymptotic approximation requiring adequate expected counts. For a fixed-total multinomial sample there is one normalization constraint, so the usual statistical degrees of freedom are after fitting other parameters. Independent Poisson bins instead start with statistical degrees of freedom before parameters are fitted. Sparse counts require an appropriate count likelihood or a calibrated exact or simulation-based test; plugging tiny expected counts into the asymptotic formula is unreliable. The error model, binning, fitted parameters and chosen test must therefore be reported with the result.
Assume independent background events at a known constant rate, so the background count follows a Poisson distribution. In five months its mean is . The null hypothesis of background alone assigns the observed upward fluctuation the P-value
Thus
The tail includes counts above eight because they would be at least as discrepant with the background-only prediction. Even the probability of exactly eight, , exceeds the specified threshold, though it is not the appropriate tail test. The Poisson tail discovery probability is a probability of data under a background model; it is not a posterior probability that the background model is true. This interprets the question's discovery rule in its usual statistical significance sense.
Up to a parameter-independent multinomial factor, the likelihood function is . A Lagrange multiplier for gives , whence and
Since all counts are positive, the log-likelihood function is strictly concave on the positive simplex and tends to minus infinity at its boundary, proving this is the unique maximum.
Under independence of random variables, , so the log-likelihood function separates as . Applying the same constrained maximization twice gives , , and
Twice the difference between the unrestricted and null maximized log-likelihood functions is
the required likelihood-ratio test statistic. Under the null hypothesis, its asymptotic chi-squared distribution has statistical degrees of freedom, the parameter-count difference . Here that is four. Since , reject independence at the 0.1 percent significance level. For four statistical degrees of freedom, the asymptotic upper-tail probability is . This establishes an association in these data; it is not a causal conclusion.
For a sample size define and . The normal-sample theorem gives
It also states that the mean and sample variance are independent. Combining (i) and (ii), and the independence across samples, the correctly centred pivot is
The source reverses the mean difference inside the subtraction. Its literal statistic is generally noncentral when , rather than having a central Student distribution. Under the null hypothesis both differences are zero, so this misprint does not change the requested null test.
For a two-sided level- test reject when . In the numerical example the pooled variance is , the standard error is , and . There are eight degrees of freedom and the supplied critical value is . Thus do not reject equal mean cell volume at the 5% level. This does not establish equality of the means; it states that the observed difference does not cross this test's two-sided threshold.
Age matching introduces a shared block factor: the two observations in a pair can be associated, and their age-dependent means also undermine the simple unblocked independent-samples model. A paired t-test on the within-pair drug-minus-placebo differences accounts for that design, assuming independent pairs and the corresponding normal-difference model. Shared age variation cancels in those differences; positive within-pair association reduces their variance and can increase power, although the reduction in degrees of freedom means improvement is not automatic. The paired test cannot be computed from the two marginal means and variances alone: the within-pair differences or covariance are needed.
For fixed , the likelihood ratio is strictly decreasing as increases. A likelihood-ratio test rejects for small , so its rejection rule is equivalently large . Under the null hypothesis, the standard normal distribution and chi-squared distribution results give independent quantities
Their ratio therefore has Student's t-distribution with statistical degrees of freedom. The exact level- rule is
This is precisely the two-sided Student's t-test; choosing the corresponding cutoff for yields the same rejection region and the same p-value.
Define and , with . The unrestricted maximum-likelihood estimates are and . Under the null hypothesis, maximizing the normal distribution's likelihood over the remaining variance gives
because the cross term vanishes when . At either fitted variance, the exponential factor in the likelihood function is , so it cancels in the ratio:
The standardized test statistic is
The sample variance uses divisor , whereas the maximum-likelihood estimate uses divisor ; this explains the in the final expression. Under a nondegenerate normal distribution, with probability one.
At the conventional significance level, Student 1's p-value gives no rejection of equal mean wear, while Student 2's p-value gives rejection of equal mean wear. The latter also rejects at the significance level. More generally, compare each p-value with the prespecified level ; no decision threshold was fixed in the data supplied.
Failure to reject does not establish equality, and a p-value is not the posterior probability that the null hypothesis is true. These two-sided p-values alone also do not identify which material has larger mean wear.
Put . For interior parameters , the alternative-to-null likelihood ratio is
The second base is greater than one, so this is strictly increasing in . The Neyman-Pearson lemma therefore gives an upper-tail rejection rule. Under the null hypothesis, , and an ordinary conservative threshold can be chosen as
There is an important discrete qualification: an integer cutoff need not have test size exactly . To obtain exact size, choose an integer with , reject certainly when , and at reject with probability
This randomized statistical test is a most powerful test at exact size ; when a binomial upper tail equals , no randomization is needed and the stated region is literal. Otherwise the unrandomized upper-tail region has size at most , and the exact-size result includes the boundary randomization. Endpoint parameter cases retain the same upper-tail ordering by taking limits, with ties resolved on the null-supported outcomes.
The sample mean has mean and variance . The central limit theorem gives a normal approximation for interior when both expected binomial counts are sufficiently large. Under the null hypothesis, a level- upper-tail cutoff is approximately
To obtain the power function, evaluate this same cutoff under the true statistical parameter , standardizing with :
Here is the standard normal distribution's cumulative distribution function. The formula treats the binomial threshold as continuous; exact integer cutoffs and boundary randomization are finite-sample refinements.
Let be the likelihood function, with full parameter space and null hypothesis . The generalized likelihood-ratio test compares the best null fit to the best unrestricted fit:
The likelihood ratio lies between zero and one, and small values count against the null hypothesis; equivalently, large values of the likelihood-ratio test statistic count against it.
Compute restricted and unrestricted maximum-likelihood estimates, evaluate their log-likelihoods, and form . Under the regular conditions of Wilks theorem, the null limit is
These statistical degrees of freedom count independent parameter restrictions. The regularity includes a locally identifiable smooth model, nonsingular Fisher information, and an interior null value; parameter-dependent support can invalidate the result.
For a chosen significance level , obtain the quantile of the chi-squared distribution and use
Equivalently, compare the asymptotic p-value to . This is a large-sample calibration; part (c) requires direct treatment because its support depends on a parameter.
For four categories the number of statistical degrees of freedom is . The supplied 5% critical value is therefore , and . Hence
The approximate p-value is . This conclusion assumes the large-sample multinomial approximation is adequate, in particular sufficiently large expected category counts. It means there is insufficient evidence against the uniform null hypothesis, rather than establishing that the probabilities are equal.
The count vector has a multinomial distribution, with likelihood function
Maximize its log-likelihood using a Lagrange multiplier for the sum constraint. The equations and give and . Since all counts are positive and the log-likelihood is strictly concave on the interior of the probability simplex, this is the global maximum-likelihood estimate.
Under the uniform null hypothesis, each category has expected count
The common multinomial coefficient cancels from the likelihood ratio:
Taking minus twice its logarithm gives exactly
There are free category probabilities, because their sum is one, and the null fixes all of them. Thus its regular asymptotic chi-squared distribution has statistical degrees of freedom.
Write , and . For nondegenerate data from the shifted exponential distribution, the likelihood function is
For fixed feasible , differentiating its log-likelihood with respect to gives
The derivative changes from positive to negative there. Substituting gives the profile likelihood , which increases with . Therefore the unrestricted maximum-likelihood estimates are
while under the null hypothesis the estimate is . Their likelihood ratio is
Since the likelihood-ratio test rejects for small , the requested form is obtained with
The formulas assume , which holds almost surely for a continuous sample with ; coincident observations give an unbounded unrestricted likelihood and can be treated by its supremum.
An exact calibration is available and also explains why Wilks theorem should not be applied here. Under the null, the memoryless property makes and independent gamma distributions with common scale and shapes and . By beta sampling by gamma ratios,
Consequently, for ,
This yields an exact test size , independent of the unknown scale. The support endpoint and boundary null make this a likelihood-ratio test for an exponential support endpoint, with a different calibration from a regular one-parameter test.
Let . For the exponential distribution with mean , the likelihood function is on positive observations. Fix any . The alternative-to-null likelihood ratio is
Since , this is strictly decreasing in . The Neyman-Pearson lemma says to reject for small . Under the null hypothesis, the given sum rule yields , where the second argument is a rate, and hence
Let be the lower quantile of this chi-squared distribution. The required critical region is
Its test size is exactly because the null distribution is continuous. Its cutoff is the same for every , so it is simultaneously most powerful against every such value: it is a uniformly most powerful test. Equivalently, reject if is below the lower quantile of the specified gamma distribution.
Under the null hypothesis, the full model has two free positive statistical parameters and the constrained model has one. The Wilks theorem therefore gives
as both sample sizes tend to infinity, with tending to a number strictly between zero and one. For the observed , calculate
The large-sample p-value is the upper-tail probability
where is the cumulative distribution function of the standard normal distribution. The last equality uses the fact that the square of a standard normal random variable has a chi-squared distribution with one statistical degree of freedom. Values of on either side of are already included by the transformation to .
Put , and . Independence gives the likelihood function
The unrestricted maximum-likelihood estimators are and . Under the null hypothesis, the common mean maximizes at . These are maxima because each one-parameter score function has the sign of its observed sum minus its sample size times its proposed mean.
Define the generalized likelihood ratio to be the constrained maximum divided by the unrestricted maximum. The exponential factors cancel, giving
Since and ,
It has maximum one at , when the two fitted means agree, and is small toward either endpoint. A likelihood-ratio test rejects for small , or equivalently large . This is the likelihood-ratio test for equality of exponential means.