Suppose we want to answer the age old question: Are women better drivers than men? There may be all sorts of ways to start answering the question but at the end we want a simple yes, no or maybe.
We can perform a hypothesis test, suppose as the 5% level:
H0: no difference in pass rates for men and women
H1: The is a difference in pass rates for men and women
We can draw up a contingency table to show all the outcomes for all the subjects.
This is the OBSERVED table:
If there were no difference between the pass rates for men and women, we would expect the number of of men who pass would be for example, equal to
In general in fact, to find the expected numbers in the table, given no difference in pass rates for men and women, we findWe obtain the EXPECTED table:
We now find:
The distribution ofis adistribution withdegree of freedom.
From thetables,we reject H0:. From the table, women have a higher pass rate.