GLOBAL KNOWLEDGE ARK

Mathematics · Article

Distributions, centre and spread

Describe the distribution behind a set of observations, choose summaries that match the quantity and question, and derive how means, medians, quantiles and measures of spread behave. Keep descriptive calculations separate from sampling uncertainty, robust comparisons and numerical approximation.

Back to Mathematics

After reading, you can

  • Distinguish a finite empirical distribution from a model for a population or repeated sampling.
  • Choose and interpret means, medians and modes using the measurement scale and the question.
  • State a sample-quantile convention and explain why legitimate conventions can produce different answers.
  • Derive centred sums, empirical variance and sample variance while retaining their denominators and units.
  • Compare standard deviation, absolute deviations, interquartile range and their sensitivity to extremes.
  • Pool groups using their sizes and within/between variation, rather than averaging incompatible summaries.
  • Derive incremental and merge formulas and recognize the limits of finite-precision arithmetic.
  • Explain what summaries omit, when population moments do not exist, and which assumptions are needed for uncertainty statements.
01

A distribution describes how observations are arranged

A list of measurements contains more information than a single average. Its observations may collect tightly around one value, form several groups, stretch into a long tail, or repeat because the instrument rounds them. Before calculating, identify the observational unit, the recorded quantity and its units, the sampling or collection rule, and the question the summary should help answer. A machine identifier and a response time can both be stored as integers while calling for very different mathematics.

For a finite numerical data set x₁,…,xₙ with n≥1, its empirical distribution assigns weight 1/n to each recorded observation. Repeated values accumulate their weights. For response times 2,3,3,4,8 milliseconds, the value 3 has weight 2/5, while 2,4 and 8 each have weight 1/5. These weights describe this recorded set; they do not by themselves establish the probabilities of every future response time or the distribution of a target population.

The empirical cumulative distribution Fₙ(t) is the fraction of observations at most t: Fₙ(t)=(1/n)Σ1{xᵢ≤t}. It is nondecreasing and changes only at recorded values. The indicator 1{xᵢ≤t} is 1 when the stated condition holds and 0 otherwise. At t=3 milliseconds in the example, Fₙ(3)=3/5. The fraction is dimensionless, but the threshold t must use the same physical unit as the observations.

A population distribution is a mathematical description of the target under discussion; a sampling model also describes how data are obtained from it. Neither is supplied merely by drawing an empirical curve. Unequal selection probabilities, repeated measurements on one object and changes over time can all make the empirical distribution differ from the desired target. State which distribution a summary describes before attaching a population interpretation to it.

02

Choose a centre for a stated purpose

A location summary reports one aspect of where a distribution lies. For finite real observations, the arithmetic mean is x̄=(x₁+⋯+xₙ)/n. The median is based on the ordered observations. A mode is a value or category with greatest frequency. They answer different questions, and a distribution can have several modes or no single most frequent value. An average is useful only when its definition and purpose are clear.

For 2,3,3,4,8 milliseconds, the mean is 4 milliseconds, the middle ordered observation is 3 milliseconds, and the uniquely most frequent recorded value is 3 milliseconds. The mean 4 is the total 20 milliseconds divided among five observations. The median 3 describes a rank position. The repeated value 3 describes frequency. Their disagreement is information about this small distribution, rather than a reason to select whichever number looks most convenient.

One record, accumulated weights and three centresThe five times are 2, 3, 3, 4, 8 milliseconds. Stacked observation dots show the repeated 3. The horizontal scale is 50 pixels per millisecond; the cumulative fraction scale is 180 pixels per unit fraction. At each jump a filled dot is the included right-continuous value and a hollow dot is excluded. F_n(3)=3/5. Mean 4, median 3 and recorded mode 3 milliseconds summarize this record, not an identified population.One record, accumulated weights and three centresRecorded times in ms; stacked dots retain repeats2348Fₙ(t)01/53/54/510234689threshold t (ms)Mean 4 ms; median 3 ms; uniquely most frequent value 3 ms.Fₙ(3)=3/5 counts 2, 3 and 3. A population model is separate.
The threshold uses milliseconds; cumulative weight is dimensionless. The step function counts records, including both observations at 3.

The measurement scale constrains the interpretation. A mean of arbitrary category codes changes when the labels are recoded; category proportions and modes can remain meaningful. For an ordered category, rank comparisons may be meaningful even when equal numerical gaps are not. For a measured interval-scale quantity such as Celsius temperature, differences and arithmetic means can be interpreted, while ratios to the arbitrary zero need a separate justification. Keep the distinction developed in the measurement-scales lesson.

A centre also depends on the loss or decision being considered. When each squared numerical error has the stated meaning, the mean has a useful optimality property. When the cost grows with absolute distance, medians have another. Those properties do not say which scientific cost is appropriate. A delivery-planning question, a total-resource calculation and a question about a typical participant may reasonably emphasize different features of the same data.

Common centres retain different information
SummaryFinite-data ruleInterpretation to retain
Arithmetic meanSum the numerical observations and divide by their countTracks the total per observation; sensitive to the sizes of extreme values
MedianUse central ranks; specify an even-sample reporting conventionA rank-based centre, with ties handled by the median inequalities
ModeFind the greatest observed frequencyCan be a category, can tie, and is affected by recording or binning conventions
03

The mean balances deviations and minimizes squared loss

Subtracting the mean balances the signed deviations: Σ(xᵢ−x̄)=Σxᵢ−n x̄=0. Negative and positive deviations cancel, so their ordinary signed sum cannot describe spread. Define the centred sum of squares M₂=Σ(xᵢ−x̄)² instead. Each term is nonnegative. For the response-time example, the deviations are −2,−1,−1,0,4 milliseconds, and M₂=4+1+1+0+16=22 square milliseconds.

Let c be any candidate centre on the same numerical scale. Write xᵢ−c=(xᵢ−x̄)+(x̄−c), square, and sum. The cross term vanishes because the centred deviations sum to zero. What remains is the exact identity Σ(xᵢ−c)²=M₂+n(c−x̄)². Since n>0, the second term is nonnegative and is zero precisely when c=x̄. The arithmetic mean is therefore the unique minimizer of the total squared distance for this finite numerical problem.

Squared loss has its unique minimum at the meanFor the retained five response times, L(c)=sum(x_i-c)^2=22+5(c-4)^2, in square milliseconds. The horizontal candidate-centre axis has 70 pixels per millisecond from 1 to 7; vertical loss has 3 pixels per square millisecond. The quadratic SVG path exactly represents this polynomial on the displayed interval. The highlighted point is c=4 milliseconds and loss 22 square milliseconds. This finite-data identity requires no normality assumption.Squared loss has its unique minimum at the meanL(c)=22+5(c−4)², for data 2,3,3,4,8 ms020406080(4,22)1234567candidate c (ms)loss (ms²)At c=3 or 5: loss 27 ms². At c=1 or 7: loss 67 ms².The identity describes every finite real candidate, not just plotted values.
The nonnegative added term 5(c−4)² proves uniqueness. Whether squared distance is the relevant scientific cost remains a separate decision.

This is a statement about the chosen loss, not an assumption of normality. It holds for every finite real data set, including a skewed or multimodal one. The square emphasizes large distances: a deviation of 10 units contributes 100 square units, while a deviation of 2 contributes 4. Whether that emphasis matches a scientific decision must be justified from the quantity and purpose, rather than from the existence of a convenient formula.

The same identity explains why an extreme observation can move the mean. Holding n−1 observations fixed while one value increases without bound also sends their arithmetic mean without bound. The finite mean remains correctly calculated; its sensitivity may be unsuitable for a chosen typical-value question. Changing the estimator and silently deleting the extreme observation are different actions. The latter also changes the observed data and calls for a documented data-quality justification.

04

A median follows ranks and minimizes absolute loss

Sort the observations as x₍₁₎≤⋯≤x₍ₙ₎. A median m has at most half the observations strictly below it and at most half strictly above it. This definition accommodates ties: it does not require strictly half to lie on each side. When n is odd, the middle order statistic is a median. When n is even, every point in the closed interval between the two middle order statistics satisfies the median inequalities.

A common numerical reporting convention for even n is the arithmetic midpoint of those two middle observations. The convention chooses one number from the median interval; it does not make all the other medians mathematically invalid. For 1,2,6,9, every number from 2 through 6 is a median and minimizes total absolute distance. The conventional midpoint is 4. If the observations are merely ordered categories, averaging category codes is not automatically meaningful, so the reporting rule needs a scale-appropriate interpretation.

To see the optimization property, consider moving a candidate c slightly to the right without crossing an observation. Each observation to the left increases its absolute distance at unit rate, while each observation to the right decreases its distance at unit rate. A candidate with more than half the points on one side can be moved toward that side to reduce the total. At the central rank or median interval, neither direction offers such an improvement. This proves the median property for the piecewise-linear loss Σ|xᵢ−c|, including a flat minimum when n is even.

