Introduction: Welcome to the World of Bivariate Data!
In your previous studies, you probably looked at univariate data—one single measurement like the heights of students in a class. In this chapter, we are stepping things up to bivariate data. The "bi" means two, so we are looking at pairs of measurements to see if there is a relationship between them.
Does the amount of time you spend gaming affect your reaction speed? Does the weight of a car change its fuel efficiency? By the end of these notes, you’ll be able to use professional statistical tools to prove whether these relationships are real or just a coincidence. Don't worry if this seems a bit much at first; we will break it down step-by-step!
1. Two Special Cases: Case A vs. Case B
Before we start calculating, we need to understand how the data was collected. The OCR syllabus focuses heavily on this distinction because it changes which tests we are allowed to use.
Case A: Random on Non-Random
This happens when an experimenter controls one variable (the independent variable, usually on the \(x\)-axis) and measures the other.
Example: A scientist decides to test a spring with exactly 1kg, 2kg, 3kg, and 4kg weights. The weights are "non-random" because the scientist chose them. The extension of the spring is "random" because it's the result being measured.
Common Mistake: Students often try to perform a correlation hypothesis test on this data. You cannot use the Pearson’s test here because one variable isn't random!
Case B: Random on Random
This is when both variables are random. We just observe them as they occur in nature.
Example: Measuring the height and weight of 50 random people. You didn't "set" anyone's height; you just measured what was there. This creates a "data cloud" on a scatter diagram.
Quick Review:
• Case A: One variable is fixed/controlled. No correlation testing!
• Case B: Both variables are random. Correlation testing is okay!
2. Scatter Diagrams: Seeing the Pattern
The first thing a statistician does is draw a scatter diagram. It's a visual way to spot outliers and check if a relationship looks linear (a straight line) or non-linear (a curve).
Did you know? On a scatter diagram, "Case B" data usually looks like an oval or elliptical cloud if there is a relationship. If it looks like a "Case A" plot, the points will be restricted to vertical lines above the specific values the experimenter chose.
Key Takeaway: Always look at the scatter plot first. If the points look like they follow a curve rather than a straight line, your standard linear tests might not be the best choice!
3. Pearson’s Product Moment Correlation Coefficient (PMCC)
The PMCC (represented by the letter \(r\)) is a number between \(-1\) and \(+1\) that tells us how close the points are to a perfect straight line.
What the numbers mean:
• \(r = +1\): A perfect positive linear relationship (points in a perfect line going up).
• \(r = 0\): No linear relationship at all.
• \(r = -1\): A perfect negative linear relationship (points in a perfect line going down).
Crucial Assumptions:
You can only perform a hypothesis test for \(r\) (the PMCC) if:
1. The data is Random on Random (Case B).
2. The data follows a Bivariate Normal Distribution. Don't let that jargon scare you! It just means the scatter diagram should look like an elliptical (egg-shaped) cloud. If the data is skewed or bimodal (two humps), the test isn't valid.
Hypothesis Testing for \(r\):
We test if there is evidence of correlation in the whole population (\(\rho\)) based on our sample (\(r\)).
• Null Hypothesis (\(H_0\)): \(\rho = 0\) (There is no correlation).
• Alternative Hypothesis (\(H_1\)): \(\rho > 0\), \(\rho < 0\), or \(\rho \neq 0\).
Memory Aid: \(H_0\) is the "boring" hypothesis—it always says "nothing interesting is happening here."
Effect Size:
Sometimes a result is "statistically significant" but the relationship is still very weak. We use Effect Size to describe how strong the link is. A common rule of thumb is:
• \(0.1\): Small effect
• \(0.3\): Medium effect
• \(0.5\): Large effect
4. Spearman’s Rank Correlation Coefficient (\(r_s\))
What if the data isn't a straight line? Or what if it's very messy? That's where Spearman's Rank comes in.
Why use Spearman's?
• It doesn't require "Bivariate Normality" (the egg-shaped cloud).
• It works on ranks (1st place, 2nd place, etc.) rather than the raw numbers.
• it measures association (if one goes up, does the other go up?) rather than just a straight line.
Step-by-Step for Spearman's:
1. Rank your first variable (\(x\)) from 1 to \(n\).
2. Rank your second variable (\(y\)) from 1 to \(n\).
3. Use your calculator on these ranks to find the correlation coefficient.
Key Takeaway: Use Spearman’s if your scatter plot shows a curve (as long as it's always increasing or always decreasing) or if your data has major outliers that would mess up the PMCC.
5. Regression Lines: Predicting the Future
A regression line is a "line of best fit" calculated mathematically using the least-squares method. It minimizes the squares of the residuals (the vertical distances between the points and the line).
Residual = Observed value – Value from regression line
If a residual is positive, the actual data point is above the line. If it's negative, the point is below the line.
Which line should I use?
In "Case B" (Random on Random), you actually have two possible lines!
• Use the \(y\) on \(x\) line if you want to estimate a value for \(y\).
• Use the \(x\) on \(y\) line if you want to estimate a value for \(x\).
Encouraging Phrase: Most exam questions will ask for the \(y\) on \(x\) line, so keep an eye out for which variable is which!
Interpolation vs. Extrapolation
• Interpolation: Estimating a value inside the range of your data. This is usually safe and reliable.
• Extrapolation: Estimating a value outside the range of your data. This is dangerous! Just because a trend is a straight line now doesn't mean it will stay that way forever.
Summary Takeaway: Regression lines are powerful for prediction, but always be cautious of extrapolation. A car might get faster as you push the pedal, but it won't reach the speed of light!