Using our fake data, we’ll run a chi-square test. This test is used to evaluate how likely there is to be an observed difference between sets.
Hypotheses
- H0 = in HWE
- Ha = not in HWE
> chisq.test(Matrix)
Pearson's Chi-squared test
data: Matrix
X-squared = 13.822, df = 2, p-value = 0.0009965
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.