Statistics — Data, Regression, and Probability
Statistics is how you turn a collection of observations into a careful claim. The arithmetic matters, but so does the way the data was gathered. A precise mean from a biased sample can still support the wrong conclusion.
Populations, Samples, and Bias
The population is the entire group a question is about. A sample is the smaller group actually measured. For example, all Grade 11 students at a school are a population; 80 students selected to answer a survey are a sample. We use a sample to estimate a population when measuring everyone is impractical.
A sample should represent the population. Random selection gives every member a known, fair chance to be selected and helps reduce bias. It does not guarantee a perfect sample, but it is much stronger than asking only the easiest people to reach.
| Problem | Why it is biased or limited | Better approach |
|---|---|---|
| Ask followers of a school sports account whether the school needs more sports funding. | The group is already more likely to value sports. | Randomly select students from the school roster. |
| Post an optional online poll about homework time. | People with strong opinions may be more likely to respond; this is voluntary-response bias. | Contact a random sample and record nonresponses. |
| Measure one class and claim the result for the whole grade. | One class may differ by course level, teacher, or timetable. | Randomly sample across the whole grade. |
Also separate an observational study from an experiment. An observational study records what already happens. An experiment deliberately assigns a treatment, ideally at random. Random assignment supports a cause-and-effect claim about the treatment; a survey or observational study generally does not.
Types of Data
Categorical data put each observation into a label or group, such as transport method, eye colour, or preferred music genre. Counts and percentages summarize categories. Quantitative data are numerical measurements for which arithmetic makes sense, such as height, test score, or commute time.
- Discrete quantitative data are counts: number of siblings or goals scored.
- Continuous quantitative data are measured on a scale: mass, time, or temperature. They can take values between whole numbers.
Do not calculate a mean of category codes. If a survey codes bus as 1, walk as 2, and bike as 3, the mean code has no practical meaning: the numbers are labels, not measurements.
Describing a Distribution
For quantitative data, describe the centre, spread, and shape. A histogram or dot plot helps reveal clusters, gaps, skew, and unusual values before one summary number hides them.
Mean, Median, Range, and IQR
The mean is the total divided by the number of values. The median is the middle value after sorting; with an even number of values, it is the mean of the two middle values. The mean uses every value but is pulled by outliers. The median is resistant to extreme values.
The range is maximum minus minimum. The interquartile range (IQR) is Q3 − Q1, the spread of the middle 50% of ordered data. Use median and IQR when the distribution is skewed or has outliers; use mean and standard deviation when it is roughly symmetric with no serious outliers.
Worked Example: Centre and Spread
These are five commute times, in minutes: 12, 14, 15, 17, 42. Find the mean, median, range, and IQR.
Data are already ordered: 12, 14, 15, 17, 42
Mean = (12 + 14 + 15 + 17 + 42) / 5
= 100 / 5
= 20 minutes
Median = middle value = 15 minutes
Range = 42 - 12
= 30 minutes
Lower half (not including the median): 12, 14
Q1 = (12 + 14) / 2 = 13
Upper half (not including the median): 17, 42
Q3 = (17 + 42) / 2 = 29.5
IQR = Q3 - Q1
= 29.5 - 13
= 16.5 minutes
The 42-minute commute raises the mean above the median. “Typical” is better communicated here by a median of 15 minutes and IQR of 16.5 minutes. Quartile conventions can differ slightly between courses and calculators; use the convention your course specifies consistently.
Standard Deviation and z-Scores
Standard deviation measures a typical distance from the mean. A small standard deviation means values tend to stay close to the mean; a large one means they are more spread out. For a population,
σ = √[Σ(x - μ)2 / N]
where μ is the population mean and N is the population size. When data are a sample used to estimate a population, calculators commonly use the sample standard deviation s, which divides by n − 1 instead. The important interpretation is the distance, not memorizing the formula.
A z-score states how many standard deviations a value is from the mean:
z = (x - mean) / standard deviation
A positive z-score is above the mean; a negative z-score is below it. A z-score of 1.5 means 1.5 standard deviations above the mean.
Worked Example: z-Score
A test has mean 72 and standard deviation 8. Find the z-score for a mark of 84.
z = (x - mean) / standard deviation
= (84 - 72) / 8
= 12 / 8
= 1.5
The mark of 84 is 1.5 standard deviations above the mean. A z-score compares results from different scales, provided the distributions are interpreted sensibly.
Scatter Plots, Correlation, and Regression
A scatter plot displays paired quantitative data. Put the explanatory variable on the horizontal axis and the response variable on the vertical axis. Look for direction (positive or negative), form (linear or curved), strength, and outliers.
Correlation measures the direction and strength of a linear relationship. The correlation coefficient r is between −1 and 1. Values near 1 show strong positive linear association, values near −1 show strong negative linear association, and values near 0 show little linear association. Correlation is not proof of causation: ice-cream sales and sunburns may rise together because warm weather affects both.
A least-squares regression line has the form ŷ = a + bx. Its slope b is the predicted change in y for one more unit of x; its intercept a is the predicted y at x = 0. Interpret an intercept only if zero is meaningful and within a reasonable range of the data.
Worked Example: Prediction and Residual
A regression model for quiz score from study hours is ŷ = 54 + 4.8x. A student studies 5 hours and scores 72. Find the prediction and residual.
Predicted score:
ŷ = 54 + 4.8x
= 54 + 4.8(5)
= 54 + 24
= 78
Residual = observed - predicted
= 72 - 78
= -6
The student scored 6 points below the model prediction. Residuals scattered randomly around zero support a linear model; a curved pattern suggests that a line is missing structure.
Fundamental Probability
Probability is a number from 0 to 1. For equally likely outcomes, P(event) = favourable outcomes / total outcomes. An event's complement is “not the event,” so:
P(not A) = 1 - P(A)
For example, if the probability a bus is late is 0.18, then P(not late) = 1 − 0.18 = 0.82.
Events A and B are independent when knowing one happened does not change the probability of the other. Only then may you multiply directly:
P(A and B) = P(A) × P(B) for independent events
Worked Example: Independent Events
A fair coin is flipped and a fair six-sided die is rolled. What is the probability of heads and an even number?
P(heads) = 1/2
P(even number) = 3/6 = 1/2
The coin result does not affect the die result, so the events are independent.
P(heads and even) = P(heads) × P(even)
= 1/2 × 1/2
= 1/4
Without replacement, draws are usually not independent. If a bag has 3 red and 2 blue counters, then after drawing a red counter, the chance that the next counter is red changes from 3/5 to 2/4.
Common Mistakes
- Calling a convenient group random. Convenience samples are not random samples.
- Using the mean automatically. Check for skew and outliers; median and IQR may tell the story more honestly.
- Reading correlation as causation. Look for confounding variables and whether a randomized experiment was used.
- Writing predicted minus observed for a residual. Use residual = observed − predicted.
- Multiplying probabilities for any two events. Direct multiplication requires independence; otherwise use a conditional probability.
Practice Set
- A principal wants the average sleep time of all Grade 11 students. Identify the population and give a sensible sampling method.
- For 3, 5, 7, 9, 16, find the mean and median. Which is less affected by the value 16?
- A value is 65 in a distribution with mean 71 and standard deviation 3. Find its z-score.
- A model is ŷ = 12 + 2.5x. At x = 4, the observed value is 19. Find the prediction and residual.
- A card is chosen from a standard 52-card deck. Find the probability that it is not a heart.
- A fair die is rolled twice. Find the probability of rolling a 6 on both rolls.
Answers
- Population: every Grade 11 student at the school. Randomly select students from a Grade 11 roster, rather than surveying one class.
- Mean = (3 + 5 + 7 + 9 + 16) / 5 = 40 / 5 = 8. Median = 7. The median is less affected by 16.
- z = (65 − 71) / 3 = −6 / 3 = −2. The value is 2 standard deviations below the mean.
- ŷ = 12 + 2.5(4) = 12 + 10 = 22. Residual = 19 − 22 = −3.
- P(not heart) = 1 − 13/52 = 39/52 = 3/4.
- P(6 then 6) = 1/6 × 1/6 = 1/36, because the rolls are independent.
dispelled