# Hypothesis testing

 From: Heidi Grant Date: 15 Feb 1999 Subject: Sample size for chi-squared test I have got to do a chi-squared test for my A-level biology project. What size sample do I need?

### Maths Help suggests:

First, let us remind ourselves what the chi-squared test is used for.

If you cross-reference two descriptive attributes of your sample, the frequencies (i.e. number of people/items) in each sub-category can be drawn up in a contingency table

For example, if you interview 250 adults (120 male, 130 female) and find that 76 of the 120 men oppose vivisection whereas 104 of the 130 women oppose vivisection, you could draw up a table as shown:

This is an example of a 2-by-2 contingency table (2 rows, 2 columns).

The chi-squared test will enable you to determine whether there is evidence that one gender is significantly more likely to oppose vivisection that the other (i.e.whether there is a significant association between the attributes). This is done by calculating the expected frequencies for each cell (NB a 2-by-2 table has four cells) and comparing the expected frequencies with the observed frequencies of your survey. (We assume you are happy about the procedure for doing this.)