Does cold weather sell hot drinks?
A made-up cafe wrote down the temperature and its hot drink sales for ten days. The owner says "colder means more sales". Is she right? And by how much?
Opinions are cheap. Statistics gives her a number to back the claim, or to prove her wrong.
Key words
| Word | What it means | Example |
|---|---|---|
| Mean | The average: add the values up and divide by how many there are. | The mean of 2 and 4 is 3 |
| Standard deviation | A number for how far values typically sit from the mean. Small means bunched, large means spread out. | 2.0 |
| Correlation | A number from minus 1 to 1 for how strongly two sets of numbers move together. | Colder days, more hot drinks |
| Regression | Finding the straight line that best fits the points, so you can predict one number from another. | Sales from temperature |
| Slope | How much the line goes up or down for each step along. | About 4 fewer drinks per degree |
| Variance | The mean of the squared gaps from the mean. The standard deviation is its square root. | 4.0 |
| Requirement | What the finished analysis must be able to show. | Is there a link, and how strong? |
| Causation | When one thing really makes another happen. | Rain makes people buy umbrellas |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can clarify what pattern a requirement asks for, pick a method, and use standard deviation, correlation and regression.
Starter: what you already know
Have a go
Starter: what you already know
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Clarify, then choose a method
First write down the pattern the requirement asks for. "Is there a link between temperature and sales, and how strong?" is clear. "Look at the sales" is not.
The question points to the method. Six methods are on your course. The table says which question each one answers.
Worked example: the six methods
| Method | It answers | Cafe example |
|---|---|---|
| Clustering | Which points belong in a group? | Group customers who buy alike |
| Time series modelling | What pattern is there over time? | A weekly trend in sales |
| Standard deviation | How spread out are the values? | How much do daily sales vary? |
| Regression | How does one number change with another? | Sales for each degree |
| Correlation | Do two sets of numbers move together? | Temperature and sales |
| Chi-square test | Are two categories linked? | Does age group go with drink type? |
The cells students fill in are left blank in this preview.
Standard deviation: how spread out?
Two cafes both sell 50 drinks a day on average. One sells 49, 50, 51. The other sells 10, 50, 90. Same mean, very different days.
Standard deviation measures that. Find each value's gap from the mean. Square the gaps. Take the mean of the squares, which is the variance. Then take the square root.
Worked example: standard deviation by hand
| Value | Gap from the mean of 5 | Gap squared |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Total | 32 |
The cells students fill in are left blank in this preview.