Skip to content

Samircodehub/Chi-Square-Test

Repository files navigation

Chi-Square-Test

Chi-Square-Test of independence

  • A chi-square (Χ2) test of independence allows you to draw conclusions about a population based on a sample.
  • Use to test whether two categorical variables are related to each other in population
  • means If two variables are related, the probability of one variable having a certain value is dependent on the value of the other variable.

Contingency tables In chi-square test of independence, the best way to organize your data is contingency table. A contingency table, also known as a cross tabulation, shows the number of observations in each combination of groups. It also usually includes row and column totals.

# Whether to reject the null hypothesis

  • If the Χ2 value is greater than the critical value, then the difference between the observed and expected distributions is statistically significant (p < α). The data allows you to reject the null hypothesis that the variables are unrelated and provides support for the alternative hypothesis that the variables are related.

  • If the Χ2 value is less than the critical value, then the difference between the observed and expected distributions is not statistically significant (p > α). The data doesn’t allow you to reject the null hypothesis that the variables are unrelated and doesn’t provide support for the alternative hypothesis that the variables are related.

  • Null hypothesis (H0): Variable 1 and variable 2 are not related in the population; The proportions of variable 1 are the same for different values of variable.

  • Alternative hypothesis (Ha): Variable 1 and variable 2 are related in the population; The proportions of variable 1 are not the same for different values of variable.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published