A full median interval can minimize absolute lossFor the four numerical observations 1, 2, 6, 9, the exact piecewise-linear total absolute loss is 18 at c=0, 14 at 1, 12 at 2 through 6, 18 at 9 and 22 at 10. The horizontal axis has 43 pixels per candidate unit and the vertical loss scale 9 pixels per absolute-distance unit. Every c in the closed interval [2, 6] minimizes loss at 12. The conventional midpoint 4 is one reported median, not a unique mathematical minimizer. No physical unit is assigned to this numerical example.A full median interval can minimize absolute lossData 1,2,6,9; L₁(c)=Σ|xᵢ−c|06121824reported midpoint 401246910candidate c (numerical units)total absolute distanceEvery c∈[2,6] has loss 12. Both endpoints are included.Moving outside the central interval increases this particular loss.
The flat segment retains all medians. Averages of category codes are not automatically meaningful for merely ordered categories.

The rank-based centre is less sensitive than the mean to the numerical size of a single distant observation in many finite comparisons. Replacing 8 by 100 in 2,3,3,4,8 changes the mean from 4 to 112/5 milliseconds while leaving the median 3 unchanged. The observation has still changed the distribution, its range and the question of whether a long response matters. A stable median does not make that change irrelevant, nor does robustness to a few replacements guarantee immunity when enough of the data are contaminated.

05

Quantiles need a stated finite-sample convention

A quantile describes a rank position rather than the size of an average deviation. For the empirical inverse convention and 0<p≤1, define Q₁(p) as the smallest recorded value whose cumulative fraction is at least p. Equivalently, Q₁(p)=x₍⌈np⌉₎. We define the finite endpoint Q₁(0)=x₍₁₎ separately; applying an unrestricted infimum definition at p=0 would not give that endpoint automatically. A percentile uses 100p as its percentage label.

Another useful convention interpolates between adjacent order statistics. In the linear type 7 rule, use h=1+(n−1)p. If j=floor(h) and g=h−j, interpolate as Q₇(p)=(1−g)x₍ⱼ₎+g x₍ⱼ₊₁₎, with the endpoint h=n returning x₍ₙ₎ directly. For n=1, every requested quantile is the sole value. State whether ranks are one-based, how the endpoints are handled and how ties are retained before comparing numerical output from different tools.

For the ordered data 1,2,3,7,9,10, the empirical inverse gives a lower quartile 2 and upper quartile 9. The linear type 7 rule gives lower quartile 9/4 and upper quartile 17/2. Their interquartile ranges are therefore 7 and 25/4. Both calculations follow their stated rules. The example does not identify one universal quartile value that every statistical package must reproduce; the R Core documentation describes nine available sample-quantile algorithms.

The same six records can have different quartile gapsThe ordered numerical data are 1, 2, 3, 7, 9, 10. All rows share a 46 pixel per numerical unit horizontal scale. Empirical inverse Q 1 gives quartiles 2 and 9, gap 7. Linear type 7 gives 9/4 and 17/2, gap 25/4. The highlighted endpoints use their actual positions. Interpolated values are not added records. For p=0 or 1, the stated endpoint conventions return the minimum or maximum; these are descriptive quantiles, not confidence intervals.The same six records can have different quartile gapsRecorded values (the dots), not interpolated extra observations1237910Empirical inverse Q₁29IQR = 7Linear type 7 Q₇9/417/2IQR = 25/4n=6. Type 7 ranks are h=9/4 and 19/4 at p=1/4 and 3/4.The probability label is dimensionless; the reported gap uses data units.
The convention is part of a quantile report. Neither row alters the observations or supplies an inferential interval.

An interpolated value is a numerical summary, not an additional observation. A quantile convention should be recorded when values feed a scientific comparison, a published table or a later decision rule. With rounded measurements, ties and small samples, convention differences can be visible. A percentile of the observed data is also different from an uncertainty interval for a population percentile: the latter requires a sampling model and an inferential method that this descriptive calculation has not supplied.

06

Keep empirical variance and sample variance distinct

The empirical distribution has variance v=M₂/n, the mean squared deviation under its equal observation weights. Its empirical standard deviation is √v. This definition describes the finite recorded distribution itself. With 2,3,3,4,8 milliseconds, v=22/5 square milliseconds. Taking the square root returns a spread in milliseconds. Squaring or taking a square root changes the unit as well as the numerical value.

The familiar sample variance is s²=M₂/(n−1), defined when n≥2. It uses the same centred numerator with a different denominator. For the same five values, s²=11/2 square milliseconds. Neither number is an arithmetic mistake. The empirical variance describes the finite empirical distribution; the n−1 formula has a particular unbiasedness property for a sampling problem with appropriate assumptions. State the target before selecting the denominator.

Suppose X₁,…,Xₙ are independent and identically distributed with mean μ and finite common variance σ². Expanding about μ gives Σ(Xᵢ−X̄)²=Σ(Xᵢ−μ)²−n(X̄−μ)². Taking expectations gives nσ²−n(σ²/n)=(n−1)σ². Dividing by n−1 therefore yields an unbiased estimator of σ² in this model. The proof uses independence and finite variance; it does not require normally distributed observations. It is not a general guarantee for correlated measurements, a changing process or arbitrary survey weights.

For a single observation, empirical variance is 0 because the empirical distribution is concentrated at one value, while the n−1 sample variance is undefined. That zero does not establish that the population has no variability. For an empty set, the mean and the variances defined here are not available. Distinguish these mathematical boundaries from missing values, invalid units and computer overflow. A program should retain the reason a summary cannot be reported, rather than substitute a plausible-looking zero.

07

Standard deviation returns spread to the measurement unit

The empirical standard deviation is √v, where v=M₂/n; the usual sample standard deviation is s=√(M₂/(n−1)) for n≥2. Both are nonnegative, and both are zero exactly when all observations agree. Because variance squares the measurement unit, taking the square root returns the original unit. A variance of 4 square metres corresponds to a standard deviation of 2 metres, not 4 metres. Always say which denominator generated the reported standard deviation.

A standard deviation describes a root-mean-square distance from the mean, using its specified denominator. It is not generally the arithmetic mean of the absolute distances. For 2,3,3,4,8 milliseconds, the empirical standard deviation is √(22/5) milliseconds, while the arithmetic mean absolute distance from the mean is 8/5 milliseconds. Both summarize distances, but the square and square root give different weights to large departures.

Suppose every observation is transformed by yᵢ=a xᵢ+b, using fixed finite constants. The transformed mean is ȳ=a x̄+b, so yᵢ−ȳ=a(xᵢ−x̄). Consequently M₂,y=a²M₂,x, either variance is multiplied by a², and either standard deviation is multiplied by |a|. A change of origin b shifts the centre but leaves these spreads unchanged. A change of unit a changes the numerical spread while preserving its physical interpretation.

Centred squares, denominators and units stay distinctFor 2, 3, 3, 4, 8 milliseconds, subtracting mean 4 gives deviations-2, -1, -1, 0, 4 milliseconds, whose signed sum is 0. Each coloured square has side 20 pixels per millisecond of absolute deviation, so its area is 400 pixels squared per square millisecond. Their areas represent 4, 1, 1, 0, 16 square milliseconds and sum to 22. Division by 5 yields empirical variance 22/5; division by 4 yields sample variance 11/2. Square roots return milliseconds. The n-1 inferential claim requires the stated IID finite-variance model.Centred squares, denominators and units stay distinctDeviations from 4 ms: signed sum = 0 ms-2 ms4 ms²-1 ms1 ms²-1 ms1 ms²0 ms0 ms²4 ms16 ms²M₂ = 4+1+1+0+16 = 22 ms²v = 22/5 ms²s² = 22/4 = 11/2 ms²SDₑ = √(22/5) mss = √(11/2) msFor y=a x+b: centred sums and variances multiply by a².Either SD multiplies by |a|; the origin shift b cancels.For n=1: v=0, but the n−1 sample variance is undefined.
The square pictures show a nonnegative numerator; denominator choice does not change the observed deviations. Affine changes scale variance by a² and SD by |a|.

Dividing s by x̄ produces a dimensionless coefficient of variation when x̄>0, but being dimensionless is insufficient to make a ratio meaningful. The quantity needs a meaningful zero and an interpretation for relative variation. Celsius temperatures can have an arbitrary zero, so their coefficients of variation change when the same measurements are expressed in Fahrenheit. A mean near zero can also make the ratio unstable or undefined. Retain the quantity, scale and denominator before comparing such ratios across systems.

08

Absolute deviations and quantile gaps describe other aspects of spread

The arithmetic mean absolute deviation about the mean is A=(1/n)Σ|xᵢ−x̄|. It has the original measurement unit. A related absolute-deviation summary can instead be defined about a stated median or other centre; its name must identify that centre. These descriptive quantities should not be confused with the median absolute deviation, despite the similar words and the ambiguous abbreviation MAD.

Define the unscaled median absolute deviation as med(|xᵢ−m|), with m the reported sample median and a stated median convention used again on the absolute distances. For the ordered values 2,3,3,4,8, m=3 and the absolute distances are 1,0,0,1,5. Their ordered list 0,0,1,1,5 has median 1, giving an unscaled MAD of 1 millisecond. Some software multiplies MAD by a calibration constant chosen for a reference probability model. Report that scaling explicitly; a model-specific multiplier is not part of the unscaled definition.

