Expected contingency frequency

If we have a contingency table, we can use it to find the expected frequency of each cell in the table, which gives what we would expect if the two variables were independent of each other.

Calculating the expected frequency

Knowing the row total, column total, and grand total (the total of all the frequencies in the table), we can calculate the expected frequency for each cell using this formula:

\text{Expected frequency} = \frac{\text{Row total} \times \text{Column total}}{\text{Grand total}}

Sometimes, we refer to the expected frequency as E_i

Example

Suppose we have the following contingency table showing the number of people who like different types of music, split by their age group:

Age GroupPopInstrumental
Under 183010
18-355020
35+2030

Let’s first add the row and column totals:

Age GroupPopInstrumentalTotal
Under 18301040
18-35502070
35+203050
Total10060160

Now, let’s calculate the expected frequency for the cell corresponding to “Under 18” and “Pop”:

We can do that for the entire table, to get:

Age GroupPopInstrumentalTotal
Under 18251540
18-3543.7526.2570
35+31.2518.7550
Total10060160