1001Ferramentas
📉Calculators

Chi-Square Goodness-of-Fit Calculator

Calculate the chi-square (χ²) goodness-of-fit statistic from observed and expected frequencies. Test whether your data follows the expected distribution.

χ² + gl

Chi-square goodness-of-fit test

Pearson's chi-square goodness-of-fit test, from 1900, asks whether an observed categorical distribution lines up with a theoretical one: χ² = Σ (O − E)² / E, where O is the observed and E the expected frequency in each category. The degrees of freedom come from df = k − 1 − p, with k categories and p parameters estimated from the data. You reject H₀ (that the data fits the model) once χ² climbs past the critical value χ²_crit in the chi-square table. Picture a die rolled 600 times: if it is fair, E = 100 per face, and a large χ² is a sign the die is loaded. As a working rule, keep each E ≥ 5 so the approximation holds up.

Applications

It turns up wherever categorical data needs checking: genetics, where you test Mendelian segregation ratios such as 9:3:3:1; market research and survey responses; A/B tests comparing proportions across several variants; validating pseudo-random number generators; and confirming that a sample reflects the distribution recorded in a population census.

FAQ

Goodness-of-fit or test of independence? Goodness-of-fit pits a single variable against a theoretical distribution. The test of independence compares two variables using a contingency table.

What if some expected counts are below 5? The chi-square approximation starts to break down. Merge the small categories together, or switch to Fisher's exact test or a Monte Carlo p-value.

How are degrees of freedom counted? Begin at k − 1, since one constraint already fixes the totals to match. Then drop one more df for every parameter you estimate from the sample, such as a Poisson mean.

Related Tools

🔔

Anderson-Darling Test (Normality)

Computes the Anderson-Darling test, one of the most powerful normality tests available. It measures how far the empirical distribution of your data departs from the normal curve, giving extra weight to the tails — precisely where other tests often miss departures. The tool returns the A² statistic, the adjusted A²* version (corrected for sample size) and an approximate p-value. The smaller the A², the more compatible with normality. Enter at least 8 values.

🔢

Mood's Median Test

Computes Mood's median test, a non-parametric test that checks whether several groups share the same median. The idea is simple and robust: you compute the grand median of all the data together and count, in each group, how many values fall above it. If the groups had the same median, those counts would be proportional to the sizes; an imbalance produces a large chi-square statistic. It's quite resistant to outliers, working only with counts. Enter the groups separated by semicolons.

🔢

Chi-Square Critical Value

Computes the critical value of the chi-square distribution for the degrees of freedom and confidence level you choose, dispensing with the printed table. It's the right-tail cutoff used in goodness-of-fit, independence and variance tests: if the computed statistic exceeds this value, the null hypothesis is rejected. Unlike the normal and the t, the chi-square is asymmetric and takes only positive values. Enter the degrees of freedom and the confidence level.

📊

CI for Variance and Standard Deviation

Computes the confidence interval for the variance and standard deviation of a normal population, from a sample. While most tools estimate the mean, this one estimates the spread — useful in quality control, where consistency matters as much as the central value. The calculation uses the chi-square distribution, which is asymmetric, so the interval is not centered on the sample variance. Enter the sample and the confidence level.

📉

One-Sample Variance Test (Chi-Square)

Computes the chi-square test for the variance of a single sample, which checks whether the population variance equals a reference value. It's the dispersion counterpart of the one-sample t-test for the mean. It shows up often in quality control: is a process's variability within the specified limit, or has it increased? The statistic compares the sample variance with the hypothesized one and follows a chi-square distribution. Enter the sample and the hypothesized variance (σ₀²).

🔲

Chi-Square Test of Independence

Computes the chi-square test of independence for a contingency table, checking whether two categorical variables are associated or independent. For example: does preference for a product depend on age group? The test compares the observed frequencies with those that would be expected if there were no relationship at all, and the chi-square statistic measures the size of that mismatch. The tool returns the statistic, the degrees of freedom and the p-value. Enter the table: columns by comma, rows by semicolon.

The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.