The interquartile range is IQR=Q(0.75)−Q(0.25) using one declared quantile convention. The range is max(xᵢ)−min(xᵢ). Both retain the measurement unit, but they attend to different portions of the distribution. The range depends entirely on the extremes. The IQR reports a central rank span and can ignore very large changes outside that span. With a positive rescaling y=a x+b, these distance summaries scale by a, while shifts cancel.

A zero MAD or zero IQR does not prove that every observation is identical. A sufficiently large tied central group can force either summary to zero while other values differ. For 0,0,0,0,100, the median and unscaled MAD are 0; the empirical variance is positive. The range and either standard deviation are zero only when all finite observations agree. A robust scale can be useful precisely because it pays little attention to a minority of extremes, but the ignored portion of the distribution can still matter scientifically.

Spread summaries must retain their definition and scope
SummaryWhat is calculatedA limitation to report
Variance / standard deviationCentred squared distances with the stated denominator; square root for SDLarge distances have strong influence; variance has squared units
Mean absolute deviationMean of absolute distances from a named centreThe choice of centre matters; it is not the median absolute deviation
Unscaled median absolute deviationMedian of absolute distances from the reported medianTies can make it zero despite a nonconstant sample
Interquartile rangeDifference between the stated upper and lower quartilesQuantile convention matters, and tails are not described
RangeLargest value minus smallest valueOnly the two extremes determine it
09

Sensitivity is a property to interpret, not a verdict on the data

Replace only the last response time in 2,3,3,4,8 by 100 milliseconds. The new mean is 112/5=22.4 milliseconds, while the median remains 3 milliseconds. The empirical variance rises from 22/5 to 37646/25 square milliseconds. The unscaled MAD remains 1 millisecond. The arithmetic mean and variance have correctly responded to the much larger value; the median and MAD have retained information about the central ranks.

A central rank can stay fixed while the tail changesTwo response-time rows use the same 0 to 100 millisecond axis at 4.2 pixels per millisecond. Repeated 3 is stacked; the very short times are close together on this scale. Replacing 8 by 100 changes mean 4 to 112/5 milliseconds and empirical variance 22/5 to 37646/25 square milliseconds, while median 3 and unscaled MAD 1 millisecond remain. A third row for 0, 0, 0, 0, 100 has tied central stack at 0, median and MAD 0, but variance 1600 and SD 40. No observation is declared erroneous or removed.A central rank can stay fixed while the tail changesOriginal record; n=50255075100mean 4 ms; v=22/5 ms²; median 3; MAD 1 msKeep the large delay; n=50255075100mean 112/5 ms; v=37646/25 ms²; median 3; MAD 1 msA tied centre does not prove equality: 0,0,0,0,1000100 msTied record: median=MAD=0 ms; v=1600 ms²; SDₑ=40 ms.Both response-time rows and the tied row use the same horizontal scale.A zero robust spread does not imply that every record is equal.
Keep the full records. Resistance to a replacement and relevance to a total-time or tail question are different considerations.

The contrasting responses suggest different uses. A total-processing-time or resource-budget calculation must account for the long response. A central-rank description of a typical observation may benefit from the median. A reliability question about rare severe delays needs the tail itself, perhaps with threshold counts, upper quantiles and an appropriate sampling analysis. Replacing the tail with a central summary can hide the feature that matters most to that question.

Robustness describes resistance to specified changes or contamination. It is not permission to assume that inconvenient observations are mistakes. A high observation may be a transcription error, an instrument limit, an unusual valid event or evidence of a second process. Investigate the collection context before excluding it. If an alternative summary or a justified exclusion is used, preserve the original records and report the choice so that readers can assess its effect.

Sensitivity analysis can report more than one defensible summary without declaring a winner. State how much the mean, median and relevant spreads differ, retain the sample size and show the distribution when possible. If a conclusion depends strongly on a few observations, that dependence deserves attention. A stable median cannot prove that a biased sample represents its population, and an unstable mean does not make an arithmetic error appear where none exists.

10

Pool groups using both their sizes and their separation

For two nonempty disjoint groups A and B, let their sizes be n_A and n_B, their means m_A and m_B, and their centred sums of squares M₂,A and M₂,B. The combined size is N=n_A+n_B and the combined mean is m=(n_A m_A+n_B m_B)/N. This follows by adding the two group totals. Averaging the two means without their sizes instead gives each group equal weight, which is a different target unless the sizes are equal or the means happen to agree.

Within group A, write xᵢ−m=(xᵢ−m_A)+(m_A−m). Squaring and summing removes the cross term because Σ_A(xᵢ−m_A)=0. Group A therefore contributes M₂,A+n_A(m_A−m)² to the combined centred sum. Applying the same reasoning to B yields M₂=M₂,A+M₂,B+n_A(m_A−m)²+n_B(m_B−m)². Within-group variation and the separation of the group means both count.

Let δ=m_B−m_A. Since m_A−m=−n_Bδ/N and m_B−m=n_Aδ/N, the two between-group terms simplify to δ² n_A n_B/N. Thus M₂=M₂,A+M₂,B+δ² n_A n_B/N. This is an exact finite-data identity, with no normality or random-sampling assumption. To report the combined empirical variance divide by N; to report the usual combined sample variance divide by N−1 when N≥2.

Pooling includes within-group and between-group spreadGroup A contains 2, 4 and group B 8, 10, 12. The common horizontal scale is 35 pixels per numerical unit. A has size 2, mean 3, and centred sum 2; B has size 3, mean 10, and centred sum 8. The pooled mean is 36/5, not the equal-group mean 13/2. The lower stacked bar represents M 2 with 4 pixels per squared numerical unit: within contribution 10 and between contribution 294/5 sum to 344/5. This exact decomposition is descriptive and does not establish a cause for group differences.Pooling includes within-group and between-group spreadCommon value axis; units are unspecified in this numerical example0234681012Am_A=3, n_A=2Bm_B=10, n_B=3m=36/5M₂: within 2+8=10 plus between 7²·2·3/5=294/5Combined M₂=344/5; empirical variance=344/25Bar length: 4 pixels per squared numerical unit, common zero.Equal weighting of the two group means is a different target.
The two group sizes weight the centre; the separation of group centres contributes additional squared distance.

For several disjoint groups the same expansion gives M₂,total=Σ_g M₂,g+Σ_g n_g(m_g−m)², with m the size-weighted overall mean. Groups can each be tightly clustered while their combined data have large spread because their centres differ. The decomposition is useful for checking a merge and understanding structure; it does not establish a cause for group differences or turn observational grouping into an experiment.

11

Weights define a distribution only after their meaning is stated

A finite descriptive weighted distribution can be defined using nonnegative weights wᵢ with W=Σwᵢ>0. Give observation xᵢ probability weight wᵢ/W. Its mean is μ_w=Σwᵢxᵢ/W and its variance is v_w=Σwᵢ(xᵢ−μ_w)²/W. Zero-weight records contribute nothing to this particular distribution; negative weights do not define probabilities. Multiplying all weights by the same positive constant leaves this descriptive mean and variance unchanged.

Integer frequency weights can represent repeated records: weight 3 on a value means that value occurs three times. The formulas then agree with expanding the repetitions and using the empirical denominator W. If a usual sample variance is intended for that expanded data set, its denominator is W−1 when W≥2. That interpretation uses the weights as actual counts. It is not licensed simply because a computer accepts a column named weight.

Selection-probability weights in a survey, inverse-variance weights in a measurement model, and descriptive policy weights answer different questions. They can require different estimators and uncertainty formulas. A generic replacement of n−1 by Σwᵢ−1 cannot serve all of them: rescaling design weights changes that denominator while leaving the descriptive weighted distribution unchanged. Identify the target, design and role of the weights before making an inferential claim.

For example, one recorded value 2 and three recorded values 8 have frequency-weighted mean (1·2+3·8)/4=6.5. Giving the two distinct values equal descriptive weight would instead give 5. Both calculations are internally consistent, but they describe different distributions. The combined-group mean in the preceding section is frequency-weighted by group sizes because the stated target was every individual record in the union.

A record and a distinct value are different weighting unitsThe values 2 and 8 share a 45 pixel per numerical unit axis. Frequency weights 1 and 3 give normalized weights 1/4 and 3/4, mean 13/2 and empirical variance 27/4. Giving the two distinct values equal weight gives 1/2 each, mean 5 and variance 9. Circle stacks represent actual repeated records in the first row; the second row represents two equally weighted value categories. Probability bars share a 440 pixel per unit probability scale. This does not justify a survey-weight sample-variance denominator.A record and a distinct value are different weighting unitsFrequency target: every one of the four records2: weight 18: weight 3mean 13/21/43/4Distinct-value target: give 2 and 8 equal weight1/21/2Mean 5; empirical variance 9 (a changed distribution)Frequency distribution: M₂=27, v=27/4; count-based s²=9.The generic denominator Σw−1 is not licensed for arbitrary weights.
A common positive rescaling of descriptive weights preserves their normalized distribution. A frequency count has a different meaning from an arbitrary design weight.
12

Accumulate centred sums without subtracting two huge totals

