The chi-square distribution is used to test a hypothesis. Therefore, expected values are related to observed values using a chi-square distribution. Then using p-value tables the hypothesis is tested at a 5% significance level.
Go to: Pearson's chi square test (goodness of fit) | Probability and Statistics | Khan Academy