One categorical variable and a set of proportions you expected to see. Where the expectations should come from, why that choice is the whole analysis, and how this test answers the question of who your sample actually represents.
A goodness of fit test compares the distribution of one categorical variable against proportions you specify. Did our respondents come out evenly across six age groups? Does our sample match the population's composition? Are response options being chosen at the rate the design assumed?
It is the one-variable version of chi-square. Instead of comparing observed counts against what independence predicts, it compares them against expectations you supply.
That makes the expectations the analysis. A significant result means your data departs from what you specified, so the finding is only as meaningful as the specification. Two researchers testing the same data against different expectations will reach different conclusions, and both can be correct.
The result card names the comparison directly, as the variable versus the expectation you tested it against. That heading is doing real work: it puts the assumption in the title rather than leaving a reader to wonder what the counts were compared to.
Four figures follow: chi-square, df, p, and k, the number of categories. Degrees of freedom are k minus one, so six categories gives df = 5 regardless of sample size.
Take a real one. Age group tested against a uniform expectation on 250 respondents returns chi-square = 134.77, df = 5, p < .001, k = 6. The sample is emphatically not evenly spread across age bands.
Note what makes that test valid. A uniform expectation over six categories puts about 42 cases in every expected cell, comfortably above the minimum. Compare that with a 5×6 independence table on the same 250 cases, where 30 cells give an average expected count near 8 and some cells fall well below it. Same data, very different exposure to the expected-count rule.
Uniform is the default and is often the wrong choice. Testing whether six age groups are equally represented is only interesting if you had reason to expect balance, and in most convenience samples you did not. A significant result against uniform frequently tells you nothing more than that people are not evenly distributed by age, which was never in doubt.
Population benchmarks are usually the stronger comparison. Census figures, institutional enrollment data, or a known membership roster tell you whether your sample looks like the group it claims to describe. This is the version that answers a question a reviewer will actually ask.
Design expectations come from your own protocol: a stratified sample intended to be one sixth each, a randomization expected to split evenly.
Fix the expectations before you look at the data. Choosing them afterwards turns the test into a description of what you already saw. State where they came from, with a citation where they come from a published source.
This is the most valuable use of the test and the one most often missed. Comparing your sample's composition against a population benchmark asks who your results actually describe, which is a question worth settling before analysis rather than after a reviewer raises it.
The age example makes the point. A sample of 250 with 91 respondents aged 25 to 34 and 3 aged 65 or over does not describe older workers, whatever the overall findings say. Every subsequent analysis inherits that limitation, and no amount of statistical sophistication downstream repairs it.
It also flags where group comparisons will be unstable before you run them. A category with three cases cannot support an adjusted mean, a group difference, or anything else, however precisely the software prints it.
Run this early. It costs one analysis and it changes how you write the limitations section.
Lay the data out one row per person with a single column holding the category. Quanta builds the frequency table for you.
Upload categories as text rather than numeric codes so the variable is typed as a category rather than a quantity.
Open Nonparametric & Categorical and select Chi-square goodness-of-fit from the test list, then configure the variable and the expected proportions in the Setup panel on the right.
Check the expected counts before reading the p value. Specified proportions can produce a breach of the minimum even where the observed table looks well populated, particularly if one expected proportion is small.
Use the action bar to add the result to a report, copy the table, or copy the APA text. Every result carries the ReliCheck Intelligence card for a plain-language explanation computed on your Mac.
Report chi-square with degrees of freedom and sample size, then p, and state the expectations you tested against.
The sample was not evenly distributed across age groups, χ²(5, N = 250) = 134.77, p < .001. Respondents aged 25 to 34 were substantially overrepresented (36.4%) and those aged 65 or over were nearly absent (1.2%).
Degrees of freedom are the number of categories minus one and do not depend on sample size.
Give the observed and expected percentages for the categories that drive the result. Without them the statistic says only that something differed.
Name the source of the expected proportions. A goodness of fit test without a stated benchmark is not interpretable, and testing against uniform should be justified rather than defaulted to.
Every result carries a ReliCheck Intelligence card with one action: explain this result in plain language. It runs entirely on your Mac with Apple Intelligence. No upload, no API key, nothing to configure. The model only explains the result Quanta has already computed and validated. It never computes a statistic, and it never applies a decision on your behalf.
From the action bar you can add the result to a report, copy the table, or copy the APA text. Exported reports carry the APA table, its note, and a caution specific to that analysis beneath it.
Quanta's engine is pure Swift on Apple's Accelerate framework, with no R or Python at runtime. Every engine is checked against an independent reference rather than internal consistency alone, and the automated suite exceeds 500 checks. Full record on the validation page.
Categorical is part of every Quanta subscription, $9.99 a month or $79.99 a year after the 30-day trial. One price for everyone. See pricing.
The analysis, the report builder, and the on-device explanations all work with the network off. Your dataset is never uploaded.
Chi-square test of independence for two categorical variables · Fisher exact test when expected counts are small · McNemar for paired categorical data · the complete list on the analyses page.