The chi squared test works by:
the formula results in a number.
the degrees of freedom are calculates (number of categories - 1)
Value Fromm formula compared to critical value
if the number is less than the critical value we accept null hypothesis that results occurred due to chance