Chi-Square Test
Turn category counts into a research argument. Compare what you observed with what a clear hypothesis predicts, then interpret the discrepancy with care.
What you will learn
- Choose between goodness of fit and a test of independence.
- Build observed and expected frequency tables.
- Calculate Pearson’s chi-square statistic and degrees of freedom.
- Interpret p values alongside effect size and percentages.
- Check independence of observations and expected cell counts.
- Run and read the analysis in SPSS, with an Excel cross-check.
- Write an accurate account of the findings.
Understand: Sections 1–3 connect the question, counts, and hypotheses.
Calculate: Sections 4–8 develop two examples and their interpretation.
Apply: Sections 9–13 provide software steps, the lectures, exercises, and reference material.
Allow about 90–120 minutes, including both videos and practice. Use a separate session to repeat the software exercise.
Begin with category counts
A chi-square test for categorical data compares observed frequencies with frequencies expected under a null hypothesis. It helps researchers assess whether a distribution or an association departs from that hypothesised pattern.
Suppose each student selects one preferred format for a daily news summary: text, audio, or video. These answers produce counts. A frequency table records how many students selected each category. The question may concern the overall distribution of preferences or whether that distribution varies between groups.
The observed frequency, written O, is the count recorded in a category or cell. The expected frequency, written E, is the count predicted by the null model for that category or cell. Both refer to the same counting unit. The expected count can be fractional because it is a model-based expectation.
Question: Is year group associated with preferred news format?
Variables: Year group, with first-year and final-year categories; preferred format, with text, audio, and video categories.
Unit: One student, recorded once, choosing one preferred format. The table contains the number of students in each joint category.
Recognise a categorical question
Similar questions arise when researchers compare article frames across newspapers, preferred platforms across age groups, or subscription status across audience segments. The categories and counting unit must match the question. A table of articles counts articles; a table of readers counts readers.
For an ordinal variable, such as low, medium, and high engagement, Pearson’s test can examine a general association while treating the levels as categories. A research question specifically about an ordered trend may call for a procedure that uses that order.
Understand the role of “nonparametric”
Categorical chi-square tests are commonly taught as nonparametric procedures. They work with counts and do not require a normally distributed numerical outcome. Their reference probabilities still rely on a statistical model and conditions such as independent observations and sufficiently large expected counts.
Choose the test
The two main applications in this chapter share the same discrepancy formula. They differ in the research question, the construction of expected counts, and the degrees of freedom.
Begin with the variables and the sampling design.
Compare its observed counts with a specified set of category probabilities.
Example: Do format preferences follow a proposed 40% text, 40% audio, 20% video distribution?
Ei = Npi
Compare the joint counts with the pattern expected when the variables are independent.
Example: Is year group associated with preferred format?
Eij = (row total × column total) / N
Goodness of fit: specify the reference distribution
The null hypothesis supplies probabilities that add to 1. Equal proportions are one possible model. Unequal proportions can come from a theory, a policy target, or a well-defined reference distribution. Explain why that reference answers the research question and identify any uncertainty in its source.
Independence: examine a joint distribution
In one sample, record two categorical variables for each unit and place their joint counts in a contingency table. Under independence, the population distribution of one variable is the same across categories of the other. The sample’s row and column totals supply the estimated expected counts.
Homogeneity: compare independently sampled groups
A chi-square test of homogeneity asks whether a categorical distribution is the same across independently sampled populations or groups. It uses the same Pearson contingency-table calculation, with the interpretation tied to the sampling design. For example, separate samples from two campuses could be compared on format preference.
State the hypotheses
A statistical test begins with a precisely stated null hypothesis, a suitable sampling model, and a planned decision rule. These choices give the calculation its meaning.
Goodness of fit
H0: Population format probabilities are .40 for text, .40 for audio, and .20 for video.
H1: At least one population probability differs from that specified distribution.
Independence
H0: Year group and preferred news format are independent in the population represented by the sampling model.
H1: The variables are associated.
Set the significance level
The significance level, α, is a chosen threshold for the testing rule. With a valid test and its assumptions satisfied, it controls the long-run rate of rejecting a true null hypothesis at the stated level, or no more than that level for some discrete tests. This is the Type I error rate. A Type II error occurs when the test fails to reject a false null hypothesis.
We use α = .05 for the teaching examples. Choose and justify the level before examining the result. Study planning should also consider the smallest association of interest, sample size, and statistical power.
Read the p value as a conditional probability
For Pearson’s chi-square test, the p value is the probability, assuming the null hypothesis and the other model assumptions, of obtaining a chi-square statistic at least as large as the one observed. Larger values of the statistic represent greater discrepancy, so the relevant probability lies in the distribution’s right tail.
When p ≤ α, the planned rule rejects H0. When p > α, it fails to reject H0. Report the actual p value where feasible and interpret it alongside the table, effect size, design, and uncertainty. The American Statistical Association’s statement explains why a threshold alone cannot carry a scientific conclusion.
Work through goodness of fit
A goodness-of-fit test compares the observed distribution of one categorical variable with probabilities specified under H0. Multiplying each hypothesised probability by the sample size gives its expected frequency.
In Dataset A, 100 independently sampled students each choose one preferred news format. For this exercise, a proposed distribution specifies 40% text, 40% audio, and 20% video. Treat these probabilities as fixed in advance.
For text, E = 100 × .40 = 40. Audio also has E = 40; video has E = 20. Expected counts total 100, matching the observed total.
On a small screen, swipe the table horizontally.
| Format | O | p under H0 | E = Np | (O − E)² / E |
|---|---|---|---|---|
| Text | 50 | .40 | 40 | 100 / 40 = 2.50 |
| Audio | 30 | .40 | 40 | 100 / 40 = 2.50 |
| Video | 20 | .20 | 20 | 0 / 20 = 0.00 |
| Total | 100 | 1.00 | 100 | χ² = 5.00 |
Bar lengths use a common scale from 0 to 50 students. Exact counts appear beside every bar.
Calculate the statistic and degrees of freedom
Pearson’s statistic adds the squared discrepancy divided by the expected count over all categories:
Here, χ² = 2.50 + 2.50 + 0 = 5.00. With k = 3 categories and all probabilities fixed in advance, df = k − 1 = 2. The corresponding right-tail probability is p = .0821, rounded to .082 in a report.
Explain the decision
Because .082 exceeds .05, we fail to reject the specified distribution at α = .05. The sample shows more text preferences and fewer audio preferences than expected. The test supplies insufficient evidence to reject the proposed population distribution under this model and decision rule.
The NIST goodness-of-fit guide develops this comparison and explains adjustments when a distribution’s parameters are estimated from the data. The simple k − 1 rule applies here because the probabilities were specified independently of these observations.
Build an independence table
A contingency table records how observations fall into the joint categories of two variables. Under the null hypothesis of independence, expected counts preserve the observed row and column totals while distributing cases according to their marginal proportions.
In the separate Dataset B, 120 students each choose one preferred format. The table compares 60 first-year students with 60 final-year students. For the exercise, assume independent observations and a sampling model suitable for the intended inference.
On a small screen, swipe the table horizontally.
| Year group | Text | Audio | Video | Row total |
|---|---|---|---|---|
| First-year | 30 | 20 | 10 | 60 |
| Final-year | 15 | 25 | 20 | 60 |
| Column total | 45 | 45 | 30 | N = 120 |
Find the expected count in one cell
Across the sample, 45 of 120 students prefer text. Under independence, the expected proportion preferring text is therefore 45/120 in each year group. Among 60 first-year students, that gives 60 × 45/120 = 22.5.
First-year students
Text preferences in the full sample
First-year students preferring text under H0
On a small screen, swipe the table horizontally.
| Year group | Text | Audio | Video | Row total |
|---|---|---|---|---|
| First-year | 22.5 | 22.5 | 15.0 | 60 |
| Final-year | 22.5 | 22.5 | 15.0 | 60 |
| Column total | 45 | 45 | 30 | 120 |
Check the structure before proceeding
This is a 2 × 3 table: two substantive rows and three substantive columns. The totals organise the calculation and are excluded from the number of tested cells. There are six cell contributions to the statistic.
The expected rows match here because both year groups contain 60 students. With unequal row totals, their expected counts would differ. Independence means the same expected format proportions across groups, while the group sizes determine the expected numbers.
Calculate and make the decision
Pearson’s chi-square statistic combines the discrepancy in every substantive cell. Squaring prevents positive and negative differences from cancelling; dividing by E measures the difference relative to the expected count.
For first-year text preference, the contribution is (30 − 22.5)² / 22.5 = 56.25 / 22.5 = 2.50. Repeat the operation for each of the other five cells.
On a small screen, swipe the table horizontally.
| Year group | Text | Audio | Video | Row sum |
|---|---|---|---|---|
| First-year | 2.5000 | 0.2778 | 1.6667 | 4.4444 |
| Final-year | 2.5000 | 0.2778 | 1.6667 | 4.4444 |
| Total | 5.0000 | 0.5556 | 3.3333 | χ² = 8.8889 |
Displayed values are rounded. Calculate from full precision and round the final result: χ² = 8.89.
Calculate the degrees of freedom
For an r × c contingency table, df = (r − 1)(c − 1). Here, df = (2 − 1)(3 − 1) = 2. The NIST contingency-table guide explains the expected-count formula and this reference distribution.
The margins constrain the table. Once the margins are fixed, choosing two cells in the first row determines the third cell and the entire second row. Thus, two cell values can vary freely in this example.
Use the p value or the equivalent critical value
With χ² = 8.8889 and df = 2, the approximate right-tail probability is p = .01174. At α = .05, the decision rule rejects independence. Report p = .012 after rounding.
The equivalent critical-value approach compares 8.8889 with the .05 right-tail critical value for df = 2, which is about 5.991. Because the statistic exceeds that threshold, the decision is the same.
Under the assumed sampling model, Dataset B provides evidence of an association between year group and preferred news format. The next task is to describe the pattern and its size, then examine the conditions that support this inference.
Check the conditions
A reliable analysis begins with a defensible counting process and a sampling model suited to the research design. Expected cell counts then help assess whether the usual chi-square approximation is adequate.
Use independent observational units
In Dataset B, each student contributes once to one cell. Responses from one student should not determine or duplicate another student’s response. Repeated answers from the same person, students clustered within selected classrooms, or many posts from the same account can introduce dependence that an ordinary Pearson test does not accommodate.
Identify the sampling unit and the unit counted in the table. If articles are clustered within a small set of outlets or readers within a small set of institutions, consider a design-aware analysis. A large number of records can still contain substantial dependence.
Use clear, mutually exclusive categories
Every analysed unit should fall into exactly one category of each table variable. In a “select all formats used” question, one person may select several options. Treating those selections as independent people would misrepresent the data. Define a suitable outcome, such as one preferred format, or choose a method designed for multiple responses.
Keep missing responses distinct from substantive answers. Explain exclusions and report the number of valid cases. If a category is theoretically possible but has zero observations, retain its role in the intended model where appropriate. An entire empty row or column and a structurally impossible cell require special attention.
Inspect expected counts
A conservative starting point for introductory work is to seek expected counts of at least 5 in every cell. A commonly used guideline for larger contingency tables permits up to 20% of cells below 5, provided none is below 1. Penn State’s categorical-data notes describe this approximation guideline. Treat it as a diagnostic rule rather than a universal guarantee.
Dataset B’s minimum expected count is 15, and none of its six cells is below 5. Dataset A’s expected counts are 40, 40, and 20. Both examples comfortably meet the conservative introductory check.
Respond appropriately to a sparse table
For a sparse 2 × 2 table, Fisher’s exact test is often suitable under its sampling framework. Larger sparse tables may need an appropriate exact or Monte Carlo procedure. Combine categories only when the research meaning supports doing so; explain and disclose that decision.
Match inference to sampling
A probability sample and a clear target population support a different reach of inference from a convenience sample. Describe recruitment, coverage, and possible selection bias. For complex surveys, use procedures that account for weights, strata, and clusters, such as an appropriate design-adjusted association test.
Explain the pattern and size
An informative interpretation combines the overall test with the distribution of responses and a measure of association. The p value addresses compatibility with independence; percentages and effect size help explain what the pattern looks like.
Choose percentages that answer the question
To compare format preferences within each year group, use row percentages because the groups occupy rows. First-year preferences are 50.0% text, 33.3% audio, and 16.7% video. Final-year preferences are 25.0%, 41.7%, and 33.3%, respectively.
These percentages show the pattern: text is selected more frequently within the first-year group, while audio and video account for larger shares within the final-year group. Column percentages answer another question: how each format’s audience divides between year groups. State the denominator so readers can follow the comparison.
Calculate Cramér’s V
Cramér’s V is a chi-square-based measure of association for contingency tables. For an r × c table, it uses the smaller of r − 1 and c − 1:
For Dataset B, V = √[8.8889 / (120 × 1)] = .272. V ranges from 0 to 1 and summarises association without giving it a positive or negative direction. Compare the value with relevant research and the practical decision at stake. Explain any benchmark you use rather than attaching an automatic label.
In a 2 × 2 table, the magnitude of phi corresponds to Cramér’s V. Measures such as a risk difference or odds ratio may also be useful when the design and question support them. Report uncertainty for effect estimates where an appropriate method is available.
Explore which cells contribute
A raw residual is O − E. A Pearson residual divides that difference by √E; its square is the cell’s contribution to χ². Adjusted standardised residuals use a further variance adjustment for the table’s margins. SPSS can display both kinds, as explained in IBM’s cell-display guidance.
Residuals can guide exploration after an overall test. For Dataset B, text cells contribute more to χ² than audio cells. Any formal claims about particular cells or pairs require a suitable follow-up procedure and attention to multiple testing.
Run the test in SPSS
For the two-variable example, SPSS Crosstabs produces the contingency table, Pearson’s chi-square test, and measures of association. Begin by confirming whether your file contains individual cases or aggregated frequency rows.
Prepare the data
An individual-level file has 120 rows, with one student per row and separate variables for year group and format. An aggregated file can store the same information in six rows, using a third variable for the frequency in each combination.
On a small screen, swipe the table horizontally.
| year_group | news_format | freq |
|---|---|---|
| 1 | 1 | 30 |
| 1 | 2 | 20 |
| 1 | 3 | 10 |
| 2 | 1 | 15 |
| 2 | 2 | 25 |
| 2 | 3 | 20 |
Code year_group as 1 = first-year and 2 = final-year. Code news_format as 1 = text, 2 = audio, and 3 = video. For this aggregated file, choose Data → Weight Cases → Weight cases by and select freq. The six rows then represent 120 observations.
Use Crosstabs for the association test
- Choose Analyze → Descriptive Statistics → Crosstabs.
- Place year_group in Row(s) and news_format in Column(s).
- Under Statistics, select Chi-square and Phi and Cramer’s V.
- Under Cells, select Observed, Expected, and Row percentages. Request adjusted standardised residuals if they serve your follow-up plan.
- Use Paste to preserve the syntax or OK to run the procedure.
The IBM Crosstabs documentation describes this procedure. Menu wording and the availability of exact or Monte Carlo options depend on the installed version and modules.
Open the reproducible SPSS syntax for Dataset B
Run this in a new practice dataset or session. The data-entry block defines the six-row teaching file.
DATA LIST FREE /year_group news_format freq.
BEGIN DATA
1 1 30
1 2 20
1 3 10
2 1 15
2 2 25
2 3 20
END DATA.
VALUE LABELS year_group
1 'First-year' 2 'Final-year'.
VALUE LABELS news_format
1 'Text' 2 'Audio' 3 'Video'.
WEIGHT BY freq.
CROSSTABS
/TABLES=year_group BY news_format
/STATISTICS=CHISQ PHI
/CELLS=COUNT EXPECTED ROW ASRESID.
WEIGHT OFF.The final command turns weighting off after the table has been produced. Retain the syntax and output with your analysis notes. The numerical targets below are independently calculated teaching values.
Read the relevant output
- Case Processing Summary: Confirm 120 valid cases and examine exclusions.
- Crosstabulation: Check observed counts, expected counts, and row percentages against the worked example.
- Chi-Square Tests: Read the Pearson Chi-Square row: approximately 8.889, df = 2, asymptotic significance p = .012.
- Expected-count footnote: Expect zero cells below 5 and a minimum expected count of 15.00.
- Symmetric Measures: Read Cramér’s V, approximately .272.
Use the one-sample procedure for goodness of fit
For Dataset A, the legacy path is Analyze → Nonparametric Tests → Legacy Dialogs → Chi-Square. Select the single format variable and specify expected values proportional to 40, 40, and 20 in the correct category order. Confirm that the expected counts in the output are 40, 40, and 20. IBM’s one-sample documentation explains this procedure.
Cross-check in Excel
Excel can reproduce the frequency calculations and obtain a chi-square probability. Arrange observed and expected ranges in matching shapes, and keep totals outside the tested ranges.
Set up the independence example
Enter Dataset B’s observed counts in B3:D4: the first row contains 30, 20, 10; the second contains 15, 25, 20. Put expected counts in B9:D10, with 22.5, 22.5, 15 in each row.
In B14 enter =(B3-B9)^2/B9. Fill across to D14, then down through D15. These six cells contain the contributions to χ².
| Task | Formula | Expected result |
|---|---|---|
| Sum the contributions | =SUM(B14:D15) | 8.8888889 |
| Obtain p from the two ranges | =CHISQ.TEST(B3:D4,B9:D10) | 0.0117436 |
| Obtain p from χ² and df | =CHISQ.DIST.RT(SUM(B14:D15),2) | 0.0117436 |
| Find the .05 critical value | =CHISQ.INV.RT(0.05,2) | 5.9914645 |
Microsoft documents CHISQ.TEST, CHISQ.DIST.RT, and CHISQ.INV.RT. The first two formulas for p should agree when the expected counts and degrees of freedom match.
Repeat the goodness-of-fit calculation
Put Dataset A’s observed counts 50, 30, 20 in B20:B22 and its expected counts 40, 40, 20 in C20:C22. The formula =CHISQ.TEST(B20:B22,C20:C22) gives approximately .082085. The single-column arrangement gives df = 3 − 1 = 2 for this fixed-probability example.
Report the result
A useful report identifies the hypothesis, the analysed cases, the test and its conditions, the numerical result, and the substantive pattern. Readers should be able to connect the statement to the accompanying table.
Report the association example
A Pearson chi-square test indicated an association between year group and preferred news format, χ²(2, N = 120) = 8.89, p = .012, Cramér’s V = .272. All expected cell counts were at least 15. Text was preferred by 50.0% of first-year students and 25.0% of final-year students; audio and video accounted for larger shares of preferences within the final-year group. The result describes an association in the study’s sampling framework.
A complete study would also describe recruitment, the target population, missing cases, coding decisions, and how independence was supported. A table of counts and row percentages makes the reported pattern easier to assess.
Report the goodness-of-fit example
A chi-square goodness-of-fit test compared format preferences with a prespecified distribution of 40% text, 40% audio, and 20% video. The result, χ²(2, N = 100) = 5.00, p = .082, provided insufficient evidence to reject that distribution at α = .05. Observed preferences were 50%, 30%, and 20%, respectively.
Name any alternative analysis
If you use Fisher’s exact test, a continuity-corrected statistic, an exact or Monte Carlo p value, or a survey-adjusted test, identify it accurately. State the relevant settings and explain any category merging. Preserve the syntax and output so the analysis can be reconstructed.
Make a final audit
- Do the observed counts add to the reported valid N?
- Were expected counts derived from the stated null hypothesis?
- Does df match the model and table structure?
- Have you reported the actual p value, test name, and relevant assumption checks?
- Do percentages use a clear denominator?
- For association, have you included a suitable effect size and interpreted it in context?
- Does the conclusion respect the design and target population?
Watch and practise
Use the main lecture to connect observed counts, expected counts, and the chi-square statistic. Then use the secondary SPSS tutorial to practise the software workflow with the chapter’s data.
Main lecture · Chi-Square Simplified
Dr. USP · 27:03 · Open the main lecture on YouTube. The links below give approximate starting points based on the supplied transcript.
How to Do Chi Square Test in SPSS
Follow Dr. USP’s 9:13 tutorial after working through the example. Pause to set the variables, select table statistics, and examine the output.
Start at 02:16 for the Crosstabs demonstration. Use Section 9 to distinguish the two-variable association test from a one-sample goodness-of-fit procedure.
A researcher compares the distribution of 200 articles across four prespecified frame categories with an equal-proportions model. A second study cross-tabulates four newspapers by three frame categories. Name the test and df for each, assuming the usual conditions and no estimated goodness-of-fit parameters.
Activity 1 · Suggested response
The first is a goodness-of-fit test with df = 4 − 1 = 3. Each expected count is 200 × .25 = 50. The second is a contingency-table association test with df = (4 − 1)(3 − 1) = 6. Its expected counts come from the row and column totals.
For article data, also consider whether articles share authors, events, or outlet-level conditions that introduce dependence.
In a contingency table, one row totals 80, one column totals 45, and the grand total is 200. Calculate the expected count at their intersection. If O = 24, find its contribution to Pearson’s χ².
Activity 2 · Suggested response
E = (80 × 45) / 200 = 18. The contribution is (24 − 18)² / 18 = 36 / 18 = 2. This is one cell’s contribution; the overall statistic requires all substantive cells.
Dataset A has 50%, 30%, and 20% observed preferences against a 40%, 40%, and 20% model. What happens to χ² if every observed and expected count is multiplied by 10 while the proportions remain unchanged?
Activity 3 · Suggested response
The counts become 500, 300, 200 against 400, 400, 200. Contributions become 25, 25, and 0, so χ² rises from 5 to 50 with the same df = 2. The p value becomes much smaller.
The proportional departure stays the same. The example shows why a statistical decision needs interpretation alongside magnitude, sample size, and research importance.
Revise this claim about Dataset B: “p = .012 means there is a 1.2% chance that the variables are independent, and year group causes format preference.”
Activity 4 · Suggested response
“Under the null model of independence and the test’s other assumptions, the approximate probability of a chi-square statistic at least as large as 8.89 is .012. The result provides evidence of association. Row percentages describe the pattern, and Cramér’s V = .272 summarises its size. A causal conclusion would require an appropriate design and further evidence.”
Your practice task · Reproduce, check, and explain
Enter Dataset B in SPSS as six aggregated rows with frequency weighting, or as 120 individual cases. Obtain the table, expected counts, row percentages, Pearson test, and Cramér’s V. Check your output against Sections 5, 6, and 9.
Write a 100–150-word report that states the question, numerical result, assumption check, descriptive pattern, and reach of the conclusion. Then write one sentence explaining how the analysis would change if each student answered the format question twice.
Optional extension: Revisit the lecture’s monthly-call example. Equal monthly counts and a constant daily call rate imply different expectations when months have different lengths. Explain the model you would choose and examine whether calls over time can reasonably be treated as independent events.
Glossary and resources
Use these terms and links to check an analysis from its counting unit to its final claim. The sources provide statistical explanations and official software documentation.
- Observed count, O
- The frequency recorded in a category or cell.
- Expected count, E
- The model-based frequency under H0.
- Contingency table
- A table of joint category counts for two or more variables.
- Goodness of fit
- A comparison of observed counts with a specified distribution.
- Independence
- A condition in which one variable’s population distribution is unchanged across categories of the other.
- Degrees of freedom
- The number of freely varying components under the model’s constraints.
- Significance level, α
- The chosen threshold used in the testing decision rule.
- p value
- The probability, under the null model and other assumptions, of a test statistic at least as extreme as observed.
- Residual
- A cell’s observed-minus-expected difference, sometimes standardised.
- Cramér’s V
- A measure summarising the magnitude of association in a contingency table.
Lectures and primary resources
- Dr. USP. (2020, November 20). Chi-square simplified: Understanding statistical relationships [Video]. YouTube. Main lecture.
- Dr. USP. (2021, November 12). How to do chi square test in SPSS [Video]. YouTube. Secondary SPSS tutorial.
- NIST/SEMATECH. e-Handbook of statistical methods: Chi-square goodness-of-fit test. Read the guide.Expected counts, discrepancy statistic, reference distribution, and fitted-parameter adjustments.
- NIST/SEMATECH. How can we compare the results of classifying according to several categories? Read the contingency-table guide.Expected cell frequencies and degrees of freedom for independence.
- Penn State Department of Statistics. STAT 504: Two-way tables—Independence and association. Study the lesson · Ordinal data and small samples.Conditions for approximation, interpretation, and exact-test alternatives.
- Wasserstein, R. L., & Lazar, N. A. (2016). The ASA’s statement on p-values: Context, process, and purpose. The American Statistician, 70(2), 129–133. https://doi.org/10.1080/00031305.2016.1154108Principles for interpreting p values and scientific conclusions.
- IBM. SPSS Statistics documentation: Crosstabs. Procedure and menu path · Statistics syntax.Contingency tables, Pearson chi-square, and measures of association.
- IBM. SPSS Statistics documentation: Crosstabs cell display. Counts, percentages, and residuals.Options used to examine the pattern behind an overall result.
- IBM. SPSS Statistics documentation: Chi-square test. One-sample goodness-of-fit procedure · Expected values.
- Microsoft. Excel statistical functions. CHISQ.TEST · CHISQ.DIST.RT · CHISQ.INV.RT.
- SciPy. Contingency-table association measures. Association and Cramér’s V documentation.
Build the interpretation around the design
Before testing another table, write down what each cell counts, how cases entered the study, and which null model generates E. Revisit Hypothesis Testing to strengthen the decision logic, or Sampling Methods to examine how far a sample’s result can travel.
