Chi-Square and G-Tests Calculators
This page presents tools that summarise categorical data using Chi-Square and G-Tests, providing numerical outputs based on observed and expected frequencies.
-
Chi-Square Goodness-of-Fit Calculator
A comparison between observed counts and expected counts shows how closely the two sets align within a probability distribution.
Example use: Checking whether the number of coloured balls drawn from a bag matches the proportions you expected.
Inputs: observed data, expected data, significance level alpha
Outputs: chi-square statistic, degrees of freedom, p-value, significance level alpha, sum of observed, sum of expected, significant result
Visual: a smooth probability curve with the shaded region marking the likelihood of obtaining a result at least as large as the calculated value
-
Chi-Square Test of Independence Calculator
A comparison of counts across two categorical variables indicates whether their outcomes vary independently or show a linked pattern.
Example use: Checking whether snack choices differ between two separate groups at a small gathering.
Inputs: observed frequencies, significance level alpha
Outputs: chi-square statistic, degrees of freedom, p-value, critical value for alpha, significance result, grand total, expected values, final sum
Visual: a probability curve with a marker showing the calculated value and how it compares with the region used for the significance decision
-
G-Test Goodness of Fit Calculator
A comparison of observed and expected counts uses a likelihood-based measure to assess how well the expected pattern matches the actual results.
Example use: Checking whether the number of times each face appears when rolling a die matches the proportions you anticipated.
Inputs: observed counts, expected counts, significance level alpha
Outputs: g-statistic, degrees of freedom, p-value, significance level alpha, result
Visual: a smooth probability curve with a marker showing the calculated value and the shaded region representing the probability of obtaining a result at least that large
Chi-Square and G-Tests FAQs
These tests compare observed and expected frequencies to indicate whether differences arise from random variation or structured patterns within categorical data.
Both summarise frequency data, with the G-Test applying likelihood ratios and the Chi-Square test using squared differences from expected counts.
A Chi-Square test of independence evaluates whether counts across two categorical variables vary together or remain statistically unrelated within a contingency table.