In exact arithmetic, M₂=Σxᵢ²−n x̄² is equivalent to the centred definition. In finite-precision arithmetic the two terms on the right can be huge and nearly equal. Subtracting them can erase a small genuine spread. For 10¹²+1,10¹²+2,10¹²+3, the exact mean is 10¹²+2 and M₂=2, even though each squared observation is about 10²⁴. The formula is algebraically correct; a direct numerical evaluation need not preserve its small difference.

A centred running accumulator stores a count n, a mean m and M₂. Initialize an empty accumulator explicitly: the first finite observation x produces n=1, m=x and M₂=0. For a subsequent observation x and old n≥1, set δ=x−m, N=n+1 and m′=m+δ/N. The updated centred sum is M₂′=M₂+δ(x−m′). The old count and old mean must be used when forming δ; updating them in the wrong order changes the formula.

To derive the update, apply the pooling identity to the old n records and a one-record group with mean x and centred sum 0. It gives M₂′=M₂+δ² n/(n+1). Since x−m′=δ n/(n+1), this is M₂+δ(x−m′). The updated mean follows from the same size-weighted pooling formula. The derivation establishes an exact identity independently of a software implementation.

Two nonempty accumulators can likewise be merged using N=n_A+n_B, δ=m_B−m_A, m=m_A+δ n_B/N and M₂=M₂,A+M₂,B+δ² n_A n_B/N. Handle an empty side by returning the nonempty accumulator rather than dividing by a zero count. Preserve which denominator will be applied only after the merge. This permits independent groups of records to be summarized and combined without keeping every original value in memory, provided the retained summaries and counts are correct.

Keep the small centred sum beside the large offsetThe exact records are 10^12+1, 10^12+2, 10^12+3. Three schematic accumulator boxes show count 1, 2, 3; mean minus 10^12 equal to 1, 3/2, 2; and M 2 equal to 0, 1/2, 2. The second update adds 1/2 using old delta 1; the third adds 3/2 using old delta 3/2. Final empirical variance 2/3 and sample variance 1 follow only after choosing a denominator. Boxes and arrows show update order, not numeric distances. The raw-minus-large-totals identity can suffer cancellation in finite precision; centred updates are not a universal numerical guarantee.Keep the small centred sum beside the large offsetExact input: 10¹²+1, 10¹²+2, 10¹²+3Each mean entry below reports m−10¹², not m itselfn = 1m−10¹² = 1M₂ = 0n = 2m−10¹² = 3/2M₂ = 1/2n = 3m−10¹² = 2M₂ = 2Update 2: δ=1; add δ(x−m′)=1/2Update 3: δ=3/2; add δ(x−m′)=3/2Final: m=10¹²+2; M₂=2; v=2/3; s²=1Exact identity: M₂ = Σxᵢ² − n m², a difference near 10²⁴.The centred update avoids that particular huge subtraction.
Exact arithmetic explains the recurrence. Floating-point input rounding, overflow and merge order still need their own numerical assessment.

These centred formulas often reduce cancellation, but they do not promise exact floating-point results at every scale. Inputs can already have been rounded so that distinct true values become identical; large products can overflow; finite-precision merge order can matter. A tiny computed negative centred sum is a signal to investigate rounding and numerical bounds, not automatic authority to erase an arbitrary negative value. Retain units, precision, input validity and an appropriate numerical method. Exact rational checks of a few examples verify those examples, rather than every possible machine input.

13

A centre and spread leave much of the distribution unknown

The four records 0,0,3,3 and the four records −1,2,2,3 both have mean 3/2 and empirical variance 9/4. In the first, the deviations from the mean are −3/2,−3/2,3/2,3/2. In the second they are −5/2,1/2,1/2,3/2. Both centred sums are 9, but the arrangements, ties, extremes and median conventions yield different descriptive information.

The first data set has median interval [0,3] and reported midpoint 3/2; the second has reported median 2. Knowing only their means and variances would not distinguish the two. Moments compress information, and a shared pair of moments cannot uniquely determine a general distribution. A known probability family can sometimes be specified by a few parameters, but choosing that family is an additional modelling assumption.

Matching mean and variance do not determine the recordTwo four-record empirical distributions share a 90 pixel per numerical unit scale from-1 to 3. A has 0, 0, 3, 3 and B has-1, 2, 2, 3. Stacks retain repeats. Both means are 3/2 and both centred sums 9, so both empirical variances are 9/4. A's midpoint median is 3/2 and its full median interval [0, 3]; B's median is 2. The dashed common mean is not a claim that the distributions coincide. No probability family or normal shape is assumed.Matching mean and variance do not determine the recordSame common value scale; four equal-weight records in each rowAMedian interval [0,3]; midpoint 3/2BMedian 2common mean 3/2-10123Both: mean 3/2; M₂=9; empirical variance 9/4.Different extremes, ties and medians remain scientifically visible.
A squared length of the centred observation vector cannot retain all arrangements, ties or rank information.

A variance is a squared-distance quantity. In geometric language, form the vector of centred observations (x₁−x̄,…,xₙ−x̄); M₂ is its squared Euclidean length. Many distinct vectors have the same length, even when their signed coordinates sum to zero. The connection to vectors and orthogonality helps explain both the centring identity and why one scalar spread cannot retain the full pattern of the records.

Keep a distribution display or an appropriately detailed frequency summary alongside scalar summaries when the question depends on shape, gaps, ties, tails or subgroups. A histogram also introduces bin choices, so it should not be treated as the raw distribution itself. The following visualisation lesson will develop those choices; the present lesson establishes why the information cannot be recovered from a mean and standard deviation alone.

14

A finite sample can have a mean even when its model does not

Every nonempty finite list of finite real observations has a finite arithmetic mean and empirical variance in exact real arithmetic. A population expectation is different: it involves the whole probability distribution and the existence of the relevant integral or sum. A sample calculation does not establish that the corresponding population moment exists. The finite-variance assumptions used in the unbiased sample-variance argument must therefore remain visible.

The standard Cauchy density is f(x)=1/[π(1+x²)] for all real x. It is symmetric about 0 and has median 0. For its expectation to be a finite real number, the positive and negative parts must both be integrable; absolute integrability is a sufficient and, for a real-valued finite expectation, necessary condition. Here the positive absolute-moment integral contains ∫₀^R x/[π(1+x²)] dx=log(1+R²)/(2π), which diverges as R increases. Thus a finite population mean does not exist.

Integrating x f(x) over a symmetric interval [−R,R] gives 0, but that symmetric cancellation is a principal-value operation, not the ordinary expectation. Symmetry does not supply a finite mean. The second-moment integral also diverges, so there is no finite population variance or standard deviation. A finite recorded Cauchy sample can still have an arithmetic sample mean and sample standard deviation; do not confuse their existence with population moments or claim that a nonnegative sample SD has a Cauchy distribution on the whole real line.

Symmetric cancellation is not an ordinary expectationFor the dimensionless standard Cauchy density, the positive truncated first moment is I(R)=ln(1+R²)/(2π). Bars use labelled cutoff categories, not a linear R axis. At R=1, sqrt 3, sqrt 15, sqrt 255, the exact values are 1, 2, 4, 8 times ln 2/(2π), so bar heights 32, 64, 128, 256 pixels represent that normalized positive integral. This positive contribution grows without bound. The symmetric signed integral over [-R, R]is 0 but is only a principal value. The mean, finite variance and population SD do not exist; finite recorded summaries may still exist.Symmetric cancellation is not an ordinary expectationI(R)=∫₀ᴿ x/[π(1+x²)] dx = ln(1+R²)/(2π)Vertical unit: ln 2/(2π); labelled R categories below024681R=12R=√34R=√158R=√255As R→∞, I(R)→∞. Symmetric signed cancellation is a different limit.Median 0 exists; an ordinary finite population mean does not.
The increasing nonnegative integral prevents an ordinary finite mean. No bell-shaped sketch is needed to justify a nonexistent moment.

When a model has no finite mean or variance, statements that require those moments cannot simply be carried over. Location and scale parameters can still have other meanings, and rank-based summaries remain available. Decide whether a proposed model and summary fit the scientific quantity and purpose. Choosing a median is a descriptive or inferential choice to justify; it does not make a nonexistent population mean become defined.

15

Derive a distribution-free bound for the recorded observations

Let m be the mean of n≥1 finite observations and v=M₂/n their empirical variance. Fix a positive distance t in the observation unit. Every record with |xᵢ−m|≥t contributes at least t² to M₂. If k records satisfy that condition, then k t²≤M₂. Divide by n t² to obtain the exact finite-data bound fraction{|xᵢ−m|≥t}≤v/t². The fraction is also at most 1, so the useful bound is min(1,v/t²).

The inequality follows from counting nonnegative squared distances. It assumes neither a normal shape nor random sampling. For the empirical distribution, it is a descriptive version of the Chebyshev inequality. A population version follows by the same nonnegative-expectation argument when a finite population variance exists. Neither version turns a standard-deviation interval into an automatic 95-percent probability statement.

