Title: Exploring relationships using samples (continued)
Course: UGQuants (SSPS) > Section: Inference

Exploring relationships using samples (continued)

The last question was a bit of a brain teaser. We can see from our results that there is an overlap between our 99% confidence intervals for the two proportions, but for the proportions to be the same (and thus lead us to accept our null hypothesis of no relation between smoking and sex) we would need to have sample statistics that were underestimating voting amongst males and overestimating it for females. That seems overly complex: but we can surmount these problems with what is called the Chi Square test.

The Chi Square test fits a model of no association to our data, and then calculates what the probability is of obtaining such a pattern of results existing in the population, given our observed results in our sample. Here, no association would exist if the proportion of men and women voters was the same.

We can obtain this result by multiplying the figures in the table marginals (in exactly the same way that we do when calculating Phi).

 | 1,671 of the 2,321 people in our sample voted in the last national elections.
 | 1,016 of the 2,321 people in our sample are men.
 | Therefore, if there were no association, then we would expect that we would find the same proportion of smokers amongst men as we do in the sample as a whole.
 | That is, if there were no association then we would expect that: (1,671 x 1,016) /2,321 = 731.5 men in our sample would have voted.

Note: another way to think of this is through percentages. If 72% of all people voted in the last national elections, also 72% of the men = .72 x 1,016 = 731.5 men should have.

We can get SPSS to calculate these results for us, by choosing 'expected count' in the ‘cells’ option of the crosstabs dialog box.

Table 3: Voting by gender – expected counts

Source: ESS5 (UK) unweighted data

Next we:

1 | Calculate the difference between the observed and expected value in each cell (in other words the residual)
2 | Square it (to take account of negative residuals as we do in regression for example)
3 | Divide this by the expected value.

We do this for each table cell and sum the totals. This gives us the value of Chi Square.

We thus have the following calculation:

(292 – 284.5)^2 / 284.5

+ (358 – 365.5)^ 2/ 365.5

+ (724 – 731.5)^ 2 / 731.5^

+ (947 – 939.5)^ 2 / 939.5^

Which simplifies to

56.25 / 284.5

+ 56.25 / 365.5

+ 56.25 / 731.5

+ 56.25 / 939.5

= 0.20 + 0.15 + 0.08 + 0.06

= 0.49

In the olden days you could consult the Statistical Tables found at the back of most stats textbooks to see if any given value for Chi square lay within the 'critical' 5% or 1% region, given the number of degrees of freedom in the table.

Degrees of freedom are simply the minimum number of values we need to know within the body of the table to be able to calculate all the others. In other words, if we know the marginal values, how many cells within the table do we need to know the values of so as to be able to work out the others?

In a 2 x 2 table like the one we are working with there is only one degree of freedom.  If you’re not sure why see if you can work out the values in the blank cells as follows. You should be able to correctly complete the other three cells. Try it now:

 | Male | Female | Total
Yes | 445 |  | 935
No |  |  | 1,494
Total | 1,242 | 1,187 | 2,429

The five percent region would give us a 5% risk of obtaining the pattern of data in our sample had there indeed been no association between the variables gender and having voted in the population. The 1% region gives us a 1% risk.

For one degree of freedom at the five per cent level Statistical Tables (see, for example, here) the critical value for Chi Sq is 3.84. Our value of 0.49 is well below this value and therefore not within the critical region within which we can reject our null hypothesis of no association and accept an alternative hypothesis that given the results in our sample, there is a relationship between sex and smoking in the population from which our sample has been drawn. In not being able to reject the null hypothesis, our probability of making a type II error will be less than 5%.

What about using software to calculate this?