The Central Idea
A measure of spread, or variability, describes how far observations tend to be separated from one another or from a center.
Four important introductory measures are:
- range — total distance from minimum to maximum;
- interquartile range — width of the middle \(50\%\);
- variance — average squared deviation from the mean;
- standard deviation — square root of variance.
Why Spread Matters
Consider two datasets:
\[ A:\quad 8,\ 9,\ 10,\ 11,\ 12 \] \[ B:\quad 0,\ 5,\ 10,\ 15,\ 20. \]Both have mean
\[ \bar{x}=10. \]But Dataset B is much more dispersed. A measure of center alone does not capture that difference.
The Range
The range is the difference between the maximum and minimum observed values.
\[ \boxed{ \text{range} = \text{maximum} - \text{minimum} }. \]Example: Computing the Range
For
\[ 4,\ 7,\ 8,\ 10,\ 13, \]the minimum is \(4\) and the maximum is \(13\).
\[ \text{range} = 13-4 = \boxed{9}. \]What the Range Tells Us
The range describes the full observed span of the data.
It answers:
How far apart are the smallest and largest observed values?
It does not describe how the values are distributed between those extremes.
The Range Uses Only Two Values
Consider:
\[ A:\quad 0,\ 1,\ 2,\ 3,\ 10 \] \[ B:\quad 0,\ 8,\ 9,\ 9,\ 10. \]Both have range
\[ 10-0=10. \]Their internal distributions are very different, but the range cannot show that difference because it uses only the minimum and maximum.
The Interquartile Range
The interquartile range, abbreviated IQR, measures the width of the middle \(50\%\) of the ordered data.
\[ \boxed{ \operatorname{IQR}=Q_3-Q_1 }. \]Here \(Q_1\) is the first quartile and \(Q_3\) is the third quartile.
Example: Computing the IQR
Suppose
\[ Q_1=12 \]and
\[ Q_3=28. \]Then
\[ \operatorname{IQR} = 28-12 = \boxed{16}. \]The IQR Focuses on the Middle Half
Approximately \(25\%\) of the observations lie at or below \(Q_1\), and approximately \(75\%\) lie at or below \(Q_3\).
The interval from \(Q_1\) to \(Q_3\) therefore contains the middle half of the ordered data.
The IQR measures the width of this central region.
The IQR Is Resistant
Because the IQR depends on quartile positions rather than directly on the most extreme observations, it is relatively resistant to outliers.
This makes the IQR especially useful for skewed distributions or datasets containing extreme values.
Example: Range Versus IQR
Consider:
\[ 2,\ 4,\ 5,\ 6,\ 7,\ 8,\ 9,\ 10,\ 100. \]The range is
\[ 100-2=98. \]The value \(100\) dominates the range.
The quartiles depend primarily on the central ordered positions, so the IQR changes much less dramatically.
Deviation from the Mean
To measure spread around the mean, begin with each observation's deviation:
\[ \boxed{x_i-\bar{x}}. \]A positive deviation indicates a value above the sample mean.
A negative deviation indicates a value below the sample mean.
Why We Cannot Simply Average the Deviations
Deviations from the mean always sum to zero:
\[ \sum_{i=1}^{n}(x_i-\bar{x})=0. \]If we simply averaged the signed deviations, every dataset would appear to have zero spread.
We therefore need a way to prevent positive and negative deviations from canceling.
Squaring the Deviations
Variance solves the cancellation problem by squaring each deviation:
\[ (x_i-\bar{x})^2. \]Squaring has two important effects:
- all squared deviations are nonnegative;
- larger deviations receive greater weight.
Population Variance
For a population of size \(N\) with mean \(\mu\), the population variance is
\[ \boxed{ \sigma^2 = \frac{1}{N} \sum_{i=1}^{N}(x_i-\mu)^2 }. \]The symbol \(\sigma^2\) is commonly read sigma squared.
Population Standard Deviation
The population standard deviation is the positive square root of the population variance:
\[ \boxed{ \sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^{N}(x_i-\mu)^2 } }. \]Sample Variance
For a sample of size \(n\), the commonly used sample variance is
\[ \boxed{ s^2 = \frac{1}{n-1} \sum_{i=1}^{n}(x_i-\bar{x})^2 }. \]The denominator \(n-1\) is used when sample variability is being used to estimate population variability.
Sample Standard Deviation
The sample standard deviation is
\[ \boxed{ s = \sqrt{ \frac{1}{n-1} \sum_{i=1}^{n}(x_i-\bar{x})^2 } }. \]Population or Sample?
Before computing variance, determine whether the values represent:
- the entire population of interest; or
- a sample used to learn about a larger population.
The distinction determines whether the denominator is typically \(N\) or \(n-1\).
Why Sample Variance Uses \(n-1\)
The sample mean \(\bar{x}\) is estimated from the same sample data used to measure spread.
Once \(\bar{x}\) is fixed, only \(n-1\) deviations can vary independently because
\[ \sum_{i=1}^{n}(x_i-\bar{x})=0. \]Using \(n-1\) also corrects the systematic downward tendency that would arise if population variance were estimated by dividing sample squared deviations by \(n\).
Degrees of Freedom
The quantity
\[ n-1 \]is called the number of degrees of freedom in this sample-variance calculation.
This concept will appear again in later statistical methods.
Example: Population Variance
Consider the population
\[ 2,\ 4,\ 6. \]The population mean is
\[ \mu = \frac{2+4+6}{3} = 4. \]Deviations:
\[ -2,\quad0,\quad2. \]Squared deviations:
\[ 4,\quad0,\quad4. \]Therefore,
\[ \sigma^2 = \frac{4+0+4}{3} = \boxed{\frac{8}{3}}. \]Example: Population Standard Deviation
Continuing the previous example,
\[ \sigma = \sqrt{\frac{8}{3}} \approx \boxed{1.63}. \]The standard deviation is expressed in the same units as the original variable.
Example: Sample Variance
Treat the same values
\[ 2,\ 4,\ 6 \]as a sample.
The sample mean is still
\[ \bar{x}=4. \]The sum of squared deviations is
\[ 4+0+4=8. \]Now divide by
\[ n-1=3-1=2. \]Thus,
\[ s^2 = \frac{8}{2} = \boxed{4}. \]Example: Sample Standard Deviation
\[ s = \sqrt{4} = \boxed{2}. \]Variance Uses Squared Units
If the original measurements are in meters, variance is expressed in square meters.
If the original variable is measured in dollars, variance is measured in square dollars.
This makes variance mathematically useful but less intuitive for direct interpretation.
Standard Deviation Returns to the Original Units
Standard deviation takes the square root of variance.
This restores the original measurement units.
If delivery time is measured in minutes, the standard deviation is also measured in minutes.
Interpreting Standard Deviation
Standard deviation describes a typical scale of distance from the mean.
A small standard deviation indicates values concentrated relatively near the mean.
A large standard deviation indicates values spread more widely around the mean.
Standard Deviation Cannot Be Negative
Variance is an average of squared quantities, so
\[ \sigma^2\ge0 \]and
\[ s^2\ge0. \]Their square roots therefore satisfy
\[ \boxed{\sigma\ge0,\qquad s\ge0}. \]When Standard Deviation Is Zero
Standard deviation equals zero exactly when every observation is identical.
For example,
\[ 5,\ 5,\ 5,\ 5 \]has mean \(5\), every deviation is \(0\), and therefore
\[ \boxed{s=0}. \]Shifting Every Observation
Suppose the same constant \(c\) is added to every value:
\[ y_i=x_i+c. \]The mean shifts by \(c\), but the distances from the mean do not change.
Therefore, range, variance, standard deviation, and IQR are unchanged by adding the same constant to every observation.
Scaling Every Observation
Suppose every value is multiplied by a constant \(a\):
\[ y_i=ax_i. \]Then:
\[ \operatorname{range}(Y) = |a|\operatorname{range}(X), \] \[ \operatorname{IQR}(Y) = |a|\operatorname{IQR}(X), \] \[ \operatorname{SD}(Y) = |a|\operatorname{SD}(X), \]while variance scales by
\[ \operatorname{Var}(Y) = a^2\operatorname{Var}(X). \]Example: Changing Units
Suppose a standard deviation is
\[ 2.5\text{ meters}. \]Converting meters to centimeters multiplies every value by \(100\).
Therefore, the standard deviation becomes
\[ 100(2.5)=250\text{ centimeters}. \]The 1.5-IQR Outlier Rule
A common introductory method identifies potential outliers using the IQR.
The lower fence is
\[ \boxed{ Q_1-1.5(\operatorname{IQR}) }. \]The upper fence is
\[ \boxed{ Q_3+1.5(\operatorname{IQR}) }. \]Interpreting the IQR Fences
Observations below the lower fence or above the upper fence are commonly flagged as potential outliers.
The rule does not prove that a value is erroneous.
A flagged observation may represent:
- a legitimate extreme case;
- a separate subgroup;
- a measurement error;
- a data-entry error;
- an important rare event.
Example: IQR Outlier Fences
Suppose
\[ Q_1=20,\qquad Q_3=32. \]Then
\[ \operatorname{IQR}=32-20=12. \]The lower fence is
\[ 20-1.5(12) = 20-18 = \boxed{2}. \]The upper fence is
\[ 32+1.5(12) = 32+18 = \boxed{50}. \]Values below \(2\) or above \(50\) would be flagged as potential outliers.
Mean and Standard Deviation Form a Natural Pair
The mean and standard deviation are both based on every numerical observation.
They are especially natural for roughly symmetric distributions without strong outliers.
A typical report may therefore use
\[ \boxed{\bar{x}\text{ and }s}. \]Median and IQR Form a Natural Pair
The median and IQR are both based primarily on ordered positions.
They are relatively resistant to extreme observations.
They are often useful for skewed distributions or data containing outliers.
A typical resistant summary may use
\[ \boxed{\operatorname{median}\text{ and }\operatorname{IQR}}. \]Comparing Two Distributions
When comparing distributions, consider both center and spread.
For example:
- Which group has the larger center?
- Which group is more variable?
- Are there unusual observations?
- Are the shapes similar?
A complete description rarely relies on only one statistic.
Example: Same Mean, Different Standard Deviation
Consider
\[ A:\quad 9,\ 10,\ 10,\ 10,\ 11 \]and
\[ B:\quad 0,\ 5,\ 10,\ 15,\ 20. \]Both have mean \(10\).
Dataset A is tightly concentrated near \(10\), while Dataset B is widely dispersed.
Therefore, Dataset B has the larger standard deviation.
Example: Same Range, Different Internal Spread
Consider
\[ A:\quad 0,\ 1,\ 1,\ 1,\ 10 \]and
\[ B:\quad 0,\ 4,\ 5,\ 6,\ 10. \]Both have range \(10\), but their internal distributions differ.
This illustrates why the range should not be used as the only measure of spread.
Standard Deviation from a Frequency Table
If value \(x_i\) occurs with frequency \(f_i\), the population variance can be written
\[ \boxed{ \sigma^2 = \frac{\sum f_i(x_i-\mu)^2}{\sum f_i} }. \]For a sample,
\[ \boxed{ s^2 = \frac{\sum f_i(x_i-\bar{x})^2}{n-1} }. \]Computational Form of Population Variance
Expanding the squared deviations yields the useful identity
\[ \boxed{ \sigma^2 = \frac{1}{N}\sum_{i=1}^{N}x_i^2-\mu^2 }. \]Equivalently,
\[ \boxed{ \sigma^2 = E(X^2)-[E(X)]^2 } \]when the notation is interpreted for a population or probability distribution.
Why Squaring Emphasizes Large Deviations
Compare deviations of size \(2\) and \(6\).
Their squares are
\[ 2^2=4 \]and
\[ 6^2=36. \]A deviation three times as large contributes nine times as much squared deviation.
Variance and standard deviation are therefore sensitive to extreme values.
Range, IQR, and Standard Deviation Respond Differently to Outliers
| Measure | Uses | Outlier Sensitivity |
|---|---|---|
| Range | Minimum and maximum | Very sensitive |
| IQR | First and third quartiles | Relatively resistant |
| Variance | All squared deviations from mean | Sensitive |
| Standard deviation | All squared deviations from mean | Sensitive |
Common Error: Using \(n\) Instead of \(n-1\) for Sample Variance
When the goal is the conventional sample variance used to estimate population variance, divide the sum of squared deviations by
\[ n-1, \]not by \(n\).
Always identify whether the data represent a population or sample before choosing the formula.
Common Error: Forgetting to Square Deviations
The signed deviations sum to zero:
\[ \sum(x_i-\bar{x})=0. \]Variance requires
\[ \sum(x_i-\bar{x})^2. \]The square is essential.
Common Error: Taking the Square Root Too Early
Standard deviation is the square root of the average squared deviation, not the average of the square roots of individual squared deviations.
Follow the order:
- find deviations;
- square them;
- sum them;
- divide by the appropriate denominator;
- take the square root.
Common Error: Reporting Variance in the Original Units
Variance has squared units.
If the original data are measured in seconds, variance is measured in
\[ \text{seconds}^2. \]Standard deviation, not variance, returns to seconds.
Common Error: Interpreting the Range as Typical Spread
The range describes the total span between the two extremes.
It does not tell us how far a typical observation lies from the center.
Standard deviation and IQR provide different and often more informative descriptions of internal spread.
Common Error: Automatically Deleting Outliers
An outlier rule identifies values that deserve attention.
It does not automatically justify removing them.
Before excluding an unusual value, investigate its source and determine whether removal is justified by the study design and analysis goals.
Common Error: Comparing Standard Deviations in Different Units
A standard deviation of \(5\) centimeters and a standard deviation of \(5\) meters are not comparable as equal spreads.
Units and scale must be considered before comparing variability.
A Reliable Procedure for Range and IQR
- Order the data when quartiles are needed.
- Identify the minimum and maximum.
- Compute range as maximum minus minimum.
- Find \(Q_1\) and \(Q_3\) using a stated quartile convention.
- Compute \(\operatorname{IQR}=Q_3-Q_1\).
- If needed, compute the \(1.5\)-IQR fences.
- Interpret the results in the units and context of the variable.
A Reliable Procedure for Variance and Standard Deviation
- Determine whether the data represent a population or a sample.
- Compute the appropriate mean.
- Subtract the mean from every observation.
- Square each deviation.
- Add the squared deviations.
- Divide by \(N\) for population variance or \(n-1\) for conventional sample variance.
- Take the square root to obtain standard deviation.
- Report variance in squared units and standard deviation in original units.
- Interpret the statistic together with center and distribution shape.
Example: Full Population Workflow
Find the population variance and standard deviation of
\[ 1,\ 3,\ 5,\ 7. \]Mean:
\[ \mu = \frac{1+3+5+7}{4} = 4. \]Deviations:
\[ -3,\ -1,\ 1,\ 3. \]Squared deviations:
\[ 9,\ 1,\ 1,\ 9. \]Sum:
\[ 9+1+1+9=20. \]Population variance:
\[ \sigma^2 = \frac{20}{4} = \boxed{5}. \]Population standard deviation:
\[ \sigma = \sqrt{5} \approx \boxed{2.24}. \]Example: Full Sample Workflow
Treat
\[ 1,\ 3,\ 5,\ 7 \]as a sample.
The sum of squared deviations is still \(20\), but now
\[ n-1=4-1=3. \]Therefore,
\[ s^2 = \frac{20}{3} \approx \boxed{6.67}, \]and
\[ s = \sqrt{\frac{20}{3}} \approx \boxed{2.58}. \]Practice 1: Range
Find the range of
\[ 3,\ 7,\ 8,\ 12,\ 19. \]Practice 2: IQR
Suppose
\[ Q_1=14,\qquad Q_3=31. \]Find the IQR.
Practice 3: Outlier Fences
Suppose
\[ Q_1=10,\qquad Q_3=18. \]Find the lower and upper \(1.5\)-IQR fences.
Practice 4: Population Variance
Treat
\[ 2,\ 4,\ 6 \]as an entire population. Find the population variance.
Practice 5: Population Standard Deviation
Using the previous dataset, find the population standard deviation.
Practice 6: Sample Variance
Treat
\[ 2,\ 4,\ 6 \]as a sample. Find \(s^2\).
Practice 7: Sample Standard Deviation
Using the previous sample, find \(s\).
Practice 8: Shift and Spread
A dataset has standard deviation \(6\). If \(20\) is added to every observation, what is the new standard deviation?
Practice 9: Scaling and Spread
A dataset has standard deviation \(4\). Every observation is multiplied by \(3\). What is the new standard deviation?
Practice 10: Choose the Better Spread Measure
A distribution of household wealth is strongly right-skewed and contains several extremely large values.
Which pair is generally more resistant and informative for typical center and spread: mean with standard deviation, or median with IQR?
Practice Answers
Practice 1
\[ 19-3 = \boxed{16}. \]Practice 2
\[ \operatorname{IQR} = 31-14 = \boxed{17}. \]Practice 3
First,
\[ \operatorname{IQR} = 18-10 = 8. \]Lower fence:
\[ 10-1.5(8) = 10-12 = \boxed{-2}. \]Upper fence:
\[ 18+1.5(8) = 18+12 = \boxed{30}. \]Practice 4
The mean is \(4\), and the squared deviations are
\[ 4,\ 0,\ 4. \]Therefore,
\[ \sigma^2 = \frac{8}{3} = \boxed{\frac{8}{3}} \approx 2.67. \]Practice 5
\[ \sigma = \sqrt{\frac{8}{3}} \approx \boxed{1.63}. \]Practice 6
\[ s^2 = \frac{8}{3-1} = \frac{8}{2} = \boxed{4}. \]Practice 7
\[ s = \sqrt{4} = \boxed{2}. \]Practice 8
Adding the same constant to every observation does not change spread.
\[ \boxed{6}. \]Practice 9
Multiplying every observation by \(3\) multiplies standard deviation by \(|3|\):
\[ 3(4) = \boxed{12}. \]Practice 10
The median and IQR are generally more resistant to the extreme upper-tail values and are often more informative for a strongly skewed wealth distribution.
What to Remember
- The range is maximum minus minimum.
- The IQR is \(Q_3-Q_1\) and measures the width of the middle \(50\%\).
- The IQR is relatively resistant to extreme values.
- Variance measures squared deviations from the mean.
- Population variance uses denominator \(N\).
- Conventional sample variance uses denominator \(n-1\).
- Standard deviation is the square root of variance.
- Standard deviation is expressed in the original measurement units.
- The \(1.5\)-IQR rule flags potential outliers but does not automatically justify deleting them.
- Mean and standard deviation form a natural pair, while median and IQR form a resistant pair.
Where We Go Next
Measures of center and spread provide compact summaries, but a full description also considers the overall geometry of a distribution and the presence of unusual values.
The next lesson, Shape, Center, Spread, and Outliers, combines graphical and numerical summaries into a systematic framework for describing a distribution.