The bound can be attained by placing suitable mass at the centre and exactly at the two threshold distances. For the eight records −2,0,0,0,0,0,0,2, the mean is 0 and the empirical variance is 1. Exactly 2/8=1/4 of the records lie at distance at least 2. The bound v/t²=1/4 is attained. The inclusiveness of the ≥ sign matters at the endpoints.

An inclusive tail count can attain the variance boundEight equal-weight numerical observations are-2, 0, 0, 0, 0, 0, 0, 2, with mean 0 and empirical variance 1. The horizontal scale is 100 pixels per numerical unit. Six centre dots stack at 0 and endpoint dots are exactly at-2 and 2. Both endpoints satisfy absolute distance at least 2, giving 2/8=1/4, equal to v/t². The strict inside region has 6/8=3/4; the closed interval includes all eight. A lower bar partitions the eight record weights, not spatial lengths. This empirical bound needs no normality or sampling assumption.An inclusive tail count can attain the variance boundm=0; n=8; M₂=8; v=1; positive threshold t=2-2-1012Endpoints are outside under |x−m|≥2Outside: 2/8=1/4=v/t². Strict inside: 6/8=3/4.For v=0 and t>0 the outside fraction is 0; do not divide by t=0.
Keep ≥ for the outside event and < for its complement. A descriptive tail fraction is not a confidence level for an unknown population mean.

When the empirical SD σ_e=√v is positive, choosing t=aσ_e gives an outside fraction at most 1/a² for a>0. The complementary statement concerns distances strictly less than t when the outside condition is ≥t. For v=0, all observations equal the mean and the outside fraction is 0 for every positive t; do not insert a zero threshold into a division by t². These are statements about the described distribution, not confidence levels for an unknown population centre.

16

Separate spread of observations from uncertainty in an estimate

Standard deviation describes dispersion in individual values under its stated distribution or data convention. A standard error describes the sampling standard deviation of an estimator under a specified repeated-sampling model. They have different targets even when they share the same physical unit. Increasing the number of observations can reduce the uncertainty of an estimated mean without making individual observations less variable.

If X₁,…,Xₙ are independent with a common finite variance σ², then Var(X̄)=σ²/n: add the n variances and divide by n². The population SD of X̄ is therefore σ/√n. For an IID sample from one common finite-variance population, replacing σ by the usual sample SD s gives s/√n as an estimated standard error. Independence and a common variance alone do not justify that plug-in if the observation means differ. This formula requires its sampling assumptions. It is not a definition valid for every survey, cluster, time series or weighted estimator.

With correlated observations, Var(X̄)=[ΣVar(Xᵢ)+2Σ_{i<j}Cov(Xᵢ,Xⱼ)]/n² when these finite covariances exist. Positive correlations can make s/√n understate uncertainty. Repeated measurements from the same object also cannot automatically be counted as independent units from a target population. The sampling lesson supplies the design context; no choice of descriptive denominator repairs a biased collection process.

A useful report names the quantity and unit, the observational and sampling units, the number of usable records and the treatment of missing or excluded values. Name the centre and spread, give the variance denominator or quantile convention, explain weights or group pooling, and retain relevant shape and tail information. If uncertainty is reported, specify its target and assumptions separately. Choose numerical precision that the measurements and purpose support.

For example, a report might state that five recorded response times 2,3,3,4,8 milliseconds have median 3 milliseconds, mean 4 milliseconds and empirical variance 22/5 square milliseconds, with the full list retained. Under an explicitly justified IID finite-variance sampling model, the usual sample variance would instead be 11/2 and the estimated standard error of the mean would be √(11/10) milliseconds. Those added modelling statements do not follow merely from the existence of the five numbers. Preserve this distinction when moving from summaries to probability and statistical inference.

Spread of records and uncertainty of a mean differThe same five response times have M 2=22 square milliseconds. Usual sample SD is sqrt(11/2)milliseconds. Only under the justified IID common finite-variance population model, its mean's estimated standard error is s/sqrt 5=sqrt(11/10)milliseconds. Horizontal bar scale is 110 pixels per millisecond; lengths 258.0 and 115.37 pixels are rounded graphical approximations to the exact radicals printed. No normal density or confidence percentage is asserted. Independent common variance alone supports Var(mean)=sigma²/n but does not justify this plug-in with differing observation means.Spread of records and uncertainty of a mean differSame five records; n=5; count-based s²=11/2 ms²Individual-value spread: sample SDs = √(11/2) msMean uncertainty: estimated standard errors/√5 = √(11/10) msRequires IID sampling from one common finite-variance populationBars approximate radical lengths at 110 pixels per millisecond.A smaller SE does not say that the individual values became less variable.
Both quantities use milliseconds, but they describe different targets. Correlation, unequal means and a changed sampling design can invalidate the ordinary plug-in.

Explore distributions, centre and spread

Choose a finite preset. Exact fractions, unavailable cases and stated model assumptions stay visible. Square-root and separate Number results are marked as numerical approximations.

1. Keep the finite distribution

Retain individual recorded values and tiesEqual observation weights: 2, 3, 3, 4, 8. Repeated values are stacked vertically, not displaced horizontally. . Axis unit ms.Retain individual recorded values and tiesEqual observation weights258Recorded quantity: ms; same horizontal scale within this figure
Horizontal positions are numerical plotting approximations. The accompanying tables retain the exact recorded values and conventions; stacked dots show repeated observations.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Count5
Ordered observations[2; 3; 3; 4; 8]
Arithmetic mean4
Median interval[3, 3]
Reported midpoint median3
Recorded frequency maximizers[3]
Unique recorded modeyes
Empirical CDF at recorded thresholds[F(2) = 1/5; F(3) = 3/5; F(4) = 4/5; F(8) = 1]
Centred sum M₂22
Empirical variance M₂/n22/5
Usual sample variance M₂/(n−1)11/2
Empirical SD√(22/5) (≈ 2.0976177)
Unscaled median absolute deviation1
Mean absolute distance from the mean8/5
Range6
Empirical-inverse IQR1
Type 7 IQR1

Units: Location: ms; Variance: ms²; CDF: dimensionless

All observations receive equal empirical weight. Repeated recorded values retain their frequency; all tied maximizers are shown as recorded modes. Empty summaries are unavailable, and n=1 sample variance is undefined. No population distribution or sampling model follows from this record.

2. Match a centre to the stated loss

Retain individual recorded values and tiesFinite record: 2, 3, 3, 4, 8. Repeated values are stacked vertically, not displaced horizontally. candidate c=4. Axis unit ms.Retain individual recorded values and tiesFinite recordcandidate c: 4258Recorded quantity: ms; same horizontal scale within this figure
Horizontal positions are numerical plotting approximations. The accompanying tables retain the exact recorded values and conventions; stacked dots show repeated observations.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Candidate c4
Mean4
Full median interval[3, 3]
Squared-distance sum22
Centred sum M₂22
Extra squared penalty n(c−mean)²0
Squared-loss identity residual (must be 0)0
Candidate minimizes squared lossyes
Absolute-distance sum8
Minimum absolute-distance sum7
Candidate minimizes absolute lossno

Units: Centre: ms; Absolute loss: ms; Squared loss: ms²

The mean uniquely minimizes squared distance for this nonempty finite real record. Every centre in the full median interval minimizes absolute distance. The midpoint reporting convention is only one choice; loss optimality does not decide which scientific cost is appropriate.

3. Compare two declared quantile rules

Retain individual recorded values and tiesOrdered record: 1, 2, 3, 7, 9, 10. Repeated values are stacked vertically, not displaced horizontally. empirical inverse=2; linear type 7=9/4. Axis unit state-units.Retain individual recorded values and tiesOrdered recordempirical inverse: 2linear type 7: 9/415.510Recorded quantity: state-units; same horizontal scale within this figure
Horizontal positions are numerical plotting approximations. The accompanying tables retain the exact recorded values and conventions; stacked dots show repeated observations.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Ordered observations[1; 2; 3; 7; 9; 10]
Probability p1/4
Empirical-inverse one-based rank2
Empirical-inverse quantile2
Type 7 interpolation rank h9/4
Type 7 integer rank j2
Type 7 interpolation fraction g1/4
Type 7 quantile9/4
Empirical-inverse IQR7
Type 7 IQR25/4

Units: Recorded state-units; ranks, probabilities and interpolation fractions are dimensionless.

Both rules use one-based order ranks. Type1 defines its finite p=0 endpoint separately as the minimum. Type7 returns the last value at h=n without reading a nonexistent next value; a singleton returns its sole observation. Interpolated summaries are not additional observations or uncertainty intervals.

4. Preserve units under a scale and origin change

Calculated values for the selected record and stated convention
Quantity or conditionResult
Scale a9/5
Origin b32
Source observations[2; 3; 3; 4; 8]
Transformed observations[178/5; 187/5; 187/5; 196/5; 232/5]
Source mean4
Transformed mean196/5
Source empirical variance22/5
Transformed empirical variance1782/125
Transformed empirical SD√(1782/125) (≈ 3.7757119)
SD scale factor |a|9/5
Mean transformation residual0
Variance transformation residual0

Units: Source: °C; Target: °F; Source variance: °C²; Target variance: °F²

