Chi-square is a statistical test commonly used to compare observed data with data we would expect to obtain according to a specific hypothesis. For example, if, according to MendelÃ¢â‚¬â„¢s laws, you expected 10 of 20 offspring from a cross to be male and the actual observed number was 8 males, then you might want to know about the Ã¢â‚¬Å“goodness to fitÃ¢â‚¬Â between the observed and expected. Were the deviations (differences between observed and expected) the result of chance, or were they due to other factors. How much deviation can occur before you, the investigator, must conclude that something other than chance is at work, causing the observed to differ from the expected. The chi-square test is always testing what null hypothesis, which states that there is no significant difference between the expected and observed result.
Read this topic