Quantitative Variable Analysis: Shape, Centre, and Resistance – STA 270, Section 2.2 – Study Notes
offline

Difficulty: Introductory | Prerequisites: Basic understanding of variable types (categorical vs quantitative) from Section 2.1.

This section is about what to do once you have a pile of numbers from a single quantitative variable. Where does it sit in the course? You have already learned to tell categorical variables from quantitative ones. Now you need to summarise those numbers visually (dotplots, frequency tables, histograms), describe the shape of their distribution (symmetric or skewed), and measure where the centre is (mean and median). The section also introduces outliers and the idea that some statistics hold up against extreme values while others do not.


TL;DR

Raw data on its own tells you very little. You turn it into information by visualising it (dotplots, histograms) and calculating summary numbers. The two main measures of centre are the mean (the balancing point, sensitive to outliers) and the median (the middle value, resistant to outliers). For skewed distributions the mean gets pulled toward the tail, so it will differ from the median.


Key Terms

Dotplot

A graph where each case is represented by a single dot, and dots with the same (or similar) value are stacked. Think of it as a histogram that lets you see every individual data point.

Frequency table

A table that divides the range of a quantitative variable into subintervals (bins) and counts how many cases fall in each. In simple terms, it is a tally sheet that organises raw numbers into groups.

Relative frequency

The proportion of total cases that fall within a given subinterval, calculated as frequency divided by total number of cases (n). Think of it as the percentage version of the frequency count.

Histogram

A graph of a frequency (or relative frequency) table where adjacent rectangles, with no gaps, represent the count or proportion of cases in each subinterval. In simple terms, it is a bar chart for quantitative data where the bars touch.

Symmetric distribution

A distribution whose lower half is a mirror image of its upper half. Think of it as a shape that looks the same on both sides of its centre.

Right-skewed distribution (positively skewed)

A distribution with a long tail stretching to the right (toward larger values). In simple terms, most values cluster on the left, with a few unusually large values trailing off to the right.

Left-skewed distribution (negatively skewed)

A distribution with a long tail stretching to the left (toward smaller values). In simple terms, most values cluster on the right, with a few unusually small values trailing off to the left.

Bell-shaped (mound-shaped)

A symmetric distribution that rises to a single peak in the middle and tapers smoothly on both sides. Think of it as the classic "bell curve" shape.

Mean (x-bar, sample mean)

The sum of all data values divided by the number of values. Denoted x-bar for a sample or mu for a population. In simple terms, this is what most people call "the average."

Median (m or x-tilde)

The middle value when all observations are arranged from smallest to largest. For an even sample size, it is the average of the two middle values. Think of it as the value that splits the dataset in half: 50% above, 50% below.

Population mean (mu)

The mean of all values in the entire population, as opposed to just a sample.

Deviation

The difference between an individual data value and the sample mean (x_i minus x-bar). In simple terms, it tells you how far that one observation sits from the average.

Outlier

An observed value that is notably distinct from the other values in the dataset. Think of it as a data point that stands apart from the crowd.

Resistant (robust)

A statistic is resistant if it is relatively unaffected by outliers or extreme values. The median is resistant; the mean is not.


Core Content

Visualising One Quantitative Variable

The goal of descriptive statistics is to turn raw data into information. For a single quantitative variable, three main tools do that work.

Dotplots

  • Each case gets its own dot on a number line, and dots at the same value are stacked.

  • Advantage over histograms: you can see every individual case.

  • Disadvantage: for large datasets, dotplots become unwieldy. Histograms handle large n more cleanly.

Frequency tables

  • Divide the range of the variable into non-overlapping subintervals (bins).

  • Count how many cases fall in each bin (frequency) or express it as a proportion (relative frequency).

  • Construction steps in brief: find the max and min, compute the range, choose a number of subintervals K (a common guideline is K less than the square root of n), set the bin width as roughly range / K, pick a convenient starting point, then tally.