The actual transformed observations are recomputed. A shift changes the mean but cancels from centred deviations; either variance scales by a² and either SD by |a|. Negative scales reverse order, while a=0 collapses the record. Temperature origin changes do not license a scale-independent coefficient of variation.

5. Retain within-group and between-group variation

Retain individual recorded values and tiesGroup A: 2, 4. Group B: 8, 10, 12. Individual-record union: 2, 4, 8, 10, 12. Repeated values are stacked vertically, not displaced horizontally. . Axis unit state-units.Retain individual recorded values and tiesGroup AGroup BIndividual-record union2712Recorded quantity: state-units; same horizontal scale within this figure
Horizontal positions are numerical plotting approximations. The accompanying tables retain the exact recorded values and conventions; stacked dots show repeated observations.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Group A count2
Group B count3
Group A mean3
Group B mean10
Total record count5
Count-weighted merged mean36/5
Equal-group mean (a different target)13/2
Within-group M₂ contribution10
Between-group M₂ contribution294/5
Merged M₂344/5
Combined empirical variance344/25
Combined usual sample variance86/5
Exact mean-merge residual0
Exact centred-sum merge residual0

Units: State-units for means; squared state-units for centred sums and variance.

Groups are disjoint sets of records. Their count-weighted union includes both within-group variation and group separation. Empty accumulators return the nonempty state; two empty groups have unavailable means and variances, not zero-valued data summaries. Equal weighting of group means is a different target.

6. State what the weights mean

Weights allocate probability to recorded valuesValue 2 has normalized weight 1/4. Value 8 has normalized weight 3/4. A shared horizontal scale runs from zero to one.Weights allocate probability to recorded valuesvalue 21/4value 83/401Normalized probability w/W (dimensionless)
Bars show the declared descriptive probabilities. Their normalization does not supply a sampling-uncertainty formula.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Values[2; 8]
Weights[1; 3]
Declared rolefrequency
Total weight W4
Probability distribution availableyes
Reason if unavailableNot applicable: this preset is available.
Normalized probabilities w/W[1/4; 3/4]
Weighted mean13/2
Weighted centred sum27
Weighted empirical variance27/4
Declared expanded frequency count4
Sample variance of actual expanded frequency records only9

Units: State-units for mean, squared state-units for variance; weights retain their stated meaning.

Only declared nonnegative integer frequency counts can license the W−1 expanded-record sample convention here. Descriptive weights define probabilities w/W, not a sampling uncertainty formula. A common positive rescaling preserves the descriptive mean and variance; negative or zero-total weights yield unavailable probability summaries.

7. Separate exact accumulation from Number arithmetic

Exact centred sum after each appended recordCount 1, centred sum 0. Count 2, centred sum 1/2. Count 3, centred sum 2. Positions are numerical plotting approximations; exact values stay in the table.Exact centred sum after each appended record011/2223M₂ (squared state-units)Count of appended observations
These are the exact rational running-accumulator states. The separate Number comparison can lose input distinctions or incur cancellation; no negative approximation is silently clamped.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Exact inputs[1000000000001; 1000000000002; 1000000000003]
Exact running steps[n=1: mean 1000000000001, M₂ 0; n=2: mean 2000000000003/2, M₂ 1/2; n=3: mean 1000000000002, M₂ 2]
Exact final mean1000000000002
Exact running M₂2
Direct exact M₂2
Exact uncentred identity result2
Running-vs-direct exact residual0
Empirical variance2/3
Usual sample variance1
Number input represents each exact integer[yes; yes; yes]
Distinct exact input values3
Distinct represented Number values3
Separate Number uncentred M₂ (approximate)536870912
Separate Number running M₂ (approximate)2

Units: State-units for values and means; squared state-units for centred sums.

Exact BigInt rational arithmetic retains the declared integer inputs and all centred identities; wire fractions serialize integer numerators/denominators as decimal strings. The separate Number calculations are finite-precision demonstrations for these presets only. Centred accumulation often reduces cancellation but cannot restore already rounded inputs, guarantee every merge order, or justify clamping a negative numerical result. Empty initialization has no mean or spread.

8. Matching moments do not recover the distribution

Retain individual recorded values and tiesRecord A: 0, 0, 3, 3. Record B: -1, 2, 2, 3. Repeated values are stacked vertically, not displaced horizontally. . Axis unit state-units.Retain individual recorded values and tiesRecord ARecord B-113Recorded quantity: state-units; same horizontal scale within this figure
Horizontal positions are numerical plotting approximations. The accompanying tables retain the exact recorded values and conventions; stacked dots show repeated observations.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Record A ordered values[0; 0; 3; 3]
Record B ordered values[-1; 2; 2; 3]
Record A mean3/2
Record B mean3/2
Mean difference0
Record A empirical variance9/4
Record B empirical variance9/4
Variance difference0
Record A median interval[0, 3]
Record B median interval[2, 2]
Reported-median difference-1/2
Same empirical distributionno

Units: State-units for centres; squared state-units for variance.

Matching mean and empirical variance do not imply matching distributions, medians, ties, tails or shapes. Reordering the same equally weighted observations preserves the empirical distribution. No fitted probability family is supplied.

9. A finite record does not establish population moments

Calculated values for the selected record and stated convention
Quantity or conditionResult
Finite positive cutoff R1
Positive truncated absolute first-moment expressionlog(1+R²)/(2π)
Its finite-cutoff value (approximate)≈ 0.1103178
Symmetric truncated first integral0
Population median0
Finite ordinary population mean existsno
Finite population second moment existsno
Finite population variance existsno
Separate illustrative finite record mean8/5
Separate finite record empirical variance806/25

Units: Dimensionless standard Cauchy coordinate; finite-record variance is its square.

The analytic log(1+R²)/(2π) term diverges as R→∞; no finite cutoff alone establishes that limit. The symmetric truncated first integral is zero by odd symmetry, a principal-value operation rather than an ordinary expectation. The separately declared finite record is only illustrative; its finite sample moments do not make Cauchy population moments exist.

10. Keep inclusive and strict tail events distinct

Retain individual recorded values and tiesActual recorded observations: -2, 0, 0, 0, 0, 0, 0, 2. Repeated values are stacked vertically, not displaced horizontally. . Axis unit state-units.Retain individual recorded values and tiesActual recorded observations-202Recorded quantity: state-units; same horizontal scale within this figure
Horizontal positions are numerical plotting approximations. The accompanying tables retain the exact recorded values and conventions; stacked dots show repeated observations.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Observations[-2; 0; 0; 0; 0; 0; 0; 2]
Mean0
Empirical variance v1
Threshold t2
Bound available under its stated conditionsyes
Reason if unavailableNot applicable: this preset is available.
Count with |x−mean|≥t2
Outside inclusive fraction1/4
Strict inside count |x−mean|<t6
Closed inside count |x−mean|≤t8
v/t²1/4
Bound min(1,v/t²)1/4
Bound minus observed fraction0
Observed fraction attains boundyes

Units: State-units for threshold and values; dimensionless counts/fractions/bound.

Count |x−mean|≥t for positive t. Its complement is |x−mean|<t, not the closed interval. The descriptive bound min(1,v/t²) needs no normality or sampling assumption. A constant record has no outside points for positive t; zero threshold is unavailable under this argument. The bound is not a confidence level for an unknown population centre.

11. Distinguish observational spread from estimator uncertainty

Two variances describe different targetsIndividual variance=4 ms squared. Variance of the mean=4/5 ms squared. Both bars share the same squared-unit scale from zero.Two variances describe different targetsIndividual variance4Variance of the mean4/5Common scale: 0 to 4 ms²Correlation: 0
The mean’s variance uses the stipulated covariance structure. Sample SD divided by √n is displayed as an estimated SE only when the separate IID finite-variance assumptions are explicitly supplied.
Calculated values for the selected record and stated convention
Quantity or conditionResult
Record count5
Usual sample SD of the illustrative record√(11/2) (≈ 2.3452079)
Stipulated individual variance4
Stipulated pairwise correlation0
Stipulated pairwise covariance0
Equicorrelation lower bound −1/(n−1)-1/4
Stated covariance matrix is validyes
Independence statedyes
Identical distribution statedyes
Theoretical variance of the mean4/5
Theoretical SD of the mean√(4/5) (≈ 0.89442719)
Independent common-variance benchmark4/5
Usual s/√n plug-in justified in this presetyes
Estimated SE of the mean under IID finite variance√(11/10) (≈ 1.0488088)
Confidence level assignedno

Units: ms for observations, SD and SE; ms² for variances and covariances; correlation dimensionless.

The theoretical experiment stipulates five equal finite variances and one common pairwise correlation; a valid equicorrelation matrix requires −1/(n−1)≤rho≤1. Var(mean) uses all covariance terms. The separately displayed descriptive record supplies s/√n only under the stated IID common finite-variance model. Independence and common variance with differing means do not justify that plug-in. No normality, interval or confidence level is inferred.

Worked examples

Three centres of one finite record

