THE ESSENTIAL STATS 25

Probability that chance alone gave us a chi-squared greater than or equal to 0.97

is 0.6241

Based on these results we conclude that wealth has no signiﬁcant affect on health (remember

that our observed values are made up!).

4.4 Fisher’s Exact Test

4.4.1 Why and when

Fisher’s exact test can be used instead of chi-squared when you have two variables (for example

health and wealth), each having two categories (for example: sick, healthy and poor, rich), and

one or more of the expected counts for the four possible categories (2 · 2 = 4) are below 10

(remember: you cannot use chi-squared if even one expected count is less than 10). Like chi-

squared, Fisher’s exact test can be used to see if there is a relationship between the two variables

as well as to measure the deviation of observed data from expectation.

Reputedly, Fisher was inspired to develop this test after an acquaintance, Dr. Muriel Bristol,

claimed to be able to distinguish between a cup of tea in which the milk was poured before the tea

and a cup in which the tea was poured before the milk

1

. In honor of Dr. Bristol, we will test this

hypothesis.

4.4.2 Calculate with Example

Say we have collected the following data:

The above generalizes to:

If our tea taster really can correctly identify which cups of tea had the milk poured ﬁrst and

which did not, then we expect a and d to be large (meaning he or she guessed correctly most of the

time) and b and c to be small (incorrect guesses). If b and c are large, then our taster consistently

misidentiﬁed the tea. If our taster consistently misidentiﬁes the tea then he or she probably can dis-

tinguish between the two types, but has labeled them incorrectly. If our taster cannot distinguish

1. http://en.wikipedia.org/wiki/Muriel_Bristol

Actual Order

Milk First Tea First Total

Claim of Tea

Taster

Milk First 3 1 4

Tea First 2 4 6

Total 5 5 10

Variable A

Category

A1

Category

A2

Total

Variable B

Category B1 a b a + b

Category B2 c d c + d

Total a + c b + d n

Get *Statistics is Easy!* now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.