Variability in statistics is how spread out a set of values is: how far the data points sit from one another and from the center of the data. Two data sets can share the same mean and still look nothing alike, and variability is the number that tells them apart. The most common measures of variability are the range, the interquartile range (IQR), the variance, the standard deviation and the coefficient of variation.
Below, every one of them is worked by hand on one small data set, with each step in a table. You will also see when to divide by n − 1 instead of N, why your IQR might not match the answer key, and which measure to report when the data have outliers or skew.
What Is Variability in Statistics?
So what is variability, in plain terms? It describes how much the values in a data set differ from each other. If every student in a class scores 15 out of 20 on a quiz, there is no variability at all. If the scores run from 8 to 20, there is a lot. It is also called spread, dispersion or scatter.
A measure of center, such as the mean or median, tells you where the data cluster. A measure of variability tells you how tightly they cluster. You need both, because a mean alone can't tell you whether it describes most of the values or only a few.
- Low variability: values bunch close together, so the mean is a good prediction for any single value.
- High variability: values are scattered, so individual values can sit far above or below the mean.
Note that variability is the general idea, and variance is one specific way to measure it.
What Does Variability Mean in Math?
In a middle-school math course, variability means the same thing, measured with simpler tools. The Common Core grade 6 statistics standards ask students to recognize that "a measure of variation describes how its values vary with a single number" and to summarize data with the interquartile range and/or the mean absolute deviation (MAD). The high school standards then add the standard deviation. So if a worksheet asks about variability in math, it most likely wants the IQR or MAD, both worked out below.
Why Variability Matters
Variability changes what the average means and how far you can trust it.
- It shows whether the mean is typical. A class where everyone scored 14 to 16 needs a different lesson plan from one with scores from 8 to 20, even if both average 15.
- It drives uncertainty. The standard error of a sample mean is s ÷ √n, so more spread means a larger standard error, wider confidence intervals and less power in a t-test. ANOVA is built on the same idea: it compares the variability between group means with the variability within the groups.
- It measures consistency. Manufacturers track the spread of part dimensions, and labs track the spread of repeated measurements.
- It flags unusual values. Z-scores, outlier fences and quality-control limits are all built from a measure of spread.
Psychology results sections usually report a mean and standard deviation (M and SD) for every group. Our guide to psychology statistics help covers the tests that come next.
The Main Measures of Variability at a Glance
In the formulas below, x is a data value, x̄ is the sample mean, μ is the population mean, n is the sample size and N is the population size.
| Measure | Formula | Units | Values used | Effect of outliers |
|---|---|---|---|---|
| Range | Maximum − minimum | Data units | Two extremes only | Very large |
| Interquartile range (IQR) | Q3 − Q1 | Data units | Middle 50% of the data | Small |
| Mean absolute deviation (MAD) | Σ|x − x̄| ÷ n | Data units | Every value | Moderate |
| Variance | Sample: s² = Σ(x − x̄)² ÷ (n − 1); population: σ² = Σ(x − μ)² ÷ N | Squared units | Every value | Large |
| Standard deviation | s = √s² or σ = √σ² | Data units | Every value | Large |
| Coefficient of variation (CV) | (SD ÷ mean) × 100 | None (a percent) | SD and mean | Large |
Worked Example: Two Quiz Sections with the Same Mean
Two small sections of an intro statistics course took the same 20-point quiz. Each section has eight students. Here are their scores, sorted from lowest to highest.
| Section | Scores (sorted) | n | Sum | Mean | Median |
|---|---|---|---|---|---|
| A | 13, 14, 14, 15, 15, 16, 16, 17 | 8 | 120 | 15.0 | 15.0 |
| B | 8, 11, 13, 15, 16, 18, 19, 20 | 8 | 120 | 15.0 | 15.5 |
Report only the averages and the sections look identical. The raw scores say otherwise: section A is tightly bunched, while section B has two students who struggled (8 and 11) and three near the top (18, 19 and 20). Every measure below puts a number on that difference.
Step 1: Range
Range = maximum − minimum.
- Section A: 17 − 13 = 4 points
- Section B: 20 − 8 = 12 points
The range is quick to find and easy to explain, but it uses only two scores. You could change any of the six middle scores in section B and the range would still be 12.
Step 2: Interquartile Range
The interquartile range is the range of the middle 50% of the scores, as the Online Statistics Education textbook puts it: IQR = Q3 − Q1. Using the median-of-halves method taught in many intro courses:
- Sort the data and find the median. With n = 8, the median is the average of the 4th and 5th values.
- Split the data into a lower half (the first four values) and an upper half (the last four).
- Q1 is the median of the lower half, and Q3 is the median of the upper half.
| Section | Lower half | Q1 | Upper half | Q3 | IQR |
|---|---|---|---|---|---|
| A | 13, 14, 14, 15 | (14 + 14) ÷ 2 = 14 | 15, 16, 16, 17 | (16 + 16) ÷ 2 = 16 | 16 − 14 = 2 |
| B | 8, 11, 13, 15 | (11 + 13) ÷ 2 = 12 | 16, 18, 19, 20 | (18 + 19) ÷ 2 = 18.5 | 18.5 − 12 = 6.5 |
The middle half of section B covers 6.5 points, more than three times section A's 2 points. The IQR also gives you the standard outlier check: a value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is flagged. For section B the fences are 12 − 9.75 = 2.25 and 18.5 + 9.75 = 28.25. No score falls outside them, so section B's spread is real, not the work of one odd value.
Why Your IQR Might Not Match the Answer Key
There is no single agreed formula for quartiles. Hyndman and Fan's paper "Sample Quantiles in Statistical Packages" in The American Statistician compared nine definitions used by statistical software. With small data sets the choice changes your answer, and section B produces three different IQRs:
| Method | Where you will see it | Q1 | Q3 | IQR |
|---|---|---|---|---|
| Median of halves | Many intro textbooks; TI-84 1-Var Stats | 12 | 18.5 | 6.5 |
| Inclusive interpolation | Excel QUARTILE.INC; R's default quantile(); Python quantiles with method="inclusive" | 12.5 | 18.25 | 5.75 |
| Exclusive interpolation | Excel QUARTILE.EXC; the default in Python's statistics.quantiles() | 11.5 | 18.75 | 7.25 |
None of these is wrong. Use the method your course or software expects, and name it when you write up an analysis. Section A gives Q1 = 14 and Q3 = 16 under all three methods, because tied values sit exactly where its quartiles fall.
Step 3: Mean Absolute Deviation
The mean absolute deviation is the average distance from the mean, ignoring direction: MAD = Σ|x − mean| ÷ n.
- Section A distances from 15: 2, 1, 1, 0, 0, 1, 1, 2. They add to 8, so MAD = 8 ÷ 8 = 1.0 point.
- Section B distances from 15: 7, 4, 2, 0, 1, 3, 4, 5. They add to 26, so MAD = 26 ÷ 8 = 3.25 points.
So a typical student in section A scored about 1 point from the class average, and a typical student in section B about 3 points. That sentence is the interpretation most grade 6 and 7 worksheets want.
Variance and Standard Deviation, Step by Step
Both measures use every value and square each deviation, so large deviations count for far more than small ones. Here is the deviation table (the mean is 15 in each section).
| A: score | A: x − 15 | A: (x − 15)² | B: score | B: x − 15 | B: (x − 15)² |
|---|---|---|---|---|---|
| 13 | −2 | 4 | 8 | −7 | 49 |
| 14 | −1 | 1 | 11 | −4 | 16 |
| 14 | −1 | 1 | 13 | −2 | 4 |
| 15 | 0 | 0 | 15 | 0 | 0 |
| 15 | 0 | 0 | 16 | 1 | 1 |
| 16 | 1 | 1 | 18 | 3 | 9 |
| 16 | 1 | 1 | 19 | 4 | 16 |
| 17 | 2 | 4 | 20 | 5 | 25 |
| Total | 0 | 12 | Total | 0 | 120 |
Two quick checks: the deviations in each section must add to zero, and no squared deviation can be negative. The total of the squared column is the sum of squares (SS): 12 for section A and 120 for section B.
Now divide the SS: by n − 1 = 7 if the eight scores are a sample, or by N = 8 if they are the whole population you care about. The standard deviation is the square root either way.
| Measure | Formula | Section A | Section B |
|---|---|---|---|
| Sample variance (s²) | SS ÷ (n − 1) | 12 ÷ 7 = 1.71 points² | 120 ÷ 7 = 17.14 points² |
| Sample standard deviation (s) | √s² | 1.31 points | 4.14 points |
| Population variance (σ²) | SS ÷ N | 12 ÷ 8 = 1.50 points² | 120 ÷ 8 = 15.00 points² |
| Population standard deviation (σ) | √σ² | 1.22 points | 3.87 points |
Reading the Standard Deviation
Variance comes out in squared units (points squared), which is hard to picture. The standard deviation puts the spread back into points, so you can read it as a rough typical distance from the mean. Section B's sample standard deviation of 4.14 is a little over three times section A's 1.31.
It also lets you compare individual scores across groups. A z-score is (x − mean) ÷ SD:
- A 17 in section A: (17 − 15) ÷ 1.31 = 1.53 standard deviations above the mean.
- A 19 in section B: (19 − 15) ÷ 4.14 = 0.97 standard deviations above the mean.
The 17 is the more unusual result, even though it is the lower score, because section A has so little spread.
Two rules of thumb help. For bell-shaped, symmetric data, about 68% of values fall within one standard deviation of the mean and about 95% within two (the Empirical Rule). For any distribution, at least 75% fall within two standard deviations (Chebyshev's Rule). Both are covered in OpenStax Introductory Statistics, section 2.7. In our quiz data, 6 of the 8 scores in each section lie within one sample standard deviation of the mean.
Sample vs Population Variance: Which One Do You Need?
Picking the wrong divisor is an easy way to lose marks on a variance problem. The rule is about what the data represent, not how many values there are.
- Population (divide by N): your data include every member of the group you care about, and you only want to describe that group. Example: the scores of all eight students in section A, when the question asks only about section A.
- Sample (divide by n − 1): your data are a subset used to say something about a larger group. Example: eight randomly chosen students from a course of 200, used to estimate the spread for the whole course.
Watch the wording. "A sample of", "randomly selected" and "estimate" point to n − 1. "All", "every" and "the entire" point to N. With no clue either way, the sample formula is the usual choice.
Why the Sample Formula Divides by One Less
Sample deviations are measured from the sample mean, which is calculated from those same values. The sample mean sits closer to its own data than the true population mean usually does, so the squared deviations come out slightly too small on average. Dividing by n − 1 instead of n corrects for that and makes s² an unbiased estimate of the population variance. The adjustment is called Bessel's correction.
The degrees-of-freedom view says the same thing. Deviations from the mean must add to zero, so once you know seven of section B's deviations (−7, −4, −2, 0, 1, 3 and 4), the eighth has to be 5. Only n − 1 = 7 of them are free to vary.
The difference matters most for small samples. With n = 8, the sample variance is 8 ÷ 7 times the population version, about 14% larger. With n = 100, the gap shrinks to about 1%.
What Your Calculator or Software Is Doing
| Tool | Sample (n − 1) | Population (N) |
|---|---|---|
| Excel | VAR.S, STDEV.S | VAR.P, STDEV.P |
| Google Sheets | VAR, STDEV | VARP, STDEVP |
| TI-84 (1-Var Stats) | Sx | σx |
| R | var(x), sd(x) | No built-in function; multiply var(x) by (n − 1) ÷ n |
| Python statistics module | variance(), stdev() | pvariance(), pstdev() |
| NumPy | np.var(x, ddof=1), np.std(x, ddof=1) | np.var(x), np.std(x) by default |
| pandas | .var(), .std() by default | .var(ddof=0), .std(ddof=0) |
The trap is NumPy: np.var and np.std divide by N unless you pass ddof=1, while pandas and R default to n − 1. Microsoft's documentation states that STDEV.S assumes a sample and points you to STDEV.P for a whole population.
Coefficient of Variation: Comparing Spread Across Scales
The standard deviation is in the data's own units, which causes trouble when two data sets use different units or have very different means. The coefficient of variation expresses the standard deviation as a percentage of the mean:
CV = (standard deviation ÷ mean) × 100
Suppose section B's final exam, scored out of 100, has a mean of 72 and a standard deviation of 9 points. Compare it with the two quizzes:
| Data set | Mean | Sample SD | CV |
|---|---|---|---|
| Section A quiz (out of 20) | 15 | 1.31 | 1.31 ÷ 15 × 100 = 8.7% |
| Section B quiz (out of 20) | 15 | 4.14 | 4.14 ÷ 15 × 100 = 27.6% |
| Section B final exam (out of 100) | 72 | 9.00 | 9 ÷ 72 × 100 = 12.5% |
The exam has the biggest standard deviation, 9 points against 4.14, but only because it is scored on a bigger scale. Relative to its mean, the exam spread is less than half of section B's quiz spread. Because the units cancel, the CV can also compare spread across different measurements, such as weekly study hours and quiz points.
The CV has two limits. First, it only makes sense for ratio data, measured on a scale with a true zero, such as points, dollars, grams or seconds. The NIST Dataplot reference says it should typically be used only for ratio-scale data. Celsius temperatures fail the test: two days at 10°C and 20°C give a CV of 47.1%, while the same two days in Fahrenheit (50°F and 68°F) give 21.6%. Second, when the mean is close to zero, a tiny change in the mean swings the CV wildly.
Which Measure of Variability Should You Use?
Match the measure to the shape of the data, any outliers and the units involved.
| Situation | Best choice | Why |
|---|---|---|
| Roughly symmetric data, no outliers | Standard deviation, with the mean | Uses every value and feeds z-scores, t-tests and confidence intervals |
| Skewed data or clear outliers | IQR, with the median | Ignores the top and bottom quarters of the data |
| A quick summary or sanity check | Range | Simple to compute and explain, but based on two values |
| Middle-school math or a plain-English summary | MAD | Average distance from the mean in the original units |
| Different units or very different means | Coefficient of variation | Unit-free, but valid for ratio data only |
| Ordinal data, such as Likert ratings | IQR or range | The gaps between categories are not equal, so an SD is hard to defend |
| Inputs to ANOVA, regression or other formulas | Variance | Variances of independent variables add, and squared units are fine inside a formula |
When Outliers Are Present
Suppose one student in section A left the quiz early and scored 3 instead of 13. Every other score stays the same.
| Measure | Section A as recorded | With the 3 | Change |
|---|---|---|---|
| Mean | 15.00 | 13.75 | Down 1.25 |
| Median | 15 | 15 | None |
| Range | 4 | 14 | 3.5 times larger |
| IQR | 2 | 2 | None |
| MAD | 1.00 | 2.69 | About 2.7 times larger |
| Sample SD | 1.31 | 4.46 | About 3.4 times larger |
One low score pushed section A's standard deviation from 1.31 to 4.46, higher than section B's 4.14, even though seven of its eight scores still sit between 14 and 17. The IQR did not move, and the 1.5 × IQR rule flags the 3 as an outlier because it falls below the lower fence of 14 − 3 = 11. The NIST/SEMATECH e-Handbook makes the same point: the IQR and the median absolute deviation are robust measures of scale, while the standard deviation is not. If an outlier is a data-entry error, fix it. If it is real, report the median and IQR, or give the standard deviation with and without it.
When the Data Are Skewed
Household income, home prices, reaction times and minutes spent on homework are usually right-skewed: most values are modest and a few are very large. The long tail inflates both the mean and the standard deviation, so "mean ± SD" can describe impossible values. A homework-time data set with a mean of 40 minutes and an SD of 50 puts one standard deviation below the mean at −10 minutes. OpenStax notes that in skewed distributions the standard deviation may not be much help, and that the quartiles and median give a better summary.
For a thesis or dissertation, where these choices get closer scrutiny, see what to look for when you hire a statistician.
Common Mistakes on Variability Problems
- Using the wrong divisor. Decide "sample or population" before you touch the formula. On a TI-84, copy Sx for a sample and σx for a population.
- Reporting the variance as the standard deviation. The standard deviation can never be larger than the range. If yours is, you probably forgot the square root.
- Rounding too early. Rounding the mean or the deviations mid-calculation makes the final answer drift. Online systems usually want you to round only the final answer; if your problems come from MyStatLab, see our MyStatLab answers guide.
- Forgetting to sort. The range, median and quartiles all need sorted data.
- Squaring negatives on a calculator. (−7)² is 49, but typing −7² without parentheses into many calculators, including the TI-84, returns −49.
- Mixing up units. Variance is in squared units, such as points² or dollars². The range, IQR, MAD and standard deviation are in the original units, and the CV has none.
If a problem set still isn't adding up, or your answers keep missing the key by a decimal place, a tutor can work through it with you. Our statistics homework help gives you worked solutions that show every step, so you can check your own method. When you're ready, post your assignment and compare bids from tutors.
Frequently Asked Questions
What Is Variability in Simple Terms?
Variability is how much the values in a data set differ from one another. Low variability means the values bunch close together, so the average describes them well. High variability means they are scattered, so individual values can sit far from the average. You measure it with numbers such as the range, interquartile range, variance and standard deviation. A data set in which every value is identical has zero variability.
What Are the Four Measures of Variability?
The four measures taught in most statistics courses are the range, the interquartile range, the variance and the standard deviation. The range and IQR come from the sorted positions of the data, while the variance and standard deviation use every value's distance from the mean. Many courses add the mean absolute deviation, especially in middle school, and the coefficient of variation for comparing spread across different scales or units.
Can the Variance or Standard Deviation Be Negative?
No. Both are built from squared deviations, which are never negative, so the variance is zero or positive and so is the standard deviation, its square root. A value of zero means every data point is identical. If you get a negative variance, look for an arithmetic slip, most often typing −7² without parentheses or subtracting in the wrong order when using the shortcut formula.
Why Does Sample Variance Divide by One Less than the Sample Size?
Sample deviations are measured from the sample mean, which sits closer to the sample's own values than the true population mean does. That makes the squared deviations slightly too small on average. Dividing by n − 1 instead of n corrects the bias, so the sample variance becomes an unbiased estimate of the population variance. The correction matters most for small samples and changes very little when n is large.
Is High or Low Variability Better?
It depends on the context. In manufacturing, drug dosing or lab measurement, low variability is the goal because it means consistent results. On a quiz, high variability can tell a teacher the class needs different support for different students, while very low variability can mean the quiz was too easy to separate them. In research, lower variability within groups makes real differences between groups easier to detect.
What Is the Difference Between Variance and Standard Deviation?
The standard deviation is the square root of the variance. Both measure spread around the mean using every data point, but the variance is in squared units, such as points squared, while the standard deviation is in the original units. That makes the standard deviation easier to interpret and report. The variance is handier inside formulas such as ANOVA, because the variances of independent variables add.
Which Measure of Variability Is Best for Skewed Data?
Use the interquartile range, reported with the median. The IQR describes the middle 50% of the data, so a long tail or a few extreme values barely affect it, while the standard deviation and range can grow sharply. A box plot shows the median, quartiles and any outliers in one picture. Save the standard deviation for data that are roughly symmetric without strong outliers.


