Basic Statistics Guide
Understand center, spread and position with one worked dataset. Compare statistical methods, read accurate charts and separate a z-score from a probability.
Worked calculations · Four original charts · Practice with answers
Check the example datasetStart with the data and the question
Descriptive statistics summarize the observations you have. A center measure describes a typical location; spread describes variation; a percentile describes position under a stated method. None of these summaries, by itself, establishes cause and effect or guarantees that a sample represents a larger population.
Our illustrative scores, in points, are . There are observations, even though only four distinct values appear. Keep both copies of : each is a separate observation. The values are already sorted from smallest to largest.
- Identify what each observation measures and keep the units consistent. A mean of numerical identification codes has no useful quantitative meaning.
- Check missing entries, transcription errors and repeated observations. A missing score is not automatically a zero; a repeated score is not automatically a duplicate record to delete.
- State whether you are describing an entire population or using a sample to estimate one. Then choose the summary and, where relevant, the quantile or rank convention.
In the formulas below, denotes an observation; denotes the observation in sorted position . The letters and distinguish sample and population counts, while and distinguish their means.
| Measure | Formula | Meaning and convention |
|---|---|---|
| Arithmetic mean | Use numerical values with meaningful distances and matching units. is the observation count. | |
| Median | Sort first. For even , average and . Parenthesized subscripts denote sorted positions. | |
| Range | Subtract the minimum from the maximum. This ignores the positions of all interior observations. | |
| Population variance | Use when these observations form the complete population being described. is that population's mean. | |
| Sample variance | Requires . This is the usual corrected estimator of population variance from a random sample. | |
| Standard deviation | Match the chosen variance convention. Standard deviation has the original measurement unit; variance has its square. | |
| Interquartile range | State the quartile method. This guide uses linear interpolation, R7, for its quartiles and box plot. | |
| Standard score | Requires . A descriptive sample version uses and . Normality is an additional assumption for normal-model probabilities. |
On a narrow screen, swipe the table horizontally or focus it and use the arrow keys. Use your browser's Print command to print the reference or save it as PDF; expand any practice answers you want included.
Mean, median and mode: work through the same list
See every observation
Each dot is one observation; stacking keeps the repeated value visible. The vertical stacking is a count arrangement, not a second measured variable.
1. Add and divide for the mean
The mean uses every observation. Its unit is points, just like the original scores. The dot plot retains the repeated value by stacking its dots instead of drawing one dot for each distinct number.
2. Locate the middle for the median
With five observations, the middle sorted position is . The third value is , so the median is points. Position three is an index; it is not the median value.
3. Count repetitions for the mode
The value appears twice; each other value appears once. The mode is therefore points. The arithmetic mean and median need not equal the mode.
Even counts and multiple modes
For , average the two middle values: . A median can fall between observations. The list has two repeated modes, and . Under this guide's repeated-mode convention, a list in which every value appears once has no repeated mode. Some software instead reports every maximum-frequency tie; name the convention when that distinction matters.
Try the even-count medianFrequency tables keep repeated observations
The same dataset can be stored as distinct values with frequencies . Multiply each value by its frequency , then divide by the total frequency. Taking an unweighted mean of just the distinct values would change the dataset.
Check the equivalent frequency inputWhy the median can be more informative with extremes
Replace the final score with . The mean becomes , while the median stays . This comparison demonstrates sensitivity to the magnitude of an extreme value; it does not prove that the value is an error. Investigate the observation and report the distribution's context before choosing a single summary.
Compare the changed dataset. OpenStax's center-measures chapter explains mean, median, mode and frequency-weighted means.
Range, variance and standard deviation
For the original list, the range is points. Range uses only the endpoints. Variance and standard deviation also use the interior values, by measuring deviations from the relevant mean.
1. Subtract the mean and square each difference
The mean is . Subtract it from each observation, then square each signed difference. Keep both rows containing ; compressing them into a frequency row would require multiplying that row's contribution by its count.
| Observation | |||
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 |
The unsquared deviations add to zero: . Squaring avoids cancellation and gives large deviations more influence. Standard deviation is not the arithmetic average of absolute distances; mean absolute deviation is a different measure.
2. Choose the denominator for the question
Estimating the mean from the same sample leaves freely varying deviations because their sum is fixed at zero. Dividing by gives the usual unbiased variance estimator for independent, identically distributed observations with finite variance. Taking its square root does not make sample standard deviation exactly unbiased. The unobserved population variance is not known just because a sample calculation is available.
3. Report units, convention and rounding
Variance is in squared points, while standard deviation and range are in points. Here sample variance and range both have the numerical value , but their units and meanings differ. Keep exact fractions and roots until the final display, state whether the result is sample or population based, and round only at the end. See OpenStax's spread definitions.
Percentile values: state the method before calculating
A percentile value starts with a requested percentage and returns a value on the data's scale. Small-sample definitions differ. This guide uses linear interpolation called R7, described in the official R quantile documentation. Let be the requested fraction between and , rather than the percentage number.
Interpolate between sorted values
The gold point lies partway between the third and fourth sorted values. An interpolated percentile need not be an observed value. The horizontal scale is position, not percentage.
Find the sixtieth percentile using R7
- Convert to , then calculate the sorted position.
- The position lies of the way from the third observation to the fourth. Those values are and .
The R7 sixtieth percentile is points. It need not be an observation in the list. At the endpoint probabilities, use the minimum for and the maximum for directly; do not interpolate past the data.
Reproduce the R7 percentileCompare nearest-rank R1
For , the nearest-rank method takes sorted position . At , that is , so the result is . The zero-percentile endpoint is the minimum. This answer differs from R7 because the rule differs, not because one calculator must be broken.
Compare nearest-rank results. The official R documentation defines nine methods. Match the convention required by your course, report or software workflow, and keep it fixed when comparing datasets.
Percentile ranks: account for ties explicitly
Percentile rank reverses the question: start with a value and count its position relative to observations. For the score , there is one observation below it and two equal to it. Write , and . Three common counting rules give different results.
These percentages describe different counts. Other conventions, such as average occupied rank, also exist. A percentile value and a percentile rank are not generally exact inverse operations on a finite dataset, especially with ties or interpolation. Record the rule alongside the number.
Check the midpoint rank and compare tie rulesQuartiles, interquartile range and box plots
R7 quartiles and box plot
The thick median line is also the box's left boundary. Whiskers end at observed values, not automatically at the fences. Small tied datasets need not put exactly half the observations inside the box.
Using R7 throughout, the quartile positions for this list are , and . Therefore , and . The median equals the first quartile here because of repeated values; its line correctly coincides with the left edge of the box.
For the common outside-fence screening rule, calculate the lower and upper fences using times the IQR.
Flag observations strictly below or strictly above . The maximum is exactly , so it is not outside the fence. The whiskers end at observed values and , not at arbitrary points on the axis.
Quartile definitions can change a small-sample box plot. A median-of-halves method that excludes the overall median would instead give and for this list. The linked calculator presets explicitly select R7 to match this guide. With ties, the interval between quartiles need not contain exactly half the recorded observations.
The NIST box-plot reference explains fences and whiskers. This guide includes observations exactly on a fence, matching the no-more-than-distance rule in the R box-plot documentation; its quartile estimator is stated separately. Treat an outside-fence point as a reason to investigate, not an automatic instruction to delete it.
A z-score measures standardized distance
A z-score subtracts a reference mean and divides by a positive reference standard deviation. It can be calculated for nonnormal data. For a separate score of points, reference mean points and standard deviation points, follow three steps.
- Subtract the reference mean: points.
- Interpret the result as standard deviations above the mean. The matching units cancel, so the score is dimensionless. It is not and is not itself a percentile.
Using a sample's own mean and standard deviation gives the descriptive standardized value when . In either version, a positive score is above the reference mean and a negative score is below it. Standardizing changes location and scale; it does not transform a skewed distribution into a normal one.
Check the z-score with normal probabilities switched off. SciPy's standardization documentation describes the mean, standard deviation and denominator convention separately from probability modeling.
A normal probability requires an additional assumption
A separate normal-model example
This curve assumes a normal distribution; it is not an inference from the five observations. The probability includes the left tail beyond the displayed window. Height is density, while area represents probability.
Now explicitly assume the population of scores follows a normal distribution with mean and standard deviation . Under that model, the standardized random variable is standard normal. The probability of a score at or below is the area to the left of .
Here is the standard normal cumulative distribution function. The model predicts about at or below the cutoff. This does not establish an empirical percentile rank in the five-value dataset, which is a separate example with a different center and spread.
The curve is drawn from the standard normal density . The displayed window is , but the calculated left-tail probability includes values below the visible window. Curve height is density, not the probability of that single score.
Check the explicitly assumed normal modelUse an observed rank calculation when the question concerns the actual list. Use a normal probability only when the problem supplies or justifies that distributional model. The distinction is explained by the definitions in OpenStax's standard-normal chapter; the standardization arithmetic alone does not supply the assumption.
Practice: calculate, then interpret
Open each answer after trying the calculation. The disclosures work with a keyboard and without JavaScript.
What is the median of ?
There are four sorted observations, so average the second and third: . The answer is , even though no observation equals . Choosing only the lower middle value would use a different rule from the numerical median taught here.
What is the sample variance of ?
The mean is , so every deviation is zero. The squared-deviation total is zero and the sample denominator is , giving . Sample standard deviation is also zero. A z-score using that standard deviation would be undefined.
Standardize using mean and standard deviation .
Compute . The value lies two standard deviations below the reference mean. This statement does not require normality. A lower-tail probability would be an additional calculation under an explicitly chosen distributional model.
Frequently Asked Questions
Which average should I use: mean, median or mode?
Why do sample and population standard deviations differ?
Is standard deviation the average distance from the mean?
Why do percentile calculators sometimes disagree?
Is a percentile rank the same as a percentile value?
Do z-scores require normally distributed data?
What happens with one observation or all identical values?
Should an outlier be removed before calculating statistics?
Sources and verification
The examples are illustrative, not sampled research findings. Exact rational calculations, squared deviations, percentile conventions, tie counts, chart coordinates and normal probabilities were independently checked. Calculator presets specify the conventions used here, and approximation signs distinguish rounded results.
- OpenStax: Measures of the Center of the Data
Mean, median, repeated values and frequency-weighted means.
- OpenStax: Measures of the Spread of the Data
Population and sample variance, standard deviation and interpretation of spread.
- R statistics documentation: Sample Quantiles
Nine established quantile methods, including R7 linear interpolation and R1 inverse empirical distribution quantiles.
- NIST: Box Plot
Quartile-based plots, fences and observation-based whiskers. The guide declares its quartile estimator separately.
- SciPy documentation: zscore
Standardization relative to a mean and standard deviation, with the denominator convention specified.
- OpenStax: The Standard Normal Distribution
Normal-model standard scores and the additional assumptions behind normal probabilities.
- R documentation: Box Plot Statistics
Whiskers include observations no more than the stated distance from the box; hinge definitions are separate from the R7 estimator used here.
Related calculators and reading
- Mean, Median and Mode Calculator
Summarize raw observations or frequency counts with explicit quartile conventions.
- Standard Deviation Calculator
Compare sample and population results and inspect each squared deviation.
- Percentile Calculator
Compare quantile definitions and percentile-rank tie rules.
- Z-Score Calculator
Standardize values and choose separately whether to enable normal probabilities.
- Percentage Formulas
Review percentages and proportions used in percentile and rank calculations.
- Slope and Intercept Explained
Connect coordinate graphs with the idea of linear interpolation.
Who maintains this page
Ownership and review
Written and maintained by the Toolarithm editorial team. The method was last reviewed on . No independent professional review is claimed.
Methodology
The editorial team checks definitions, examples, linked tools, and cited references. Dates shown here come from the page's maintained publication record.
Read the editorial methodologyDates and sources
Published . Updated .