Descriptive Statistics
Atypical Data
Key Questions:
- What is the median, and how does it differ from the mean?
- How do we find the quartiles of a data set?
- How do we tell whether a value is an outlier?
Goals and Learning Outcomes
Goals
- 1 Introduce the definitions of the median and quartiles.
- 2 Show the rule for identifying an outlier using the interquartile range (IQR).
- 3 Demonstrate that the median is more resistant to outliers than the mean.
Outcomes
- ✓ Student finds the median and quartiles of a data set.
- ✓ Student calculates the interquartile range and determines whether an outlier is present.
- ✓ Student explains why the median is more resistant to outliers than the mean.
Refining the Forecast
You already have data on your commute speed to school from the first week of the project. Look at the data you've collected and refine your hypothesis about the class's average speed — how has it changed compared to your very first, off-the-cuff prediction?
Medians and Quartiles
Ranking a data set means arranging all the values in increasing order. Many statistics (the median, the quartiles) are calculated from ranked data.
The median is the value sitting exactly in the middle of a ranked data set: half the values are below it, half are above it. If the number of values \(n\) is odd, the median is the single middle value. If \(n\) is even, the median is the arithmetic mean of the two middle values.
Quartiles split a ranked data set into four roughly equal parts: \(Q_1\) (the first quartile) is the median of the lower half of the data; \(Q_2\) is simply the median of the whole set; \(Q_3\) (the third quartile) is the median of the upper half of the data.
Note: in this unit, we always include the median itself in both halves when finding \(Q_1\) and \(Q_3\) (when \(n\) is odd).
Weather in Your City
Pick any city — your hometown, a city where relatives live, or just one you find interesting. Find the average daily temperature for each of the last 14 days (for example, on a weather archive website).
Rank your 14 values and find the median, \(Q_1\), and \(Q_3\).
Interquartile Range and Outliers
The interquartile range shows how spread out the middle part of the data is:
\[ IQR = Q_3 - Q_1 \]
A value is considered an outlier if it lies outside the boundaries:
\[ [\,Q_1 - 1.5\cdot IQR,\ \ Q_3 + 1.5\cdot IQR\,] \]
Calculate the \(IQR\) for your own weather data from the previous task and determine whether it contains an outlier.
The Median Is Resistant to Outliers
Take the air temperature by day of the week (°C): Mon 21, Tue 50, Wed 17, Thu 25, Fri 19, Sat 23, Sun 27.
Rank them: 17, 19, 21, 23, 25, 27, 50. The median (the middle value) \(=23\). The lower half (including the median) — 17, 19, 21, 23 → \(Q_1=\dfrac{19+21}{2}=20\). The upper half (including the median) — 23, 25, 27, 50 → \(Q_3=\dfrac{25+27}{2}=26\). The interquartile range \(IQR=26-20=6\). The upper fence \(=26+1.5\cdot6=35\): since \(50>35\), that's an outlier.
Let's remove the outlier and compare what happens to the mean and to the median:
With all the data: mean \(=182/7\approx26\), median \(=23\).
Without the outlier (17, 19, 21, 23, 25, 27): mean \(=132/6=22\), median \(=(21+23)/2=22\).
The mean shifted by 4 degrees, while the median shifted by only 1. A single atypical day strongly shifts the mean, but barely affects the median.
PROBLEMS
- Find the median and quartiles of the set of numbers: 4, 9, 2, 11, 7. Are there any outliers?
- Find the median and quartiles of the set of numbers: 2, 3, 5, 7, 8, 9, 11, 50. Are there any outliers?
- Movie ticket prices at different cinemas in the city (in local currency): 1200, 1500, 1300, 1400, 1600, 1100, 4500. Find the median, the quartiles, and determine whether there's an outlier.
- Time spent on homework by classmates (in minutes): 30, 45, 35, 40, 50, 42, 38, 100. Find the median, the quartiles, and determine whether there's an outlier.
- Ranked: 2, 4, 7, 9, 11. Median = 7, \(Q_1=4\), \(Q_3=9\), \(IQR=5\); fences \([-3.5,\ 16.5]\) — no outliers.
- Median = 8, \(Q_1=4\), \(Q_3=10\), \(IQR=6\); upper fence \(10+9=19\) — 50 is an outlier.
- Ranked: 1100, 1200, 1300, 1400, 1500, 1600, 4500. Median = 1400, \(Q_1=1250\), \(Q_3=1550\), \(IQR=300\); upper fence \(1550+450=2000\) — 4500 is an outlier.
- Ranked: 30, 35, 38, 40, 42, 45, 50, 100. Median = 41, \(Q_1=36.5\), \(Q_3=47.5\), \(IQR=11\); upper fence \(47.5+16.5=64\) — 100 is an outlier.
Exit Ticket
Find the median, \(Q_1\), and \(Q_3\) of the set of numbers: 6, 10, 4, 14, 8, 12, 20. Are there any outliers here?
Homework
Solve the following two problems the same way we did in class.
- Number of books read this semester by classmates: 3, 5, 4, 6, 7, 5, 8. Find the median, the quartiles, and determine whether there's an outlier.
- Salaries of employees at a small company (in thousands of tenge): 200, 220, 210, 230, 240, 215, 900. Find the median, the quartiles, and determine whether there's an outlier.
- Ranked: 3, 4, 5, 5, 6, 7, 8. Median = 5, \(Q_1=4.5\), \(Q_3=6.5\), \(IQR=2\); fences \([1.5,\ 9.5]\) — no outliers.
- Ranked: 200, 210, 215, 220, 230, 240, 900. Median = 220, \(Q_1=212.5\), \(Q_3=235\), \(IQR=22.5\); upper fence \(235+33.75=268.75\) — 900 is an outlier.
Typical Range
Key Questions:
- How do we show a "typical range" of values on a graph?
- How do we plot a line from its equation?
- What changes if the data is rising or falling over time?
Goals and Learning Outcomes
Goals
- 1 Introduce the idea of a typical range and an explicit convention for its width.
- 2 Teach how to plot a line from its equation.
- 3 Show what a typical range looks like around a rising/falling trend, not just around a constant mean.
Outcomes
- ✓ Student draws a typical range around a mean on a graph.
- ✓ Student plots a line from an equation of the form \(y=kx+b\).
- ✓ Student draws a range band around a sloped trend line.
Recalling the Last Lesson
Last lesson, for a week of HRV data (55, 59, 67, 65, 61, 57, 63), we calculated: mean \(\bar x = 61\) ms, standard deviation \(\sigma = 4\) ms.
How could we show these two numbers on a graph so it's immediately clear which days were "typical" and which weren't?
Typical Range
A typical range is an interval around the mean where the values in a data set usually fall:
\[ [\bar x - \sigma,\ \bar x + \sigma] \]
The width of such a range is a convention, and it can vary between sources (for example, some use \(\pm 2\sigma\), or a range based on percentiles). In this unit, we always use a width of \(\pm 1\sigma\) — that is, from \(\bar x - \sigma\) to \(\bar x + \sigma\) — so our drawings match the examples.
Building the Typical Range for HRV
On paper, draw a graph: days of the week (Fri-Thu) along the horizontal axis, HRV values along the vertical axis. Plot all 7 values as points, then shade the typical-range band from \(61-4=57\) to \(61+4=65\).
Which days fall inside the typical range, and which don't?
This is how real fitness watches show the same idea — the "typical range" band is exactly \(\bar x \pm \sigma\).
Equation of a Line
A line on a graph can be given by an equation of the form \(y = kx + b\), where \(k\) and \(b\) are numbers.
To plot a line from such an equation:
- Pick any two values of \(x\) (for example, the smallest and largest ones in your data).
- Calculate the corresponding \(y\) by substituting each \(x\) into the equation.
- Plot both points on the graph and draw a straight line through them.
Example. Let's plot the line \(y = 2x + 1\).
Take \(x=0\): \(y = 2\cdot 0 + 1 = 1\) — point \((0, 1)\).
Take \(x=3\): \(y = 2\cdot 3 + 1 = 7\) — point \((3, 7)\).
We plot both points and draw a line through them:
A Typical Range Around a Trend Line
If the data doesn't hover around a constant mean but rises or falls over time, the typical range should "tilt" along with the trend too, instead of staying a horizontal band.
The data — pages left to read in a book, by day:
| Day | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Pages left | 8 | 7 | 6 | 6 | 4 | 3 |
The trend line for this data: \(y = -x + 9\). The width of the typical range is \(\pm 1\) around this line.
On a single graph: a) plot all the data points; b) draw the line \(y=-x+9\); c) shade a band of width \(\pm 1\) around this line along its entire length.
PROBLEMS
- The line \(y = -2x + 5\) is given. Find \(y\) at \(x=0\) and at \(x=3\), then plot this line on a graph.
- Find the equation of the line through the points \((1, 3)\) and \((4, 12)\).
- Over 5 days, the number of active calories (in hundreds) was: 6, 11, 11, 11, 11. Find the mean, the standard deviation, and the boundaries of the typical range.
- New blog subscribers by day of the week: Mon — 5, Tue — 7, Wed — 8, Thu — 10, Fri — 11, Sat — 13, Sun — 14. Trend line: \(y = 1.5x + 4\) (where \(x\) is the day number, starting at 1 for Monday). Typical-range width: \(\pm 1\). Plot the points, the trend line, and the range band on a graph.
- \(y(0) = 5\); \(y(3) = -1\).
- \(k = \dfrac{12-3}{4-1} = 3\); \(b = 3 - 3\cdot 1 = 0\); \(y = 3x\).
- Mean = 10 (hundreds of calories), standard deviation = 2, typical range — from 8 to 12 (hundreds of calories).
- The points, trend line, and range band should run diagonally from bottom-left to top-right (a rising trend). Check: all 7 points should fall inside a band of width \(\pm 1\) around the line \(y=1.5x+4\).
Exit Ticket
The line \(y = 4x - 3\) is given. Find \(y\) at \(x=1\) and at \(x=5\), plot both points on a graph, and draw a line through them.
Homework
Solve the following four problems the same way we did in class.
- The line \(y = 3x - 2\) is given. Find \(y\) at \(x=-1\) and at \(x=2\), then plot this line on a graph.
- Find the equation of the line through the points \((2, 7)\) and \((5, 16)\).
- Over 6 days, reading time (in minutes) was: 9, 9, 9, 15, 15, 15. Find the mean, the standard deviation, and the boundaries of the typical range.
- Ice cream sales by day of the week (in thousands of tenge): Mon — 20, Tue — 24, Wed — 27, Thu — 33, Fri — 38, Sat — 44, Sun — 50. Trend line: \(y = 5x + 15\) (where \(x\) is the day number, starting at 1 for Monday). Typical-range width: \(\pm 3\). Plot the points, the trend line, and the range band on a graph.
- \(y(-1) = -5\); \(y(2) = 4\).
- \(k = \dfrac{16-7}{5-2} = 3\); \(b = 7 - 3\cdot 2 = 1\); \(y = 3x + 1\).
- Mean = 12 minutes, standard deviation = 3 minutes, typical range — from 9 to 15 minutes.
- The points, trend line, and range band should run diagonally from bottom-left to top-right (a rising trend). Check: all 7 points should fall inside a band of width \(\pm 3\) around the line \(y=5x+15\).
How Stable Is Our Body?
Key Questions:
- How do we calculate a mean when the numbers are awkward?
- What does standard deviation tell us?
- What properties do the mean and the standard deviation have?
Goals and Learning Outcomes
Goals
- 1 Introduce formal definitions of the arithmetic mean and the standard deviation.
- 2 Show a computational shortcut for the mean — shifting all the numbers by a convenient constant.
- 3 Introduce the definition and notation of the square root.
Outcomes
- ✓ Student calculates the mean and the standard deviation from the formula, using the shift shortcut.
- ✓ Student uses the sum-of-deviations property to self-check their calculations.
- ✓ Student knows the definition and notation of the square root.
Heart Rate Variability (HRV)
HRV (heart rate variability) is a measure of how differently the body responds to strain and recovery from one day to the next. Many fitness watches and apps track it. Here's a week of HRV data (in milliseconds):
| Fri | Sat | Sun | Mon | Tue | Wed | Thu |
|---|---|---|---|---|---|---|
| 55 | 59 | 67 | 65 | 61 | 57 | 63 |
How would you describe the "typical" HRV level for this week using a single number? And how would you describe how much it swings from day to day?
Arithmetic Mean
The arithmetic mean of a set of numbers \(x_1, x_2, \dots, x_n\) is the number
\[ \bar{x} = \frac{x_1 + x_2 + \dots + x_n}{n} \]
Square Root
The square root of a number \(a\) is a number \(b\) that, multiplied by itself, gives \(a\) — that is, \(b \cdot b = a\). It's written \(\sqrt{a}\).
For example: \(\sqrt{9} = 3\), because \(3 \cdot 3 = 9\). And \(\sqrt{25} = 5\), because \(5 \cdot 5 = 25\). We'll need this idea shortly to calculate the standard deviation.
Standard Deviation
Standard deviation shows how much the numbers in a set typically differ from the mean. First, find each number's deviation from the mean \((x_i - \bar{x})\), square it (to remove the sign), find the mean of the squares, and then take the square root of the result:
\[ \sigma = \sqrt{\frac{(x_1-\bar{x})^2 + (x_2-\bar{x})^2 + \dots + (x_n-\bar{x})^2}{n}} \]
The Sum of Deviations from the Mean Is Zero
\[ (x_1-\bar{x}) + (x_2-\bar{x}) + \dots + (x_n-\bar{x}) = 0 \]
This is the geometric meaning of the mean: it's a balance point — whatever lies below it is exactly offset by whatever lies above it.
Shifting All Numbers by a Constant
If you add (or subtract) the same number \(c\) to every value in a set, the mean shifts by \(c\) as well, while the spread stays the same:
\[ \overline{x + c} = \bar{x} + c \]
Calculating the Mean Using a Shift
Adding 55, 59, 67, 65, 61, 57, and 63 directly is awkward. Let's subtract the same convenient round number, say 60, from each one:
| Original | 55 | 59 | 67 | 65 | 61 | 57 | 63 |
|---|---|---|---|---|---|---|---|
| −60 | −5 | −1 | +7 | +5 | +1 | −3 | +3 |
The sum of the second row: \(-5-1+7+5+1-3+3 = 7\). The mean of these small numbers: \(7 / 7 = 1\).
By the shift property — since we subtracted 60 from every number, the mean shifted by \(-60\) too. To get the real mean, we add 60 back:
\[ \bar{x} = 60 + 1 = 61 \]
Calculating the Deviation — and Checking Ourselves
Now let's subtract the real mean (61) from each number:
| Original | 55 | 59 | 67 | 65 | 61 | 57 | 63 |
|---|---|---|---|---|---|---|---|
| −61 | −6 | −2 | +6 | +4 | 0 | −4 | +2 |
Sum: \(-6-2+6+4+0-4+2 = 0\). By the sum-of-deviations property, that's exactly what should happen — it's a self-check: if the sum weren't zero, we'd know there was a mistake somewhere in calculating the mean.
Now square each deviation and find the mean of the squares:
\[ \frac{36 + 4 + 36 + 16 + 0 + 16 + 4}{7} = \frac{112}{7} = 16 \]
So: \(\sqrt{16} = 4\), because \(4 \cdot 4 = 16\).
\[ \sigma = \sqrt{16} = 4 \]
Result: the mean HRV for the week is 61 ms, and the standard deviation is 4 ms.
PROBLEMS
- Evaluate the expression: \[ 2 - \dfrac{3\dfrac{1}{3} \cdot 1.9 + 19.5 : 4\dfrac{1}{2}}{\dfrac{62}{75} - 0.16} \]
- Evaluate the expression: \(\dfrac{3\sqrt{16} + 2\sqrt{81} - 5}{\sqrt{9} + 2}\).
- Over 5 days, the number of steps (in thousands) was: 11, 5, 9, 7, 8. Find the average number of steps per day (subtracting 10 from each number makes this easier).
- Over a week, resting heart rate (bpm) was: 58, 70, 62, 66, 60, 68, 64. Find the mean and standard deviation (subtracting 65 from each number makes the mean easier to find).
- \(-14\).
- \(\dfrac{3\sqrt{16} + 2\sqrt{81} - 5}{\sqrt{9} + 2} = \dfrac{3\cdot4 + 2\cdot9 - 5}{3+2} = \dfrac{12+18-5}{5} = \dfrac{25}{5} = 5\).
- Mean = 8 thousand steps (8,000 steps).
- Mean = 64 bpm, standard deviation = 4 bpm.
Exit Ticket
Over 4 days, workout duration (in minutes) was: 33, 39, 41, 47. Find the mean and the standard deviation.
Homework
Solve the following four problems the same way we did in class.
- Evaluate the expression: \[ \dfrac{\left(6\dfrac{3}{5} - 3\dfrac{3}{14}\right) \cdot 5\dfrac{5}{6}}{(21-1.25):2.5} \]
- Evaluate the expression: \(\dfrac{6\sqrt{4} - \sqrt{225} + 9}{\sqrt{49} - 4}\).
- Over 6 days, the number of steps (in thousands) was: 12, 9, 6, 15, 10, 8. Find the average number of steps per day (subtracting 10 from each number makes this easier).
- Over 6 nights, deep sleep duration (in minutes) was: 93, 87, 93, 87, 93, 87. Find the mean and standard deviation (subtracting 100 from each number makes the mean easier to find).
- \(2.5\).
- \(\dfrac{6\sqrt{4} - \sqrt{225} + 9}{\sqrt{49} - 4} = \dfrac{6\cdot2 - 15 + 9}{7-4} = \dfrac{12-15+9}{3} = \dfrac{6}{3} = 2\).
- Mean = 10 thousand steps (10,000 steps).
- Mean = 90 minutes, standard deviation = 3 minutes.
How Fast Do We Get to School?
Key Questions:
- How do we formulate a hypothesis that can actually be tested?
- What helps us estimate an unknown value before we have any real data?
- What exactly should we record, and how, so it can be analyzed later?
Goals and Learning Outcomes
Goals
- 1 Introduce the "Commute Speed" project: what we're measuring, why, and how the study will run.
- 2 Run a guessing experiment so students encounter the idea of a "typical value plus spread" intuitively, before it's introduced formally.
- 3 Agree on the rules and format for collecting data over the next two weeks.
Outcomes
- ✓ Student has formulated their own hypothesis about the class's average commute speed.
- ✓ Student has proposed and explained, in a pair or to the class, at least one hypothesis about what might affect commute speed.
- ✓ Student knows exactly what to record each day, and in what format, over the next two weeks.
The "Commute Speed" Project
Over the next three weeks we're going to run our own statistical study — measuring how fast each of us gets to school. First we'll come up with hypotheses, then over two weeks we'll collect data on travel time, and after that we'll learn to calculate and visualize different characteristics of that data: mean, spread, median, quartiles, and diagrams.
At the end of the unit we'll bring the whole class's data together, build a combined picture, and check how close our hypotheses from today turned out to be.
Guess Without Data
On a slip of paper, write down a single number — your hypothesis for the class's average commute speed, in km/h. The number can be anything, and you don't need to sign your slip.
The teacher will collect all the slips.
What's Hidden in the Two Slips?
The teacher opens every slip except two — without revealing what's written on those two.
Which of the two hidden numbers do you think is larger? And, most importantly — describe your strategy: how did you reason before giving your answer?
Everyone should state their guess and briefly explain their strategy first — only after that does the teacher reveal both hidden numbers. Discuss together: whose strategy came closest, and why?
The takeaway to arrive at: guessing well took more than just averaging the numbers you could see — you also had to gauge how spread out the values in the set were. That's exactly what we'll study in the coming lessons: the mean and the spread (standard deviation).
Timed Pair Share
12 minCome up with one or two hypotheses about what might affect commute speed to school. A hypothesis doesn't have to be about a specific number — it can also be, for example, about comparing different conditions.
- 3 min — on your own. Write down one or two hypotheses of your own.
- 4 min — in pairs. Share your hypotheses with a partner, discuss, and pick the one or two you find most interesting.
- 5 min — with the class. A few pairs share their hypotheses. Together, settle on one or two hypotheses the whole class will test by the end of the unit.
Everyone can also keep their own personal hypothesis in mind — you don't have to limit yourself to the ones the class picks.
How We'll Collect the Data
Over the next two weeks, each of you will record data about your own commute to school. Here's the plan:
- Estimate the length of your route to school on a map (Google Maps or similar) once — you'll need it later to calculate speed.
- Every day, morning and evening, time your commute and write it down.
- Enter your data into a table like this one:
| Day of Week | Morning / Evening | Travel Time (min) |
|---|---|---|
| Monday | Morning | — |
| Monday | Evening | — |
| Tuesday | Morning | — |
A ready-made table template and the project workbook are in the Resources section below.
CALCULATING SPEED
- Aigerim estimated on a map that her route to school is 3.2 km. In the morning, the trip took 24 minutes. What speed was she traveling at (in km/h)?
- Marat lives 5 km from school and wants his commute to average 15 km/h. How many minutes should such a trip take?
- In the morning, Daniyar covered his route in 30 minutes at a speed of 10 km/h. In the evening he covered the same route faster, at 15 km/h. How many minutes did the evening trip take? What was his average speed for the whole day (there and back)?
- Asem walks the same 4 km route to school every morning. Over one week, her travel times were: 20, 24, 16, 30, and 30 minutes. Find: a) the speed for each individual trip; b) her average speed for the whole week (using total distance and total time). Compare the result from part b) with the simple arithmetic mean of the speeds from part a).
- 8 km/h.
- 20 minutes.
- The evening trip took 20 minutes; his average speed for the day was 12 km/h (not 12.5, which is what simply averaging 10 and 15 would give — because the time spent on each leg was different).
- Individual trip speeds — 12, 10, 15, 8, 8 km/h. The simple arithmetic mean of these speeds is 10.6 km/h. Her true average speed for the week (20 km in 2 hours) is 10 km/h.
Exit Ticket
Write down your hypothesis about the average commute speed again. Now add: how much do you think commute speed will vary across students in the class — roughly the same for everyone, or quite different? Why do you think so?