encyclopegia.org

Chi-squared test

, showing on the first axis and p-value (right tail probability) on the second axis.[src] A chi-squared test (also chi-square or test) is a statistical hypothesis test used in the analysis of contingency tables when the sample sizes are large.[src] In simpler terms, this test is primarily used to examine whether two categorical variables (two dimensions of the contingency table) are independent in influencing the test statistic (values within the table).[src] The test is valid when the test statistic is chi-squared distributed under the null hypothesis, specifically Pearson's chi-squared test and variants thereof.[src] Pearson's chi-squared test is used to determine whether there is a statistically significant difference between the expected frequencies and the observed frequencies in one or more categories of a contingency table.[src] For contingency tables with smaller sample sizes, a Fisher's exact test is used instead.[src] In the standard applications of this test, the observations are classified into mutually exclusive classes.[src] If the null hypothesis that there are no differences between the classes in the population is true, the test statistic computed from the observations follows a frequency distribution.[src] The purpose of the test is to evaluate how likely the observed frequencies would be assuming the null hypothesis is true.…[src]

, showing on the first axis and p-value (right tail probability) on the second axis.[src] A chi-squared test (also chi-square or test) is a statistical hypothesis test used in the analysis of contingency tables when the sample sizes are large.[src] In simpler terms, this test is primarily used to examine whether two categorical variables (two dimensions of the contingency table) are independent in influencing the test statistic (values within the table).[src] The test is valid when the test statistic is chi-squared distributed under the null hypothesis, specifically Pearson's chi-squared test and variants thereof.[src] Pearson's chi-squared test is used to determine whether there is a statistically significant difference between the expected frequencies and the observed frequencies in one or more categories of a contingency table.[src] For contingency tables with smaller sample sizes, a Fisher's exact test is used instead.[src] In the standard applications of this test, the observations are classified into mutually exclusive classes.[src] If the null hypothesis that there are no differences between the classes in the population is true, the test statistic computed from the observations follows a frequency distribution.[src] The purpose of the test is to evaluate how likely the observed frequencies would be assuming the null hypothesis is true.[src] Test statistics that follow a distribution occur when the observations are independent.[src] There are also tests for testing the null hypothesis of independence of a pair of random variables based on observations of the pairs.[src] Chi-squared tests often refers to tests for which the distribution of the test statistic approaches the distribution asymptotically, meaning that the sampling distribution (if the null hypothesis is true) of the test statistic approximates a chi-squared distribution more and more closely as sample sizes increase.[src] & \sum^k_{i=1}{p_i} = 1 \\[8pt] & \sum^k_{i=1}{m_i} = n\sum^k_{i=1}{p_i} = n \end{align} Pearson proposed that, under the circumstance of the null hypothesis being correct, as the limiting distribution of the quantity given below is the distribution.[src] X^2=\sum^k_{i=1}{\frac{(x_i-m_i)^2}{m_i}}=\sum^k_{i=1}{\frac{x_i^2}{m_i}-n} Pearson dealt first with the case in which the expected numbers are large enough known numbers in all cells assuming every observation may be taken as normally distributed, and reached the result that, in the limit as becomes large, follows the distribution with degrees of freedom.[src] However, Pearson next considered the case in which the expected numbers depended on the parameters that had to be estimated from the sample, and suggested that, with the notation of being the true expected numbers and being the estimated expected numbers, the difference X^2-{X'}^2=\sum^k_{i=1}{\frac{x_i^2}{m_i}}-\sum^k_{i=1}{\frac{x_i^2}{m'_i}} will usually be positive and small enough to be omitted.[src] In a conclusion, Pearson argued that if we regarded as also distributed as distribution with degrees of freedom, the error in this approximation would not affect practical decisions.[src] This conclusion caused some controversy in practical applications and was not settled for 20 years until Fisher's 1922 and 1924 papers.[src] ==Chi-squared test for variance in a normal population== If a sample of size is taken from a population having a normal distribution, then there is a result (see distribution of the sample variance) which allows a test to be made of whether the variance of the population has a pre-determined value.[src] For example, a manufacturing process might have been in stable condition for a long period, allowing a value for the variance to be determined essentially without error.[src] Suppose that a variant of the process is being tested, giving rise to a small sample of product items whose variation is to be tested.[src] The test statistic in this instance could be set to be the sum of squares about the sample mean, divided by the nominal value for the variance (i.e.[src] the value to be tested as holding).[src] Then has a chi-squared distribution with degrees of freedom.[src] For example, if the sample size is 21, the acceptance region for with a significance level of 5% is between 9.59 and 34.17.[src] ==Example chi-squared test for categorical data== Suppose there is a city of 1,000,000 residents with four neighborhoods: , , , and .[src] A random sample of 650 residents of the city is taken and their occupation is recorded as "white collar", "blue collar", or "no collar".[src] The null hypothesis is that each person's neighborhood of residence is independent of the person's occupational classification.[src] The data are tabulated as: Let us take the sample living in neighborhood , 150, to estimate what proportion of the whole 1,000,000 live in neighborhood .[src] Similarly we take to estimate what proportion of the 1,000,000 are white-collar workers.[src] By the assumption of independence under the hypothesis we should "expect" the number of white-collar workers in neighborhood to be 150\times\frac{349}{650} \approx 80.54 Then in that "cell" of the table, we have \frac{\left(\text{observed}-\text{expected}\right)^2}{\text{expected}} = \frac{\left(90-80.54\right)^2}{80.54} \approx 1.11 The sum of these quantities over all of the cells is the test statistic; in this case, \approx 24.57 .[src] Under the null hypothesis, this sum has approximately a chi-squared distribution whose number of degrees of freedom is (\text{number of rows}-1)(\text{number of columns}-1) = (3-1)(4-1) = 6 If the test statistic is improbably large according to that chi-squared distribution, then one rejects the null hypothesis of independence.[src] A related issue is a test of homogeneity.[src] Suppose that instead of giving every resident of each of the four neighborhoods an equal chance of inclusion in the sample, we decide in advance how many residents of each neighborhood to include.[src] Then each resident has the same chance of being chosen as do all residents of the same neighborhood, but residents of different neighborhoods would have different probabilities of being chosen if the four sample sizes are not proportional to the populations of the four neighborhoods.[src] In such a case, we would be testing "homogeneity" rather than "independence".[src] The question is whether the proportions of blue-collar, white-collar, and no-collar workers in the four neighborhoods are the same.[src] However, the test is done in the same way.[src] ==Applications== In cryptanalysis, the chi-squared test is used to compare the distribution of plaintext and (possibly) decrypted ciphertext.[src] The lowest value of the test means that the decryption was successful with high probability.[src] This method can be generalized for solving modern cryptographic problems.[src] In bioinformatics, the chi-squared test is used to compare the distribution of certain properties of genes (e.g., genomic content, mutation rate, interaction network clustering, etc.) belonging to different categories (e.g., disease genes, essential genes, genes on a certain chromosome etc.).[src] ==See also== Chi-squared test nomogram Cramér's V GEH statistic G-test Minimum chi-square estimation Nonparametric statistics Wald test Wilson score interval ==Further reading==[src]

51 sentences · 51 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Chi-squared test." encyclopegia.org, 2026, https://encyclopegia.org/wiki/chi-squared-test. Accessed 28 November 2026.

Chicago

"Chi-squared test." encyclopegia.org. Accessed November 28, 2026. https://encyclopegia.org/wiki/chi-squared-test.

APA

encyclopegia.org. (2026). Chi-squared test. Retrieved November 28, 2026, from https://encyclopegia.org/wiki/chi-squared-test

Accessed November 28, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Izod impact strength test

stub · references available

Tai chi chuan

stub · references available

Allen's test

stub · references available

World Tai Chi and Qigong Day

stub · references available

Öko-Test

stub · references available

ABR-Test

stub · references available

Wartegg test

stub · references available

Classical test theory

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1368704540 · 0.5 · snapshot enwiki-001368704540

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.