In your education thesis at a university in Poland, you want to see whether parents who received a reminder about a school consultation were more likely to report attending. You have yes or no answers to two questions. Here's how to run a chi-square test from four counts and report the result, and when to consider Fisher's exact test for a small sample.
First check what each row of your data represents. For a standard 2×2 test of independence, each person should contribute one pair of answers and fall into one cell. Observations should be independent across people. Then check the expected counts.
Start with four counts
The fictional example includes 80 parents, one from each of 80 schools. We assume that observations are independent across people. Each parent reported whether they received a reminder and whether they attended the consultation. No one appears twice and there are no missing answers in this example. The null hypothesis is that receiving a reminder and reported attendance are independent.
- Parents who received a reminder. 24 reported attending and 16 reported not attending. Total: 40.
- Parents who did not receive a reminder. 12 reported attending and 28 reported not attending. Total: 40.
- Attendance totals. 36 reported attending and 44 reported not attending. Total: 80.
If a response to either variable is missing from your data, avoid coding it automatically as ‘no’. Record the number of complete pairs and explain how you handled missing data. If you analyse only complete responses, report how many people the analysis includes.
If you are still planning the analysis and have more than two variables, see also Statistical analysis in a master’s thesis: choosing tests and reporting results.
Calculate the expected counts and choose a test
An expected count is the number of people you would expect in a given cell under independence, given the row and column totals. Multiply the row total by the column total, then divide by the total number of observations.
For parents who received a reminder and reported attending: 40 × 36 / 80 = 18. For parents who received a reminder and did not attend: 40 × 44 / 80 = 22. The second row also gives 18 and 22 because both groups contain 40 people. The four expected counts are 18, 22, 18 and 22.
For a simple 2×2 table, checking that all expected counts are at least 5 is a conservative rule of thumb for the standard Pearson approximation. Check the expected counts rather than the smallest observed count. The minimum here is 18. With independent observations and small expected counts, consider Fisher's exact test. Choose the test based on your design and counts before looking at competing p-values.
Calculate Pearson's statistic and the strength of association
For each cell, square the difference between the observed and expected counts, then divide by the expected count. Add the four terms. Here that gives 36/18 + 36/22 + 36/18 + 36/22, so χ² = 7.27 after rounding. A 2×2 table gives (2 – 1) × (2 – 1) = 1 degree of freedom. For Pearson's test without a continuity correction, p ≈ 0.007. R applies the continuity correction by default to a 2×2 table. To reproduce this example in chisq.test, set correct = FALSE.
For a 2×2 table, standard Cramér's V is the square root of the uncorrected Pearson statistic divided by the number of observations. Here V = √(7.2727 / 80) ≈ 0.30. V does not show direction. The within-group percentages are 24/40 = 60% and 12/40 = 30%, a difference of 30 percentage points in this sample.
Example paragraph for Results
Attendance at the consultation was reported by 24 of the 40 parents who received a reminder (60%) and 12 of the 40 parents who did not (30%). Pearson's chi-square test without a continuity correction indicated an association between receiving a reminder and reported attendance, χ²(1, N = 80) = 7.27, p = 0.007, Cramér's V = 0.30.
In the discussion, consider how people were recruited and what the variables measured. Reminders were not randomly assigned. Schools that sent them might also have offered consultation slots at different times. The result describes an association with reported attendance. The study design does not establish that reminders caused the difference.
See what changes with small counts
In a second, independent fictional example, four parents in the reminder group report attending and two report not attending. In the no-reminder group, none report attending and six report not attending. In total, N = 12. The expected counts are 2, 4, 2 and 4. The two-sided Fisher exact test gives p ≈ 0.061. Report the name of the test and the counts. At a prespecified threshold of 0.05, this result gives insufficient grounds to reject the null hypothesis. You can still show the proportions in this small sample.
Fisher's exact test calculates the p-value conditional on the row and column totals, without a chi-square approximation. If observations are dependent, for example when parents come from a few of the same classes or schools, switching to Fisher's test does not address that dependence. For a clustered sample, retain class or school identifiers and use an analysis that accounts for the sampling design. If you compare responses from the same people before and after, you need a paired analysis, such as McNemar's test for two categories.
Check your report before submitting
- Does each person fall into one cell, and does the design support the assumption of independent observations?
- Did you use counts for the test and make the denominator clear for every percentage?
- Did the design and expected counts guide your choice between Pearson's and Fisher's tests, regardless of the result?
- Have you reported the precise test variant, the counts, the p-value and the size and direction of the observed difference?
Questions about tests and survey analysis
When should I use the chi-square test and when Fisher's exact test?
Example: is participation in training associated with choosing a specific answer? I will prepare a cross-tabulation with frequencies and percentages, check expected frequencies, and verify the independence of observations. If the chi-square approximation is inappropriate, I will consider an exact method, such as Fisher's test. I will supplement the p-value with an appropriate measure of association strength, such as Cramer's V.
Is a p-value < 0.05 sufficient to confirm a hypothesis?
No. With a pre-set significance level of 0.05, a p-value < 0.05 allows rejecting the null hypothesis within the adopted model and its assumptions. It does not mean that the research hypothesis is true with 95% probability.
Describe the direction and size of the effect, the confidence interval, the sample size, and the limitations of measurement and participant selection. Also consider multiple testing. A significant result alone does not prove causality or the practical importance of the difference.
Can I order just the analysis and presentation of survey results?
Yes. The scope may include organising data, tables, charts, frequency and percentage summaries, commentary, overall summaries and hypothesis testing if the research design includes it. I link the analysis to the aim and research questions.
Send the collected responses, the questionnaire, the aim and research questions and the supervisor's requirements for the analysis.
References
- R Core Team. Pearson's Chi-squared Test for Count Data. Documentation for the stats package, chisq.test function. https://stat.ethz.ch/R-manual/R-devel/library/stats/html/chisq.test.html
- R Core Team. Fisher's Exact Test for Count Data. Documentation for the stats package, fisher.test function. https://stat.ethz.ch/R-manual/R-devel/library/stats/html/fisher.test.html
- Bergsma, W. (2013). A bias-correction for Cramér's V and Tschuprow's T. Journal of the Korean Statistical Society, 42(3), 323-328. DOI: 10.1016/j.jkss.2012.10.002
- Rao, J. N. K., & Scott, A. J. (1981). The Analysis of Categorical Data from Complex Sample Surveys: Chi-Squared Tests for Goodness of Fit and Independence in Two-Way Tables. Journal of the American Statistical Association, 76(374), 221-230. DOI: 10.1080/01621459.1981.10477633
Discuss the analysis for your education thesis
Start with the research question, the sampling method, the variable definitions and the aggregate counts. Tell us whether you want to check the choice of test and calculations or would also like help writing the results and discussion.



