Two-way frequency table
So far you have studied one variable at a time: the mark in an exam, the height of a group. But many interesting questions cross two variables in the same individual: do more hours of study mean a better mark? Does greater height mean greater weight? To study that relationship we need to observe both variables together, in each person.
Two variables, one table
Each inner cell is a joint absolute frequency $f_{ij}$: how many individuals have $X=x_i$ and $Y=y_j$ at the same time.
In a survey of $20$ students, they were asked about the number of siblings ($X$) and the number of pets ($Y$). The results are shown in the following two-way table: |…
In a survey of $20$ students, they were asked about the number of siblings ($X$) and the number of pets ($Y$). The results are shown in the following two-way table:
| $X \setminus Y$ | $0$ | $1$ | $2$ |
|---|---|---|---|
| 0 | $2$ | $4$ | $1$ |
| 1 | $3$ | $5$ | $2$ |
| 2 | $1$ | $1$ | $1$ |
State how many students have exactly $1$ sibling and $2$ pets, and check that the sum of all joint frequencies equals the total number of students surveyed.
Building the table from pairs of data
Often the data do not arrive already in a table, but as a list of pairs $(x_i, y_i)$, one per individual. You have to count how many times each pair is repeated.
$10$ people were asked about the number of times they go to the cinema per month ($X$) and the number of books they read per month ($Y$). The responses obtained for each…
$10$ people were asked about the number of times they go to the cinema per month ($X$) and the number of books they read per month ($Y$). The responses obtained for each individual $(X,Y)$ were:
$(1, 0), (2, 1), (1, 0), (3, 2), (2, 1), (1, 1), (3, 2), (2, 0), (1, 0), (2, 1)$.
Construct the two-way table corresponding to these two variables, showing the joint absolute frequencies.
You can do it on paper and send a photo with your answer.
In a study on families, the number of cars ($X$) and the number of bicycles ($Y$) were recorded. We know that variable $X$ takes the values $0, 1, 2$ and variable $Y$…
In a study on families, the number of cars ($X$) and the number of bicycles ($Y$) were recorded. We know that variable $X$ takes the values $0, 1, 2$ and variable $Y$ takes the values $0, 1$. Construct the two-way table knowing that:
-
There are $2$ families with $(0,0)$ and $3$ families with $(0,1)$.
-
There are $4$ families with $(1,0)$ and $5$ families with $(1,1)$.
-
There is $1$ family with $(2,0)$ and $0$ families with $(2,1)$.
You can do it on paper and send a photo with your answer.
The scatter diagram
The same information can be shown as a scatter plot: each pair $(x_i, y_j)$ is a point on the plane, and if several individuals share the same pair, its frequency is written next to the point (or the point is made larger).
The following scatter diagram shows the scores obtained in two aptitude tests, $X$ and $Y$, by a group of candidates. The numbers inside the circles indicate the joint…
The following scatter diagram shows the scores obtained in two aptitude tests, $X$ and $Y$, by a group of candidates. The numbers inside the circles indicate the joint absolute frequency (the number of candidates who obtained that pair of scores). Construct the two-way table associated with this graph and calculate the marginal mean for test $X$.
You can do it on paper and send a photo with your answer.
Reconstructing incomplete tables
A two-way table shows the relationship between the number of goals scored ($X$) and goals conceded ($Y$) by a football team in several matches. Some inner cells have…
A two-way table shows the relationship between the number of goals scored ($X$) and goals conceded ($Y$) by a football team in several matches. Some inner cells have been erased, but the marginal totals remain.
| $X \setminus Y$ | $0$ | $1$ | $2$ | Total $X$ |
|---|---|---|---|---|
| 0 | $2$ | $a$ | $0$ | $5$ |
| 1 | $b$ | $3$ | $1$ | $8$ |
| 2 | $1$ | $1$ | $c$ | $4$ |
| Total $Y$ | $7$ | $7$ | $3$ | $17$ |
Calculate the unknown values $a$, $b$ and $c$ so that the table is consistent.
In a two-way table relating two variables $X$ and $Y$, the cell frequency for $X=2$ and $Y=3$ is an unknown value $k$. | $X \setminus Y$ | $1$ | $2$ | $3$ |…
In a two-way table relating two variables $X$ and $Y$, the cell frequency for $X=2$ and $Y=3$ is an unknown value $k$.
| $X \setminus Y$ | $1$ | $2$ | $3$ |
|---|---|---|---|
| 1 | $4$ | $5$ | $2$ |
| 2 | $1$ | $3$ | $k$ |
| 3 | $2$ | $6$ | $1$ |
If we know that the total sample size is $N=30$, determine the value of $k$ and then calculate the marginal standard deviation of variable $X$.
Back to the start: Organising the pairs in a two-way table and plotting them on a scatter plot lets you see at a glance whether both variables increase together (like height and weight, or study and marks) or whether they have no relationship at all.