Histograms

  • A visual version of the frequency table: one rectangle per bin, height equal to the frequency or relative frequency.

  • Bars must touch (no gaps between adjacent bins). This is what distinguishes a histogram from a bar graph.

  • The number of bins is your choice (or your software's), and different bin counts can change the visual impression.

Bar Graph vs Histogram

  • Bar graphs and pie charts display categorical (qualitative) variables.

  • Histograms display quantitative variables.

  • For categorical data, the number of bars equals the number of categories and is fixed. For quantitative data, the number of histogram bins is flexible.

  • Every case must fall into exactly one category (bar graph) or exactly one subinterval (histogram).

Three Features of Data

When you look at a distribution, describe three things:

  • Centre (the most important feature): where is the "typical" value? Measured by mean, median, or mode.

  • Spread (the second most important): how variable are the data? Measured by standard deviation, IQR, or range.

  • Shape: is the distribution symmetric, skewed, bell-shaped, or something else?

Distribution Shape

Three common named shapes:

  • Symmetric: the left half mirrors the right half. Example: hours of sleep per night among students.

  • Right-skewed: the bulk of the data sits on the left with a long tail to the right. Example: hours of exercise per week (many students exercise little, a few exercise a lot).

  • Left-skewed: the bulk of the data sits on the right with a long tail to the left. Example: GPA in upper-division courses (most students cluster near the top, with a few low values trailing left).

A symmetric distribution that rises to a single peak and tapers smoothly is called bell-shaped (or mound-shaped). Two datasets can both be symmetric yet look different: one tall and narrow (bell-shaped), one flat and wide.

Measures of Centre

The Mean (x-bar)

The mean is the sum of all data values divided by the number of values. It acts as the centre of gravity, or balancing point, of the dataset.

Key properties:

  • The sum of all deviations from the mean always equals zero. That is, the positive and negative distances from x-bar cancel out perfectly.

  • The mean is sensitive to extreme values. A single outlier can shift it substantially.

  • Sample mean is denoted x-bar. Population mean is denoted mu.

Worked example: for the sample 4, 2, 3, 6, 4, 6, 5, 1, 7, 2 (n = 10), the sum is 40 and the mean is 40 / 10 = 4. The deviations (0, -2, -1, 2, 0, 2, 1, -3, 3, -2) sum to zero.

The Median (m)

The median is the middle value once the data are sorted from smallest to largest. It splits the dataset so that roughly 50% of the values lie above and 50% below.

How to find it:

  • Sort the data in ascending order.

  • If n is odd, the median is the single middle value.

  • If n is even, the median is the average of the two middle values.

  • Important: when n is even, you still report one median (the average of the two middle values), not two medians.

Worked example: for the sorted sample 4.2, 4.3, 4.4, 4.4, 4.5, 4.7, 4.8, 4.8, 4.9 (n = 9, odd), the median is the 5th value, which is 4.5. If a 10th value (5.6) is added, the sorted data has two middle values (4.5 and 4.7), and the median becomes (4.5 + 4.7) / 2 = 4.6.

Mean and Median in Symmetric vs Skewed Distributions

Symmetric distributions: the mean and the median are approximately equal. They sit at the same point in the centre.

Right-skewed distributions: the long right tail pulls the mean to the right, so the mean is higher than the median. In the Hollywood movies 2011 dataset, the mean world gross was $150.7 million while the median was only $76.7 million.

Left-skewed distributions: the long left tail pulls the mean to the left, so the mean is lower than the median.

A useful mnemonic: the mean chases the tail. Whichever direction the distribution is skewed, the mean moves that way relative to the median.

Outliers and Resistance

Outliers

An outlier is a data point that is notably distinct from the rest of the dataset. In the 2011 Hollywood movies dataset, films like Harry Potter, Transformers, and Pirates of the Caribbean had world grosses far above the bulk of the data, making them outliers.

Resistance

A statistic is called resistant (or robust) if outliers do not substantially change its value.

  • The median is resistant. Removing Harry Potter from the Hollywood dataset changed the median only slightly, from $76,658,500 to $75,009,000.

  • The mean is not resistant. Removing the same film dropped the mean from $150,742,300 to $141,889,900, a shift of nearly $9 million.

Another worked example: a sample of 15 overdue department-store accounts had a mean of $165.57. Removing the single largest value ($807.80) dropped the mean to $119.70, a reduction of about $46. One data point moved the average by nearly 28%.

What to do with outliers

  • First, check whether the outlier is a data-entry mistake or measurement error.

  • If the outlier is legitimate, decide whether it belongs to the population you are studying.

  • Best practice for legitimate outliers: run the analysis twice, once with and once without the outlier, and report how much the results change.

  • Advanced option: apply methods based on mixture distributions.


Formulas and Diagrams

Sample mean

\bar{x} = \frac{\sum x_i}{n} = \frac{x_1 + x_2 + \cdots + x_n}{n}

where x_i is the value of the i-th case and n is the sample size.

Deviation of x_i from the mean

x_i - \bar{x}

The sum of all deviations always equals zero:

\sum (x_i - \bar{x}) = 0

Relative frequency of a subinterval

\text{Relative frequency} = \frac{\text{frequency}}{n}

Guideline for number of histogram bins

K < \sqrt{n}

where K is the number of subintervals and n is the sample size.

Bin width (approximate)

\text{width} \approx \frac{\text{range}}{K} = \frac{\max - \min}{K}

Median (even sample size)

m = \frac{x_{(n/2)} + x_{(n/2 + 1)}}{2}

where the values are sorted in ascending order.


Real-World Applications

Income data is the classic example of a right-skewed distribution: a small number of very high earners pull the mean well above the median, which is why government statistics typically report median household income rather than mean income.

In quality control, manufacturers use histograms and measures of centre to check whether a production process is centred on the target value and whether outliers signal equipment malfunction.


Common Misconceptions

  • Students often think the direction of skewness refers to where the bulk of the data sits. It does not. Skewness is named for the direction of the long tail, not the peak.

  • Students sometimes say there are "two medians" when the sample size is even. There is always one median. For even n, you average the two middle values to produce a single number.

  • Students frequently confuse bar graphs with histograms. Bar graphs are for categorical variables and have gaps between bars. Histograms are for quantitative variables and the bars touch.

  • Students often assume the mean is always the best measure of centre. It is not. When data are skewed or contain outliers, the median is usually more representative of a typical value.


Why It Matters / Exam Flags

  • Know which measure of centre (mean or median) is resistant to outliers. This is tested constantly.

  • Be able to determine the direction of skewness from a histogram or dotplot, and state what that implies about the relationship between the mean and median.

  • Know the exact procedure for finding the median for both odd and even sample sizes. Exam questions will give you a small dataset and ask you to compute both the mean and the median.

  • Understand that the sum of deviations from the mean equals zero. This property often appears as a conceptual question.

  • Be able to construct or interpret a frequency table and histogram from raw data, including computing relative frequencies.


Quick Self-Test

  1. True or false: The mean is resistant to outliers. (False. The median is resistant; the mean is not.)

  1. Fill in the blank: A distribution with a long tail to the right is called _______ . (Right-skewed.)

  1. True or false: In a symmetric distribution, the mean and median are approximately equal. (True.)

  1. Fill in the blank: The sum of all deviations from the sample mean equals _______ . (Zero.)

  1. True or false: When the sample size is even, there are two medians. (False. You average the two middle values to get one median.)


Practice Q&A

Q: For the sample 8, 12, 3, 18, 15, find the mean and the median.

A: Mean = (8 + 12 + 3 + 18 + 15) / 5 = 56 / 5 = 11.2. Sorted: 3, 8, 12, 15, 18. The median is 12 (the middle value, n = 5 is odd).

Q: For the sample 41, 53, 38, 12, 115, 47, 50, find the mean and the median and identify any outliers.

A: Mean = 356 / 7 = 50.86. Sorted: 12, 38, 41, 47, 50, 53, 115. Median = 47 (the 4th value). Likely outliers: 12 (low) and 115 (high) are notably distant from the rest of the data.

Q: A dataset of household incomes has a mean of $85,000 and a median of $62,000. What does this tell you about the shape of the distribution?

A: The mean is substantially higher than the median, which indicates a right-skewed distribution. A few very high incomes are pulling the mean above the median.

Q: Why is the median preferred over the mean when reporting typical house prices?

A: House prices are usually right-skewed (a few very expensive properties push the mean up). The median is resistant to these extreme values and better represents the price a typical buyer would encounter.

Q: You have a dataset with a mean of 50. You remove one observation equal to 80. Will the new mean be higher, lower, or the same?

A: Lower. The removed value (80) was above the original mean, so removing it pulls the mean downward.

Q: A sample of n = 6 values has been sorted: 10, 14, 18, 22, 25, 31. What is the median?

A: n = 6 is even, so the median is the average of the 3rd and 4th values: (18 + 22) / 2 = 20.


Connections to Other Topics

This material connects directly to Section 2.3 on measures of spread (standard deviation, IQR, range), which answers the second of the three "features of data" questions introduced here. You will also revisit the idea of resistance when studying boxplots and the five-number summary.

The concept of skewness and its effect on the mean will reappear when you study sampling distributions and the Central Limit Theorem later in the course, where you will see why the shape of the population matters for inference.

Histograms and frequency tables form the foundation for understanding probability distributions in later chapters, where the relative frequency of a subinterval becomes the probability of observing a value in that range.


Related Terms / Search Tags

quantitative variable, one variable analysis, shape centre spread, dotplot, dot plot, frequency table, relative frequency table, histogram, bar graph vs histogram, symmetric distribution, right-skewed, left-skewed, positively skewed, negatively skewed, bell-shaped, mound-shaped, normal curve shape, mean, average, x-bar, sample mean, population mean, mu, median, middle value, x-tilde, resistant statistic, robust statistic, outlier, extreme value, deviation from mean, sum of deviations equals zero, STA 270, introductory statistics, descriptive statistics, Lock5 textbook, measures of central tendency, measures of centre