Chi-square test in an education thesis - a worked 2×2 example

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.

Published: Updated: About 7 minutes to read
A sheet with four boxes of navy and orange dots next to a pencil and notebook
A four-cell layout for comparing counts.

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.

Statistical analysis for bachelor’s and master’s thesesThesis research section: methodology, results and discussion
Tell us about your survey data

Related articles

Statistical analysis for a psychology master’s thesis - what to do with collected data

From collected data to clear results: scale scoring, missing values, two worked analyses and effect reporting for a psychology master’s thesis. You have collected responses for your psychology master’s thesis, but the spreadsheet still does not look like a results chapter? The next step is to check what the columns mean, calculate scores using the instrument’s instructions and connect each analysis to a specific question. Only then can the numbers become an answer you can explain clearly in your thesis. Perhaps you have a form export, a statistical software file and a message from your supervisor asking you to prepare the results. Do not start by running one test after another. First reconstruct the route from a person’s responses to the score you intend to analyse. This guide covers the stage after data collection: checking the material, working through two different analyses and writing the chapter, rather than designing another questionnaire. My name is Wioletta Boćkowska and I have run StudentSupport since 2018. In the subject area , I help connect questions, instruments, calculations and writing. If you already have data, you can request within an agreed scope, from preparing the dataset to calculations and reporting. I agree that scope after reviewing the material, before work begins. Keep an unchanged source export and work on a copy. Separate the responses, variable dictionary and decision record. In the dictionary, explain each column, its allowed values, unit and missing-value code. A code of 9 might be a valid response to one question and a missing-value marker in another. The software cannot recognise that distinction for you. Check the unit of observation. If one person completed the questionnaire twice, two rows do not mean two independent participants. You need a way to match the measurements and an analysis that accounts for that structure. Responses from people in the same class or team may also require attention to their shared context. Column names alone cannot establish independence. Your Polish university’s requirements and agreements with your supervisor still matter. The UKW Faculty of Psychology’s 2025 guide distinguishes the method, analysis of results and discussion. This...

Read article

How to analyse interviews for a thesis: from transcription to analysis

Working with interviews for a thesis involves preparing a transcript, analysing what participants say and reporting findings linked to the research questions. A transcript is material for analysis. A results chapter takes shape when you explain what the accounts show and what supports your interpretation. You have several recordings,... Working with interviews for a thesis involves preparing a transcript, analysing what participants say and reporting findings linked to the research questions. A transcript is material for analysis. A results chapter takes shape when you explain what the accounts show and what supports your interpretation. Do you have several recordings, dozens of pages of text and no idea where to start? You do not need to buy specialist software straight away. First, decide how you will work with the material. The example below shows how to move from an extract to a code and a cautious conclusion, without turning the interviews into a collection of random quotations. In your thesis, identify both how you conducted the interviews and the method you used to analyse them. Thematic analysis, narrative analysis, qualitative content analysis and grounded theory methodology are not interchangeable terms for the same activity. In this guide, we show how to organise work with codes and themes using a simple example. This is not a complete protocol for every qualitative method. If you are analysing how people construct narratives of their own lives, dividing their accounts into themes may not be enough. When you adopt a particular method, apply its assumptions consistently and describe your own analytical decisions. In the study by Mandes and Karlińska (2024), qualitative coding involved reading documents, interpreting extracts and checking their meaning across the whole dataset. The authors also show how this work differs from automated topic modelling. This is a useful distinction: a list of frequently occurring words is not, in itself, an interpretation of interviews. Give participants stable identifiers, such as R01 and R02. Separate their responses from the interviewer's questions. Add paragraph numbers or timestamps so that you can later locate an extract in the recording. Keep the source version separate from your...

Read article