Checking how duplicated rows affect two variance conventions
Repeat every row of a short list and compare how population variance stays put while sample variance changes, because the sample divisor depends on the count.
Two divisors for one sum of squares
Variance starts from the sum of squared deviations from the mean, here called M2. Population variance divides M2 by n, the number of values. Sample variance divides M2 by n minus 1. The two conventions answer different questions: population variance describes the spread of the list itself, while sample variance estimates the spread of a wider population from which the list was drawn. The Variance Calculator offers both through its mode setting. Duplicating every row changes n and M2 in a way that leaves one convention unchanged and moves the other, which is a useful probe for how a report was built. If you know that a table's population variance did not move after an import but its sample variance did, the row count changed and the values kept their proportions, which is exactly the signature of repeated rows.
The original two-value list
Take the values 1 and 3. The mean is 2, the deviations are minus 1 and 1, and M2 is 1 plus 1, which is 2. Population variance is M2 divided by 2, giving 1. Sample variance is M2 divided by 1, giving 2. In sample mode the calculator returns 2 for this list. With only two values the sample divisor is 1, so the sample variance is double the population variance. That ratio of n over n minus 1 shrinks as the list grows, and it is largest for the shortest lists.
Repeating the list once
Repeat the list to get 1, 3, 1, 3. The mean is still 2, and the four deviations are minus 1, 1, minus 1 and 1. M2 doubles to 4. Population variance divides by 4 and stays at 1, so the value proportions are unchanged and the population measure agrees. Sample variance divides by 3, giving four thirds, or 1.3333. The tool returns 1.3333333333333333 in sample mode, which is four thirds written with finite floating-point precision. The sample variance fell from 2 to 1.3333, without any change in the distribution of the values.
Repeating the list three times
Repeat the pair three times to get six values: 1, 3, 1, 3, 1, 3. M2 is now 6, since each of the six deviations contributes 1. Population variance is 6 divided by 6, which is 1. Sample variance is 6 divided by 5, which is 1.2. The pattern is general. If each row is repeated k times, M2 becomes k times its original value, and n becomes k times the original count. The sample divisor is k times n minus 1, so the sample variance approaches the population value from above as k grows, but only because the divisor grew, not because the data became more informative.
A three-value example
Take 2, 4 and 6. The mean is 4 and M2 is 4 plus 0 plus 4, which is 8. Population variance is 8 divided by 3, about 2.6667, and sample variance is 8 divided by 2, which is 4. Repeat the list to get 2, 4, 6, 2, 4, 6. M2 doubles to 16 and n becomes 6. Population variance is 16 divided by 6, which is again about 2.6667. Sample variance is 16 divided by 5, which is 3.2. The sample figure dropped from 4 to 3.2, and the population figure held. Both examples show the same asymmetry.
Detecting accidental duplication in a report
If a variance changes after a data join or import, but the population version does not, duplicated rows are a likely cause. Joins that multiply rows, such as matching each customer to several orders, can repeat observations without anyone intending it. A shrinking sample variance together with a growing count is a signal to inspect row identities. Counting distinct identifiers against the number of rows is a fast check. For example, if a table of 40 rows contains only 20 distinct order numbers, each order may have been copied once, and a sample variance computed on the 40 rows will be too small compared with the one computed on the 20. The calculator treats the supplied values as the list, and it cannot tell that a row is a repeat.
Why copying rows does not add information
Repeated observations are not independent. A sample of two values copied five times has ten entries but still only two pieces of evidence. The smaller sample variance that results from the larger divisor would understate the uncertainty if it were used to build an interval or a test. Increasing a sample size by duplicating rows is therefore not a valid technique. The worksheet isolates how the formula responds to repetition so that the effect can be recognized, and it should not be read as a justification for inflating counts. Legitimate repeated measurements do exist, such as three readings of the same sample, but those need a model that accounts for the grouping, and simply stacking them in one list does not do that.
The size of the sample correction
The factor n over n minus 1 links the two conventions: sample variance equals population variance times n over n minus 1. For n equal to 2 the factor is 2, for 4 it is 1.3333, for 10 it is 1.1111 and for 100 it is 1.0101. The correction matters most for short lists, which is where accidental duplication hurts most, because a small list copied a few times looks like a moderately sized one. The factor exists because deviations measured from the sample mean come out smaller on average than deviations from the true mean, and dividing by n minus 1 compensates for that on average.
Choosing the right mode for your data
Use population mode when the list is the entire group of interest, such as every value in a closed batch. Use sample mode when the list is a subset used to estimate a larger group. When in doubt about the convention a software package used, test it on 1 and 3: a result of 2 means the sample convention, and 1 means the population convention. Spreadsheets name these differently, so check the documentation instead of relying on function names alone. Population functions usually carry a P in the name and sample functions an S, but older functions without a suffix follow the sample convention, which is a frequent source of mismatched results between workbooks.
Reproduce the checks
Original sample statistic
Open the Variance Calculator and enter:
- Numbers
1,3- Calculation mode
sample
Expected output:
Variance
2The two-item sample divisor is one.
Duplicated population statistic
Open the Variance Calculator and enter:
- Numbers
1,3,1,3- Calculation mode
population
Expected output:
Variance
1The value proportions remain unchanged.
Duplicated sample statistic
Open the Variance Calculator and enter:
- Numbers
1,3,1,3- Calculation mode
sample
Expected output:
Variance
1.3333333333333333This is four thirds, represented with finite floating-point precision.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- Primary definition and convention reference ↗ · 2026-10-08