Jackknife resampling 2026-10-14
The delete-one form of jackknife resampling recalculates a statistic after deleting each observation in turn. It uses one observed statistical sample to investigate how sensitive an estimator is to its individual observations, and supplies both a jackknife variance estimator and jackknife bias correction. The calculations are deterministic once the data are fixed: no random draws are needed.
In the basic setting, are independent and identically distributed random variables, with sample size . Let be the observed values and a scalar estimator of an estimand . Apply the same estimation rule to each reduced statistical sample, using its new sample size wherever the rule requires it:
Every index is deleted exactly once; an unusual value is treated by the same rule as every other value. The mean summarizes the deletion estimates. They overlap in observations, so they are generally not independent random variables representing fresh repetitions of the original experiment. Cosma Shalizi's [ref] explain this construction and its scaling.
For a concrete sample mean, use the data , whose full sample mean is . The five deletion sample means, in observation order, are
Deleting raises the sample mean by , while deleting lowers the sample mean by . Thus has the largest deletion effect in this statistical sample. This is a descriptive sensitivity calculation, not a rule for removing that observation: the full sample mean remains .
Figure 1.
Delete each observation once and recompute the sample mean
. The left panel shows all five reduced statistical samples from ; each crossed entry is omitted only for that row. The right panel shows their sample means against the full sample mean . The orange row makes the deletion effect of visible. Details.
Early literature includes M. H. Quenouille's [ref] and John W. Tukey's one-paragraph abstract [ref], within the issue's collected abstracts. Shalizi's [ref] discuss the later development of jackknife bias correction and the jackknife variance estimator.
For an empirical distribution function and a specified cumulative distribution function , the one-sample Kolmogorov-Smirnov statistic is their Kolmogorov distance:
The displayed sum uses an indicator function. With this convention, is right-continuous. For distinct observations, its value and its left one-sided limit at the th order statistic are and .
For continuous , both jump sides matter. Define the two directional discrepancies by
Thus uses the empirical distribution function immediately after a jump, and uses its left one-sided limit.[ref] A supremum need not be attained.
For , on , and the stipulated order statistics , the complete calculation is
The last two columns give the signed directional gaps: , , and . In contrast, checking only gives and misses the largest gap approached as . At itself, the gap has already fallen to .
Figure 1.
Both jump sides determine the exact Kolmogorov-Smirnov statistic
. The empirical distribution function for four stipulated rational observations is compared with the uniform distribution on . Open circles show left one-sided limits; filled circles show values at jumps. The green gap is and the magenta gap is the limiting . Details.
The finite formula follows from the behavior between jumps: the empirical distribution function is constant and the cumulative distribution function is monotone, so the largest directional gaps occur at the two interval ends, possibly as one-sided limits. The two tails introduce no larger gap. Checking every jump side therefore gives the exact supremum.
A common normalized Kolmogorov-Smirnov statistic is , which equals in this example. Its large-sample reference law comes from the Kolmogorov-Smirnov theorem. The unscaled remains the largest difference of cumulative probabilities, not a p-value.
There is a useful exact exception to the usual warning about fitting statistical parameters. Suppose independent and identically distributed observations have the uniform distribution on with unknown . Let and let be the label of its almost surely unique maximizing observation. Conditional on and , the surviving labelled observations are independent with the uniform distribution on ; after division by they are independent and identically distributed uniforms on . These are conditional distributions defined by probability density functions, since the event has probability zero.
To check this, the joint probability density function of and is for . Dividing the original joint probability density function by this factor gives the conditional survivor probability density function
This factorization proves the claimed conditional independence; scaling removes . Keep the surviving labels in a fixed order, or apply an independent random permutation. The sorted survivors instead have the joint law of uniform order statistics and exhibit statistical dependence; sorting does not affect their empirical distribution function. Delete the maximum itself, which would otherwise become a forced value , and compute the Kolmogorov-Smirnov statistic using sample size and jump heights . This gives an exact conditional Kolmogorov-Smirnov test under the uniform-endpoint statistical model. It does not justify fitting an arbitrary endpoint or other statistical parameters and using the ordinary -sample calibration.
Kolmogorov-Smirnov test 2026-10-14
The one-sample Kolmogorov-Smirnov test checks goodness of fit by comparing an empirical distribution function with a specified cumulative distribution function . Its Kolmogorov-Smirnov statistic is the largest vertical gap anywhere between the two curves. Every threshold asks the same concrete question: what proportion of the observations are at or below it, and what probability does the proposed probability distribution assign there? A large discrepancy supplies evidence against the null hypothesis.
For example, four stipulated observations compared with the uniform distribution on give . Just before , only two observations have been counted, so the empirical distribution function approaches , while approaches . The Kolmogorov-Smirnov statistic section calculates every jump-side gap. These are exact illustrative numbers, not experimental measurements or a claim of statistical significance.
The ordinary one-sample calibration assumes independent and identically distributed real observations and a simple hypothesis , with a continuous function fixed before inspecting these observations. All statistical parameters of must be specified.[ref] Under that null hypothesis, the probability integral transform gives with the uniform distribution on , retaining independence. Consequently the sampling distribution of depends on the sample size , but not on the particular continuous . This is the useful sense in which the calibration is distribution-free.
For the exponential distribution of rate one, for . Take for the four stipulated above. The probability integral transform changes the horizontal coordinates but preserves both the order statistics and their cumulative heights, so the same Kolmogorov-Smirnov statistic appears on both scales. More generally, for continuous , the jump-side formulas depend only on . Strict increase everywhere is unnecessary: intervals on which is constant have probability zero under the null hypothesis. This explains the invariance without assuming a strictly positive probability density function.
Figure 1.
The probability integral transform preserves the Kolmogorov-Smirnov gap on exponential and uniform scales
. The same four stipulated points are shown as on the left and on the right. Open circles indicate left limits of the empirical distribution function, filled circles its values. The gap is approached from below the third observation on both scales. Details.
The observed Kolmogorov-Smirnov statistic is a discrepancy, whereas its p-value is a tail probability under the null hypothesis:
Here is computed from a fresh sample of the same sample size. Choose a significance level before the test and reject when the calibrated p-value is at most . The value alone supplies neither a p-value nor a rejection decision. Failure to reject does not establish that the null hypothesis is true. A finite-sample calibration and the asymptotic Kolmogorov-Smirnov theorem are distinct; a cutoff for must be rescaled before use with .[ref]
Fitting statistical parameters on the tested observations replaces by the random . The resulting transformed observations need not be independent and identically distributed uniforms, so the ordinary reference law fails. The Lilliefors test addresses a particular fitted normal distribution. More general parametric bootstrap calibration must simulate from the fitted statistical model and repeat the fitting in every replicate; holding the fitted statistical parameters fixed during those comparisons calibrates a different procedure. Such a parametric bootstrap requires its own validity justification rather than inheriting exactness from the simple-null test.
For a discrete probability distribution, is generally not uniform. Equal observations also arise from rounding, so tied data require a calibration that accounts for the discrete probability distribution or the rounding rule. The discrepancy remains meaningful, but continuous-null p-values are not automatically valid. Statistical dependence likewise changes the reference law. The two-sample Kolmogorov-Smirnov test compares two empirical distribution functions and has a different calibration.[ref]
Linkage disequilibrium 2026-10-13
Linkage disequilibrium means that knowing an allele at one genetic locus changes the probability of an allele at another genetic locus in population haplotypes. It compares their joint probability distribution with the product of their marginal distributions. This is useful because a genetic marker can carry information about another genetic locus: tag SNPs exploit this redundancy, without establishing a causal genetic association.
Consider two genetic loci with alleles and . Sample one haplotype, rather than an unphased diploid genotype. Write its four haplotype frequencies as , summing to one, and set the marginal allele frequencies to and . The linkage disequilibrium coefficient is
The second expression follows by substituting . The entire two-locus joint probability distribution is then
Every row and column sum is unchanged when varies. Linkage equilibrium means : all four haplotype frequencies equal products of allele frequencies, so the two allele indicators are independent random variables. For , the conditional probability shows directly how positive enriches among copies carrying , while negative depletes it. Positive also enriches ; negative enriches and . Swapping the labels and reverses the sign of , so neither sign is intrinsically favorable.
For example, fix the allele frequencies at . At linkage equilibrium, the haplotype frequencies in the order are . Positive linkage disequilibrium instead gives , with ; negative linkage disequilibrium gives , with . Counting each allele separately would miss the difference.
Nonnegative haplotype frequencies constrain . Define the nonnegative bounds and . The four entries above give
Thus globally, but a particular pair of allele frequencies usually permits a smaller, asymmetric interval. The standardized linkage disequilibrium convention used here retains the sign:
This convention requires ; if either genetic locus has only one allele in the population, but normalized measures are undefined. Some presentations report only . At or , at least one of the four haplotypes has zero frequency; this alone does not prove that genetic recombination has never occurred.
For the indicator random variables and , their covariance is , and their variances are and . The allelic correlation measure is their squared correlation coefficient,
The subscript distinguishes it from the recombination fraction in linkage-disequilibrium decay under recombination. Squaring loses the association's sign. In the illustrated positive and negative examples, in both, whereas and , respectively. For another original example, take : then , yet . Every carries , but most copies carrying lack . The frequency constraints and the distinction between these normalizations are analyzed in Mathematical properties of the r² measure of linkage disequilibrium by Jenna M. VanLiere and others (sections 2.1 and 2.5, pp. 131–132 and 135–136).
Genetic linkage describes transmission through meiosis; linkage disequilibrium describes a population's haplotype frequencies. Nearby genetic loci on a chromosome can be in linkage equilibrium. Conversely, mixing populations can create linkage disequilibrium even between genetic loci on different chromosomes. For example, mix equal numbers of independently sampled haplotypes from two populations, each internally at linkage equilibrium, with in one and in the other. The pooled allele frequencies are , but , giving . This is a consequence of population stratification, not a measurement of the recombination fraction.
Measured haplotype frequencies also depend on the sample. Finite sample size, related individuals, genetic-study ascertainment, genotyping error and uncertain haplotype estimation can change an estimate. A missing rare haplotype can give empirical without demonstrating its absence from the population. Report the sample definition and allele frequencies alongside the association measure; a nonzero sample estimate alone does not establish nonzero population linkage disequilibrium.
A concrete dataset is the 2005 A haplotype map of the human genome by The International HapMap Consortium. The International HapMap Consortium used genotyping platforms including Illumina BeadArray to obtain SNP genotype calls from 269 DNA samples across four collections: 30 parent–offspring trios from Ibadan, 30 trios from Utah, 45 unrelated individuals from Beijing and 44 from Tokyo. Parent–offspring trios and the PHASE algorithm supplied haplotype estimation, rather than direct observation of every chromosome. In Figure 7, 36 SNPs resolve seven haplotypes in a chromosome 2 region in the Utah panel; seven tag SNPs capture the 36 SNPs at . The readout demonstrates reusable allelic correlation, not causal effects.
Controls required over 80% complete calls, at most one discordance among five duplicate genotypes, at most one Mendelian segregation error per trio panel, and a Hardy-Weinberg equilibrium test with ; blind reassessment checked performance. Minor allele frequencies of at least 0.05 were targeted, the collections were not population-representative, and inferred haplotypes retain phase uncertainty. These limits restrict extrapolation of linkage disequilibrium.[ref]
Genetic recombination erodes linkage disequilibrium by reshuffling alleles between haplotypes, while preserving marginal allele frequencies in the idealized model. Let denote the haplotype frequency in the gamete pool of generation , let denote its marginal allele frequencies, and let be the constant recombination fraction between two autosomal genetic loci. Assume random mating within one population, nonoverlapping generations, fair Mendelian segregation, equal reciprocal gamete production, the same in both sexes, and a deterministic population large enough to neglect genetic drift. Exclude natural selection, mutation and gene flow. Then
Here and remain constant: recombining changes which alleles occur together, not their total numbers. The other haplotype frequencies change by for and for . Consequently the joint probability distribution stays within its allowed bounds and approaches the product of its marginal distributions when .
For the original positive example , a recombination fraction gives and . The negative example has exactly the opposite sequence: genetic recombination reduces the magnitude without reversing the sign. With , the initial linkage disequilibrium persists in this model; even independent assortment at only halves each generation. A population association does not vanish after one generation merely because the genetic loci are unlinked.
The geometric sequence gives a generation scale: for , the continuous interpolation reaches at . Actual generations are integers; the first at or below half is . For small , . Because the denominator of allelic correlation stays fixed, ; its decay is faster than the magnitude of .
A short derivation uses random mating to assign frequency to the double heterozygote and to . Relative to , each loses or gains an gamete fraction , respectively. Their net contribution is . The other genotypes produce no net change in , proving the recurrence and, by iteration, its solution.
This temporal model does not identify elapsed generations from physical separation alone. The recombination fraction depends on genetic recombination, including recombination hotspots, while population stratification, natural selection, gene flow or genetic drift can create or maintain linkage disequilibrium. Repeated sampling across time would also require accounting for sample size and haplotype estimation. A cross-sectional plot of association against distance between genetic loci is therefore a different observation from the idealized trajectory plotted here.
Mark and recapture 2026-10-14
Mark and recapture estimates the cardinality of a finite set of individuals when counting everybody is impractical. The useful information is the overlap between observations: with fixed sample sizes, finding many of the same individuals again suggests a smaller population, while finding few suggests a larger one. More elaborate capture-recapture models also estimate survival and changing probabilities of detection.
In a closed-population capture-recapture model, let be the unknown population cardinality. Capture distinct individuals, mark them, release them all, and allow them to mix with the rest. Next take a second sample of distinct individuals using sampling without replacement, and count the individuals carrying a mark. The observed marked fraction estimates the population's marked fraction , giving the Lincoln-Petersen estimator
Release happens between the two samples; sampling without replacement means that an individual is counted at most once within the second sample. See Richard J. Barker, Open Population Mark-Recapture Models, §1.1.1.
For a constructed teaching example, mark individuals and later capture , including marked individuals. One fifth of the second sample is marked, suggesting that the twenty marked individuals are one fifth of the population:
Let and be the sets of individuals in the first and second samples. Their intersection has cardinality five. By the inclusion-exclusion principle, the set union contains
Thus is an observed lower bound, whereas is the output of an estimator based on the capture-recapture model. These are toy counts, not measurements from a medical or ecological study.
Figure 1.
Forty distinct observed individuals: fifteen in the first sample only, five shared, and twenty in the second sample only
. Details.
The diagram shows only observed individuals. It does not draw an assumed population of one hundred. The capture-recapture model uses the overlap to infer how many individuals may have escaped both samples; its likelihood function shows why one estimator output cannot describe all that uncertainty.
Moment matching for a beta prior turns a desired mean and variance for an unknown probability into the parameters of a beta distribution prior. Choose and
Solving the beta distribution mean and variance identities gives
The strict upper bound on the variance makes , so both parameters are positive. Substitution gives mean and variance exactly. A smaller specified variance at fixed mean produces a more concentrated prior distribution.
For example, a desired prior mean and variance give , hence the beta distribution prior . With the same mean and variance , the calculation instead gives and the broader beta distribution prior . Both appear in the concentration diagram above.
The excluded boundary cases have clear meanings. Zero variance would require with certainty, not a beta distribution with finite positive parameters. At the other boundary, any random variable satisfies , hence variance at most ; equality requires to take only the endpoint values zero and one. This is a Bernoulli distribution, not a beta distribution. Thus cannot be matched by positive finite parameters, and or is also excluded.
After observing Bernoulli trials, the Beta-binomial conjugacy makes the posterior mean a weighted average of the prior mean and observed binomial proportion :
This formula gives a precise interpretation as the prior's weight relative to the sample size in this posterior mean. It does not require fictitious observed counts: the beta distribution parameters can be any positive real numbers. For the eight-head, two-tail example above, and , so the posterior mean is .
// Target: statistical-inference.bigb
Nonparametric statistics Created 2026-09-24 Updated 2026-10-14
Nonparametric statistics studies statistical inference without restricting the unknown probability distribution or target function to a fixed finite-dimensional parametric statistical model. In density estimation and nonparametric regression, the number of features that an estimator can represent may grow with the sample size. Rank tests offer another approach: the probability distribution of their test statistic under the null hypothesis can be obtained without specifying the common continuous probability distribution.
"Nonparametric" does not mean free of assumptions or tuning choices. A kernel density estimator still requires a kernel for density estimation and a smoothing bandwidth, and its interpretation depends on assumptions about the statistical sample. The freedom is useful when a prescribed shape, such as a single normal distribution, would hide features that the observations might reveal.
For the same normal distribution model, a two-sided test compares the null hypothesis with the alternative hypothesis . Under the null hypothesis, the standardized test statistic has standard normal distribution. Write for the standard normal distribution function. With , , and , the observed test statistic is . Its p-value is
Thus the p-value is a tail probability computed under the null hypothesis, including departures in both directions. It is not , the posterior probability of the null hypothesis, nor the probability that the observations arose "by chance". The normal distribution test statistic and its calibration appear in NIST's teaching reference for testing a process mean; the tail interpretation is stated in Penn State's hypothesis-testing notes.
Choose the significance level before observing the sample. The rejection region is , whose probability under is exactly 0.05. Here , so reject . This agrees with zero lying outside . More generally, a proposed belongs to the unrounded 95% confidence interval precisely when its two-sided test does not reject under this strict cutoff. The equality boundary has probability zero in this continuous statistical model.
Figure 1.
The chosen 5% rejection tails and the observed two-sided p-value
. Details.
The significance level and statistical power describe different repeated-experiment probabilities. At a specified alternative , put and . Then
The first is the Type I error probability; the second is the Type II error probability at that alternative. For a planning alternative , keeping , and gives , and statistical power . At , and statistical power rises to . These are model calculations for specified alternatives, not posterior probabilities inferred from a nonsignificant result. They explain why failure to reject cannot establish equality and why choosing sample size before an experiment is useful.
Historically, Ronald Fisher's 1925 book discusses the normal cutoff and tail probability 0.05 as a convenient convention on page 47, rather than a mathematically compulsory threshold: [ref].
Suppose are independent and identically distributed with normal distribution , where the mean is unknown and the standard deviation is known. The sample mean has normal distribution and standard error . With the standard normal quantile at , the displayed confidence interval has exact coverage probability for every and every positive integer . No central limit theorem approximation is needed.
Take , and nominal confidence 95%. The standard error is , and . Therefore
Rounded for reporting, this is . If , the realized confidence interval is approximately . Exact 95% calibration refers to the unrounded standard normal quantile; using literally gives coverage probability , almost but not exactly 0.95.
The confidence interval's width scales as : increasing sample size from 16 to 64 halves its half-width to . If is unknown, merely substituting the square root of a sample variance loses the displayed exact calibration; for the same normal distribution model, use a Student t confidence interval.
The figure holds the true mean at and independently generates 40 samples of 16 observations from the same normal distribution. NumPy's PCG64 generator with seed 42 gives 39 covering confidence intervals and one miss, at sample 32: observed coverage is . Every bar uses the unrounded standard normal quantile. This finite collection illustrates the moving endpoints; it does not establish the analytic coverage probability or require exactly two misses.
Figure 1.
Forty normal-mean confidence intervals and their exact 95% coverage event
. Details.
The beauty of the construction is that a familiar standard normal distribution calibrates every possible unknown mean at once. For a short proof, the pivotal quantity
has a probability distribution independent of . The event has probability ; rearranging it gives . The right panel shows the equivalent event when .
Normal-mean sample size calculation Created 2026-10-06 Updated 2026-10-07
For a one-sided normal-mean test of size with known standard deviation , a positive alternative and target statistical power , the required sample size is the ceiling of . This follows by shifting the standard normal quantile in the alternative rejection probability.
Normal Q-Q plot 2026-10-14
A normal Q-Q plot compares order statistics with standard normal quantiles . For a normal distribution with , the population quantile function is , so the diagnostic sample relation is
The appropriate reference is a line with an intercept and positive slope, not necessarily the identity line. A line can be fitted through two central sample quantiles; R's qqline uses the quantile levels and by default. Neither that line nor its fitting rule is part of the definition of a normal Q-Q plot. [ref]
To isolate curvature, retain the same 19 plotting positions and construct two more ordered sequences:
The are continuous uniform distribution quantiles on , while the apply the hyperbolic sine to the reference quantiles. Both examples are symmetric about zero. At ranks , is approximately and is approximately . Again, these are constructed values rather than random draws or real data.
Figure 1.
Normal Q-Q curvature distinguishes compressed and stretched outer quantiles
. Left: the constructed uniform distribution quantiles bend inward relative to the central tangent . Right: the constructed values bend outward relative to the central tangent . Both panels use 19 standard normal quantiles at . Dashed lines are analytic central tangents, not fitted lines or uncertainty bands; only the chosen finite range is illustrated. Details.
Read these shapes relative to their central slope. The uniform distribution example has , with derivative ; at the upper endpoint the tangent predicts , while . Its lower end lies above the tangent and its upper end below it: the outer quantiles are compressed. The hyperbolic sine example has ; its tangent predicts at the upper endpoint, while . Its lower end lies below the tangent and its upper end above it: the outer quantiles are stretched. Unequal departures at the two ends can suggest skewness. The direction of these descriptions assumes that reference quantiles are horizontal and observed values vertical. The graphs illustrate finite-range shape differences; a sample pattern cannot establish an asymptotic tail probability law or membership in a heavy-tailed distribution class.
A nearly straight normal Q-Q plot is a diagnostic, not a proof of a normal distribution or a formal hypothesis test. Random statistical samples fluctuate, particularly at extreme order statistics, and apparent curvature depends on sample size, plotting positions and the reference line. A calibrated hypothesis test or uncertainty band requires its own assumptions and must account for parameters estimated from the same observations. Sorting also discards the original observation order: rearranging a time series leaves its Q-Q plot unchanged, so the plot cannot establish independence.
For a normal linear model, R's diagnostic normal Q-Q plot uses standardized regression residuals, also called internally studentized residuals. [ref] Even with independent errors, the regression residuals have covariance matrix , where is the hat matrix; fitting parameters generally creates dependencies. Dividing by a shared estimated standard deviation creates further dependence, and the distribution of an internally studentized Gaussian residual is not exactly the standard normal distribution. The normal Q-Q plot therefore helps assess error shape alongside other diagnostics rather than certifying independent normal random variables.
For equal allocation, let be the required sample size per arm, , and . In the standard sample size for comparing two proportions calculation, a two-sided test at 5% with 80% statistical power requires
Using and gives , which is rounded upward for actual recruitment. Thus
Since the risks are small, dropping the corrections and using gives , conventionally about 52.3 thousand. These are slightly different approximations to the same planning requirement. Add an allowance if outcome ascertainment is incomplete or the allocation is clustered. A prespecified one-sided test would need a different, smaller sample size; the calculation here uses the conventional two-sided interpretation consistently with part (b).
Now , , so , , and . The same sample size calculation gives
At , the illustrative two-sided total is ; the one-sided total is . The smaller difference needs roughly four times the size: its squared magnitude is a quarter of the previous one, while the variance factors change comparatively little.
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 has
with 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 are
Much 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.
A court-based randomized controlled trial would assign eligible offenders between the two sentencing policies using randomization, ideally stratified by court and important prespecified risk factors. With allocation concealment, the next assignment cannot be selected to suit an offender's prognosis. Baseline characteristics, both recorded and unrecorded, are balanced in distribution rather than confounded with judges' sentencing preferences. This makes a comparison of outcomes interpretable as a causal effect of assignment, subject to complete and comparable follow-up, whereas separate historical cohorts can differ in severity, social circumstances or calendar period.
The commission should compare both specified outcomes over the same 360-day period from sentencing, using an intention-to-treat analysis. An offender initially assigned community service remains in that group even if the order is later revoked and prison follows. Revocation is part of the policy's consequences; restricting the comparison to completers would select on a post-assignment outcome and lose the protection of randomization.
Within-court individual randomization also provides an objective allocation procedure and valid uncertainty estimates. It does not guarantee identical characteristics in a particular finite sample or eliminate loss to follow-up, unequal outcome ascertainment or limited generalizability. Eligibility, genuine uncertainty about the two policies, and a feasible authorized allocation mechanism would need agreement before the trial. If whole courts rather than individuals were assigned, that would be a cluster-randomized trial and its correlation structure would require a different sample size calculation.
Assume equal allocation of independent offenders to each arm and a two-sided statistical test of significance level . Write for P30 and for initial community-service assignment, with and . The two event counts have independent binomial distributions. Under the stated alternative, the difference of sample proportions is approximately a normal distribution with mean and variance
The pooled two-proportion test has approximate upper rejection threshold at the planning rates, where is the standard normal quantile. To obtain statistical power against a positive difference, place the alternative mean alternative-standard-errors above that threshold:
Solving yields the usual sample size for comparing two proportions:
per arm, rounded upwards, with total sample size . This targets the dominant rejection tail under the planning alternative; an exact power calculation can include the very small opposite-tail probability or use the binomial distributions directly.
For illustration, at , and , giving . Thus
For a prespecified one-sided test, replace by . The calculation assumes complete endpoint ascertainment, independent individual allocation and that the two initial-policy rates are appropriate; losses or clustered allocation would require corresponding design adjustments.
Mortality requires its own sample size calculation, rather than using the much commoner reconviction endpoint. Under the same specified exposure assumptions, the P30 schedule has 30 prison days, 30 high-risk post-release days, and 300 ordinary days. Its integrated hazard is
Hence its 360-day death probability is . For initial community-service assignment the preceding mixture gives . The absolute risk difference is therefore only about , or 16.8 fewer deaths per 10,000 initial assignments. The person-time approximation gives 145 versus 128 deaths per 10,000, a difference of 17.
As an illustrative design target, take two-sided significance level , statistical power and equal individual allocation. Apply the sample size for comparing two proportions formula with these mortality probabilities:
It gives about 74,600 participants per arm, or 149,200 altogether; using the simpler exposure approximations gives about 73,130 per arm. At 30,000 sentences per year, even if every offender were eligible and enrolled, this requires roughly five years of recruitment and another year to complete the final cohort's follow-up.
For scale, one year's equally allocated cohort has 15,000 per arm, with roughly 216 expected deaths after P30 and 191 after community-service assignment. The standard error of the risk difference is about , so the expected standardized separation is only about , below the usual two-sided 5% critical value. A one-year trial would consequently have poor statistical power for this mortality difference.
Thus mortality discrimination is much more demanding than reconviction discrimination. National recruitment and reliable linkage to death records could make a multiyear study feasible, but restricted eligibility, incomplete follow-up, or lower recruitment would lengthen it. A trial sized only for the 4-percentage-point reconviction difference would not provide a precise mortality comparison. The numerical conclusion depends on the supplied daily hazards, custody schedules, and the chosen power and significance targets; the prompt does not specify a mortality design target of its own.