Five recorded response times are 2,3,3,4,8 milliseconds. Compute the mean, the median and the uniquely most frequent recorded value, and explain what population claim the calculation establishes.

  1. The ordered record is already 2,3,3,4,8, with five equally weighted observations.
  2. The total is 20 milliseconds, so the arithmetic mean is 20/5=4 milliseconds.
  3. The middle ordered observation is 3 milliseconds, and 3 occurs twice while each other value occurs once.
  4. These are summaries of this record. The collection and sampling design must justify any claim about a broader population or future response times.

The finite mean is 4 milliseconds, the median is 3 milliseconds and the unique recorded mode is 3 milliseconds. The calculations alone establish no population sampling model.

Two denominators with distinct targets

For the same five response times, calculate the centred sum of squares, empirical variance and n−1 sample variance. Keep the units and the conditions for the sampling interpretation.

  1. Using the mean 4 milliseconds, the deviations are −2,−1,−1,0,4 milliseconds.
  2. Their squared sum is 4+1+1+0+16=22 square milliseconds.
  3. The empirical-distribution variance is 22/5 square milliseconds; the n−1 sample variance is 22/4=11/2 square milliseconds.
  4. Their standard deviations are respectively √(22/5) and √(11/2) milliseconds. Unbiasedness of the n−1 variance requires the stated IID finite-variance model, and unbiasedness of variance does not imply that its square root is an unbiased SD estimator.

M₂=22 square milliseconds, v=22/5 square milliseconds and s²=11/2 square milliseconds. The different denominators answer different descriptive and sampling questions.

Two legitimate quartile conventions on the same six values

For 1,2,3,7,9,10, compare the empirical-inverse quartiles with linear type 7 quartiles. What changes in the IQR?

  1. For the empirical inverse Q₁(p)=x₍ceil(np)₎ at 0<p≤1, the lower rank is ceil(6/4)=2 and the upper rank is ceil(18/4)=5. The quartiles are 2 and 9.
  2. For type 7, h=1+(n−1)p. At p=1/4, h=9/4=2+1/4, giving 2+(1/4)(3−2)=9/4.
  3. At p=3/4, h=19/4=4+3/4, giving 7+(3/4)(9−7)=17/2.
  4. The empirical-inverse IQR is 9−2=7; the type 7 IQR is 17/2−9/4=25/4. Preserve the same data and identify the algorithm before comparing software results.

The two IQRs are 7 and 25/4. Their disagreement comes from stated finite-sample conventions, rather than changed observations.

Convert a centre and spread without changing the measurements

A Celsius data set 2,3,3,4,8 has mean 4 and empirical variance 22/5. What are its mean and empirical variance in Fahrenheit?

  1. The conversion is y=(9/5)x+32. The mean therefore becomes (9/5)·4+32=196/5 degrees Fahrenheit.
  2. The additive 32 cancels in every centred deviation. Multiplication by 9/5 multiplies each centred square by 81/25.
  3. The empirical variance becomes (81/25)(22/5)=1782/125 square degrees Fahrenheit. The empirical standard deviation is (9/5)√(22/5) degrees Fahrenheit.
  4. A ratio of SD to the mean changes when the arbitrary origin changes. These temperature conversions justify transformed centres, differences and spreads, but do not make a Celsius coefficient of variation scale-independent.

The mean is 196/5°F and empirical variance 1782/125°F²; the standard deviation scales by 9/5.

Describe one large delay without deleting it

Compare 2,3,3,4,8 with 2,3,3,4,100 milliseconds. Which summaries expose the changed tail and which preserve the central rank?

  1. The first data set has mean 4, median 3, empirical variance 22/5 and unscaled MAD 1.
  2. The new total is 112, so the mean becomes 112/5. The retained exact centred calculation gives empirical variance 37646/25 square milliseconds.
  3. The middle observation remains 3. Absolute distances from 3 are 1,0,0,1,97, whose median is 1. Thus the unscaled MAD also remains 1.
  4. A resource-total question must retain the 100-millisecond delay. A central-rank question can report the unchanged median, but should also disclose the large delay and sample size. Neither calculation establishes whether the event is erroneous.

The mean and squared spread rise strongly; median 3 and unscaled MAD 1 remain unchanged. The right summary depends on the stated question.

Separate within-group spread from separated group means

Pool A={2,4} and B={8,10,12}. Find the combined mean and centred sum without discarding the group separation.

  1. Group A has n_A=2, m_A=3 and M₂,A=2. Group B has n_B=3, m_B=10 and M₂,B=8.
  2. The total is 2·3+3·10=36 across 5 observations, so m=36/5. The unweighted average of group means would be 13/2 and would target equal groups instead.
  3. The mean difference is δ=7. The between-group contribution is 7²·2·3/5=294/5. Add the within-group contribution 2+8=10 to obtain M₂=344/5.
  4. Divide by 5 for empirical variance 344/25, or by 4 for usual sample variance 86/5. Omitting the between-group term would seriously understate the spread in the pooled records.

The combined mean is 36/5 and M₂=344/5; empirical variance is 344/25, with 294/5 of M₂ attributable to the separation of group means.

A zero median absolute deviation need not mean identical records

For 0,0,0,0,100, is a zero unscaled MAD enough to declare no spread?

  1. The reported median is 0, and the absolute distances from it are 0,0,0,0,100. Their median is 0, so unscaled MAD=0.
  2. The mean is 20. The centred squares are four copies of 400 plus 6400, giving M₂=8000 and empirical variance 1600.
  3. The range is 100. The empirical SD is 40, which confirms substantial squared spread despite the tied centre.
  4. Report the tied central group and the extreme observation together. MAD describes a central-rank property here; it is not a proof of equality of every record.

No. MAD=0 while the range is 100 and empirical variance is 1600; a tied majority can hide tails from a robust central scale.

Find every median before choosing a reporting convention

For 1,2,6,9, find the full set of absolute-loss minimizers and the conventional reported median.

  1. The two central order statistics are 2 and 6. Every c in [2,6] has at most half the records strictly below and at most half strictly above.
  2. For 2≤c≤6, the absolute-distance sum is (c−1)+(c−2)+(6−c)+(9−c)=12, independent of c.
  3. To the left of 2, moving toward the central interval reduces the sum; to the right of 6, moving left toward it reduces the sum. The whole minimizer set is therefore [2,6].
  4. The common even-sample reporting convention chooses (2+6)/2=4. This is one median and one minimizer; the optimization does not distinguish it from every other point in the interval.

All c∈[2,6] minimize the loss at 12; the conventional midpoint median is 4.

Track a small spread on top of a large offset

Accumulate 10¹²+1,10¹²+2,10¹²+3 using a count, mean and centred sum. Work in exact arithmetic.

  1. After the first record, n=1, m=10¹²+1 and M₂=0. For the second, δ=1, N=2 and m′=10¹²+3/2.
  2. The new centred sum is 0+1·[(10¹²+2)−(10¹²+3/2)]=1/2.
  3. For the third record, the old count is 2 and δ=3/2. The new mean is 10¹²+2, and the added term is (3/2)·1=3/2. Hence M₂=2.
  4. The empirical variance is 2/3 and the usual sample variance is 1. These exact results support the example. They do not establish that all floating-point implementations retain every small difference at larger magnitudes.

The exact final state is n=3, m=10¹²+2, M₂=2; empirical variance 2/3 and usual sample variance 1.

Compare different distributions with the same mean and variance

Show that A={0,0,3,3} and B={−1,2,2,3} have matching first two empirical moments but different reported medians.

  1. Both totals are 6 across 4 observations, giving mean 3/2.
  2. For A, the centred squares are four copies of 9/4, summing to 9. For B, they are 25/4,1/4,1/4,9/4, again summing to 9.
  3. Both empirical variances are 9/4. Their usual sample variances are both 3, if that denominator is wanted.
  4. The midpoint median of A is (0+3)/2=3/2, while B has middle values 2,2 and median 2. Preserve this shape and rank information rather than treating a matching mean and SD as identical data.

Both have mean 3/2 and empirical variance 9/4, but their midpoint medians are 3/2 and 2.

Attain the squared-distance tail bound

For −2,0,0,0,0,0,0,2, find the fraction at distance at least 2 from the mean and compare the empirical bound.

  1. Symmetry gives mean 0. The centred sum of squares is 4+4=8 across 8 records, so v=1.
  2. The two endpoint records satisfy |xᵢ|≥2, and the six zeros do not. The outside fraction is 2/8=1/4.
  3. The bound is v/t²=1/4 for t=2, exactly matching the observed fraction. This example establishes that the inclusive inequality can be sharp.
  4. The inside complement is |xᵢ|<2, containing 6/8=3/4. With |xᵢ|≤2 all eight records are included; the endpoint convention must therefore remain visible.

The outside fraction 1/4 attains the bound 1/4. The strict inside fraction is 3/4; the closed interval includes every record.

Distinguish repeated records from equal weighting of distinct values

One record is 2 and three records are 8. Compare the frequency-weighted distribution with a distribution giving the two distinct values equal weight.

  1. For the four actual records, total 26 gives mean 13/2. Weighted centred squares are (2−13/2)²+3(8−13/2)²=27.
  2. The empirical variance is 27/4. If these are four records under the usual sample-variance convention, divide 27 by 3 to obtain 9.
  3. Giving distinct values 2 and 8 equal weight instead gives mean 5 and empirical variance [(2−5)²+(8−5)²]/2=9.
  4. The difference is a target change: each individual record versus each distinct recorded value. For general design weights, do not infer a sample-variance denominator from these frequency-count calculations.

