Skip to content
All references

Math reference

Statistics & Random Sampling Basics

Compare mean, median, mode, variance and standard deviation, with examples explaining sample data and random selections.

10 of 10 entries

Location

Arithmetic mean

2, 4, 6 → (2 + 4 + 6) / 3 = 4

The mean uses every value and is affected by extreme observations. It is not automatically the best representation of a typical value.

Location

Median

1, 3, 5, 100 → (3 + 5) / 2 = 4

Sort the values first. For an even count, average the two central values. The median is less sensitive to a single extreme value than the mean.

Location

Modes and ties

1, 1, 2, 2, 3 → modes 1 and 2

The mode is a most frequent value; several values may tie. This calculator reports no mode when every value occurs only once.

Spread

Range

2, 4, 9 → 9 − 2 = 7

Range is maximum minus minimum. It depends only on the two extremes and does not describe the distribution between them.

Spread

Population variance

1, 2, 3 → mean 2
[(1−2)² + (2−2)² + (3−2)²] / 3 = 2/3

Use divisor n when summarizing the complete population under consideration. Variance has squared units, which can make its size less intuitive.

Spread

Sample variance

1, 2, 3 → squared-deviation sum 2
Sample variance = 2 / (3−1) = 1

The n−1 divisor is used for the usual sample variance estimator. A single observation is insufficient, and choosing this formula does not make an unrepresentative sample representative.

Spread

Standard deviation

Standard deviation = square root of variance

Standard deviation uses the same units as the original data. It is a measure of spread, not a confidence interval or an error bound for an individual prediction.

Random selection

Sampling with and without replacement

With replacement: 4, 4, 2 can occur.
Without replacement: every selected integer is distinct.

Turn off repeats when each number should be selected at most once. A request for unique values cannot exceed the number of possibilities in the inclusive interval.

Random selection

Random does not mean evenly spaced

1, 2, 3, 4 can be a random outcome.

Clumps and consecutive values can occur in a fair draw. Inspecting a short output list cannot establish the quality of a random source.

Random selection

A generator is not an audit trail

Browser randomness → local output
No independent draw log is created.

For regulated drawings or research requiring reproducibility, follow the required protocol and record the method. An informal generator does not supply independent auditing or a reproducible seed.