Using our fake data, we’ll run Fisher’s exact test. This test is typically used in place of the chi-square on small samples, but it is valid for all sample sizes.

Hypotheses

  • H0 = in HWE
  • Ha = not in HWE
>fisher.test(Matrix)

	Fisher's Exact Test for Count Data

data:  Matrix
p-value = 0.0009992
alternative hypothesis: two.sided

Since the p-value is less than α (0.05 at the 95% level), we reject the (H0) null hypothesis in favor of the alternative (Ha). There is enough evidence to say that the fake data is not in HWE.