Frequency weighting gives mean 13/2 and empirical variance 27/4. Equal weighting of the two values gives mean 5 and empirical variance 9.

Try it yourself

  1. For records 2,3,3,4,8, calculate Fₙ(3). Does that value alone prove that a future response has probability 3/5 of being at most 3?

    Show the answer and reasoning

    Fₙ(3)=3/5. A future-response probability requires a population and sampling or prediction model.

    Three of the five recorded observations are at most 3. The empirical fraction describes those records; collection bias, dependence or changing conditions can prevent an automatic future-probability interpretation.

  2. A database codes three colours as 1,2,3. Why does the arithmetic mean of the codes generally fail as a centre of colour?

    Show the answer and reasoning

    The code values are arbitrary labels, so their arithmetic gaps and mean have no intrinsic colour interpretation.

    Recoding the same categories changes the numerical mean without changing the observations. Category frequencies and modes retain a meaning that arbitrary arithmetic on nominal labels does not.

  3. For 2,3,3,4,8, use the centred-square identity to find the squared-distance loss at c=6 without resumming five squares.

    Show the answer and reasoning

    M₂+n(c−x̄)²=22+5(6−4)²=42.

    The saved mean is 4 and M₂=22. The cross term vanishes because centred deviations sum to zero, so changing the candidate centre adds precisely n(c−x̄)².

  4. For 0,0,0,5, is 0 a median even though three observations equal it? State the median interval.

    Show the answer and reasoning

    Yes. The central order statistics are 0 and 0, so the median interval is the singleton{0}.

    No more than half the records lie strictly below 0, and only one lies strictly above it. A median definition requiring strictly half on each side would incorrectly reject tied data.

  5. An empirical-inverse rule uses Q(p)=x₍ceil(np)₎ for 0<p≤1. What extra definition is needed at p=0, and what happens for a one-record sample?

    Show the answer and reasoning

    Define Q(0)=x₍₁₎ explicitly. For n=1 every p∈[0,1] returns the sole observation.

    Substituting p=0 into ceil(np) would request an invalid order-statistic index 0. A stated endpoint convention makes the rule complete; the linear type 7 rule also returns the sole value for n=1.

  6. For a finite data set with n=5 and M₂=22, give empirical variance and usual sample variance, with their roles.

    Show the answer and reasoning

    Empirical variance is 22/5; usual sample variance is 22/4=11/2.

    The first is the variance of the equally weighted recorded distribution. The second is an unbiased estimator of a common finite population variance under an IID model, rather than an alternative empirical probability distribution.

  7. A single finite observation is 7 metres. What are its empirical variance and usual n−1 sample variance?

    Show the answer and reasoning

    Empirical variance is 0 square metres; the n−1 sample variance is undefined.

    The sole deviation from its mean is 0. Dividing M₂ by n=1 is valid, while dividing by n−1=0 is not. The undefined estimator should not be silently reported as a zero population variance.

  8. If y=−3x+10, how do the mean, variance and standard deviation change?

    Show the answer and reasoning

    ȳ=−3x̄+10, Var_y=9Var_x and SD_y=3SD_x, using matching denominators.

    The centred deviation is −3 times the old deviation. Squaring removes the sign and multiplies by 9; a standard deviation is nonnegative and therefore scales by the absolute factor 3. The additive 10 cancels in centred differences.

  9. For 2,3,3,4,8, distinguish the mean absolute deviation about the mean from the unscaled median absolute deviation.

    Show the answer and reasoning

    The first is 8/5 about mean 4; the second is 1 about median 3.

    Distances from 4 are 2,1,1,0,4, whose mean is 8/5. Distances from 3 are 1,0,0,1,5, whose median is 1. Both the aggregation rule and the centre differ.

  10. Can a data set with a nonzero range have zero MAD? Give and explain an example.

    Show the answer and reasoning

    Yes:0,0,0,0,100 has range 100 and unscaled MAD 0.

    Its median is 0 and a majority of the absolute deviations are 0. The robust central scale ignores the extreme for this rank calculation, so zero MAD does not establish that every record is identical.

  11. A group of 2 has mean 3 and a disjoint group of 3 has mean 10. What is the pooled mean, and why is the average of the two means a different calculation?

    Show the answer and reasoning

    The pooled mean is (2·3+3·10)/5=36/5; the equal-group average is 13/2.

    Pooling individual records preserves their total and count. Averaging group means gives each group equal weight despite their different sizes. The choice must match the intended observational target.

  12. Using n_A=2,n_B=3,m_A=3,m_B=10,M₂,A=2,M₂,B=8, find the combined M₂.

    Show the answer and reasoning

    M₂=2+8+(10−3)²·2·3/5=344/5.

    The within-group terms sum to 10, while separated means add 294/5. Averaging within-group variances alone cannot recover the overall spread.

  13. For fixed nonnegative descriptive weights, what happens to weighted mean and empirical weighted variance if every weight is multiplied by 100? Does that justify using Σw−1 for every weighted sample variance?

    Show the answer and reasoning

    Both descriptive summaries are unchanged. No universal Σw−1 denominator follows.

    The common factor cancels from each descriptive ratio. A denominator Σw−1 does not scale in the same way and depends on the weights being meaningful replication counts in that particular interpretation. Survey and precision weights require their own models.

  14. An accumulator has n=2,m=10¹²+3/2,M₂=1/2. Add x=10¹²+3 using the centred update.

    Show the answer and reasoning

    δ=3/2,N=3,m′=10¹²+2,M₂′=2.

    Use the old mean for δ, then compute M₂′=1/2+(3/2)[(10¹²+3)−(10¹²+2)]=2. Updating the old state prematurely can change the intended identity.

  15. Two samples share their mean and variance. Must their medians, tails and empirical distributions agree?

    Show the answer and reasoning

    No. A={0,0,3,3} and B={−1,2,2,3} share mean 3/2 and empirical variance 9/4, but have different midpoint medians.

    Both centred sums are 9 across 4 records, yet their ordered values and ties differ. Scalar moments omit distributional information unless an additional justified model supplies it.

  16. Why does symmetry of the standard Cauchy density about 0 fail to establish a finite population mean 0? Can a finite recorded sample still have a mean?

    Show the answer and reasoning

    Symmetric cancellation gives a principal value, while the positive and negative expectation parts diverge. A finite list of finite recorded values still has an arithmetic mean.

    The absolute first-moment integral grows as log(1+R²)/π over [−R,R]. Ordinary finite expectation cannot be obtained by cancelling divergent parts. Population integrability and finite-data arithmetic are different questions.

  17. A finite sample has mean m and empirical variance v=9 square units. What bound follows for the fraction at distance at least 6 units from m? Does it assert exactly 75 percent are within 6?

    Show the answer and reasoning

    The outside fraction is at most 9/36=1/4, so at least 3/4 are at distance strictly less than 6. Equality is not guaranteed.

    Count each outside squared deviation as contributing at least 36. The bound is an inequality about the empirical distribution. Its complementary inside event is strict because the outside event includes the threshold.

  18. For five observations with usual sample variance 11/2, give the sample SD and the usual estimated standard error of the mean under an explicitly justified IID finite-variance model. Why might the latter fail for repeated measurements on one object?

    Show the answer and reasoning

    s=√(11/2); estimated SE=√(11/10). Dependence can make the IID variance-of-the-mean formula inappropriate.

    The SD describes dispersion among values. Under independent equal-variance sampling, Var(X̄)=σ²/5, motivating s/√5. Correlations introduce covariance terms, so five records need not be five independent sampling units.

What to carry forward

  • An empirical distribution describes recorded observations; a population or sampling interpretation requires additional context and assumptions.
  • Mean, median and mode retain different features. The mean minimizes finite squared loss; the whole median interval minimizes absolute loss.
  • State the quantile algorithm, endpoint rules, denominator, units and weight interpretation so that a calculation can be reproduced.
  • Empirical variance uses n; the usual n−1 sample-variance estimator has its unbiasedness property under an IID finite-variance model.
  • Robust scales can preserve central-rank information while missing consequential tails or tied-data variation. Report what the question needs.
  • Pooling must retain group sizes and between-group variation. Centred incremental and merge formulas are exact algebraic identities with finite-precision limitations.
  • Matching means and variances do not determine a distribution, and finite sample calculations do not prove that a proposed population has those moments.
  • Spread of observations and uncertainty of an estimator have different targets. Keep sampling assumptions separate from descriptive summaries.

References

Sources for the concepts and teaching approaches in this article.

  1. NIST/SEMATECH e-Handbook of Statistical MethodsNIST/SEMATECHEngineering Statistics Handbook · §1.3.5.1; means, medians, modes and sensitivityMeasures of LocationMeasures of ScaleCauchy Distributionitl.nist.gov
  2. Sample QuantilesR Core TeamOfficial stats-package reference · probability endpoints and sample-quantile Types 1 and 7stat.ethz.chRead source