Need help from an expert?
The world’s top online tutoring provider trusted by students, parents, and schools globally.
To perform a Fisher's exact test, first create a contingency table with the observed frequencies.
A Fisher's exact test is used to determine if there is a significant association between two categorical variables. It is particularly useful when the sample size is small and the expected frequencies are low. To perform the test, first create a contingency table with the observed frequencies. For example, consider the following data:
| | Group A | Group B |
|-----------|---------|---------|
| Outcome 1 | 10 | 5 |
| Outcome 2 | 5 | 10 |
The null hypothesis is that there is no association between the two variables. To calculate the p-value, we need to determine the probability of obtaining a table as extreme or more extreme than the observed table, assuming the null hypothesis is true. This involves calculating the probability of all tables that have the same row and column totals as the observed table.
To do this, we use the hypergeometric distribution. The probability of obtaining a table with x1 in cell 1,1, x2 in cell 1,2, x3 in cell 2,1, and x4 in cell 2,2, given the row and column totals, is:
P(x1,x2,x3,x4) = (n1 choose x1) * (n2 choose x2) * ((n1+n2) choose (x1+x2)) / (N choose n1)
where n1 and n2 are the row totals, N is the total sample size, and n1+n2=N. We calculate the probability of all tables that are as extreme or more extreme than the observed table, and sum these probabilities to obtain the p-value.
In our example, the p-value is 0.0286, which is less than the usual significance level of 0.05. Therefore, we reject the null hypothesis and conclude that there is a significant association between the two variables.
Study and Practice for Free
Trusted by 100,000+ Students Worldwide
Achieve Top Grades in your Exams with our Free Resources.
Practice Questions, Study Notes, and Past Exam Papers for all Subjects!
The world’s top online tutoring provider trusted by students, parents, and schools globally.