Bivariate Statistics
Senior 5 · Mathematics
Bivariate Statistics
Lesson 2 of 4
40 min
A pupil surveying a village asks 40 households two questions: how many people live there, and how many mobile phones they own (illustrative data). Many households give the same pair of answers, so listing 40 pairs would waste space. A double-entry table counts each pair once. From it we can rebuild each variable's own distribution, and measure with one number, the covariance, whether the two tend to rise together.
Definition
A bivariate (double-entry) frequency table lists the values of down one side and of across the top. The cell in row , column holds the joint frequency , the number of individuals with and . The total is .
Worked example 1: reading a double-entry table
= number of people in a household, = number of mobile phones, for 40 households (illustrative):
| \ | 1 | 2 | 3 | Total |
|---|---|---|---|---|
| 2 | 5 | 2 | 0 | 7 |
| 3 | 4 | 6 | 1 | 11 |
| 4 | 2 | 7 | 4 | 13 |
| 5 | 1 | 3 | 5 | 9 |
| Total | 12 | 18 | 10 | 40 |
Find the marginal means and the mean number of phones in 4-person households.
Solution. From the margins: people and phones. The conditional distribution of for is the row (13 households), with mean phones, higher than for 2-person households ().
Definition
The covariance of and is the mean of the products of their deviations from their means:
For a double-entry table, . (For grouped data, use the class midpoints.)
Why the two forms agree. Expanding, , because and .
The dashed lines through the mean point cut the scatter diagram into four quadrants. A point up and to the right of , or down and to the left, has both deviations of the same sign, so a positive product; the other two quadrants give negative products. The covariance is the average product: positive when most points lie in the "+" quadrants (positive correlation), negative when most lie in the "−" quadrants, and near 0 when they balance.
Worked example 2: covariance of the revision data
Solution. With , , the products are , with sum 232. So . With the shortcut: , and . ✓ No product is negative, which matches the figure.
Worked example 3: covariance from the table
Find for the 40 households.
Solution. Add over all cells. Row : . Row : . Row : . Row : . Total 297. So
Positive: bigger households tend to own more phones.
Important
Properties. ; ; and for constants ,
Adding constants shifts the means but not the deviations; multiplying scales each deviation. So the covariance depends on the units: measuring revision in minutes instead of hours multiplies it by 60. Its size alone cannot say whether a correlation is strong. Lesson 3 fixes this by dividing by the standard deviations.
Worked example 4: changing units
The marks in the revision data are converted to percentages (), and revision time to minutes (). Find .
Solution. . The relationship has not changed at all, yet the covariance is 120 times bigger.
Warning
Tip
Organise the work in a table with columns , , , , and a row of totals. The same five totals give the means, variances, covariance, correlation coefficient and regression lines of lessons 3 and 4.
StatQuest with Josh Starmer: Covariance, Clearly Explained (about 22 min). Watch why the sign of the covariance shows the trend while its size depends on the scale of the data.
Practice
Questions 1 to 3 are routine; 4 to 6 need more care; 7 asks for a reason.
Sources and credits