Real-world examples of chi-square test for independence
Textbook definitions are fine, but the chi-square test for independence only really clicks when you see it in action. The best examples of chi-square test for independence examples all share the same pattern:
- Two categorical variables (like smoker vs. non-smoker and disease vs. no disease)
- A contingency table of counts (not percentages)
- A question about whether the variables are associated or independent
Let’s walk through several real examples that mirror the kinds of data you’d see in research, public reports, or workplace analytics.
Health and medicine: example of chi-square test for independence in smoking and lung disease
Public health is packed with examples of chi-square test for independence examples. One classic setup is the relationship between smoking status and lung disease.
Imagine a hospital collects data from 400 adults:
| Lung Disease | No Lung Disease | Total | |
|---|---|---|---|
| Smoker | 70 | 130 | 200 |
| Non-smoker | 30 | 170 | 200 |
| Total | 100 | 300 | 400 |
The research question: Is lung disease status independent of smoking status?
The chi-square test for independence compares the observed counts (the numbers in the table) to what we’d expect if smoking and disease were unrelated. If the difference between observed and expected counts is large enough, the test statistic and resulting p-value tell us that the pattern is unlikely to be due to random variation.
In this example, the proportion with lung disease among smokers (70/200 = 35%) is much higher than among non-smokers (30/200 = 15%). A chi-square test here would almost certainly produce a small p-value, pointing to a statistically significant association.
If you want to see this kind of analysis in real health data, the CDC often publishes cross-tabulated tables on risk factors and health outcomes in surveys like NHANES and BRFSS (cdc.gov). Those datasets are full of real examples of chi-square test for independence examples used in surveillance and research.
Vaccination and infection: chi-square test in public health surveillance
Another health-related example of chi-square test for independence involves vaccination status and infection status during a disease outbreak.
Suppose a local health department tracks 600 individuals during a flu season:
| Got Flu | Did Not Get Flu | Total | |
|---|---|---|---|
| Vaccinated | 40 | 260 | 300 |
| Not Vaccinated | 120 | 180 | 300 |
| Total | 160 | 440 | 600 |
Question: Is getting the flu independent of vaccination status?
Here, 13.3% of vaccinated people got the flu (40/300), compared with 40% of those not vaccinated (120/300). A chi-square test for independence checks whether this difference is statistically meaningful.
Public health agencies like the NIH and CDC regularly use similar contingency tables to evaluate vaccine effectiveness and coverage patterns (nih.gov). These are real examples of chi-square test for independence examples driving policy decisions, like where to target vaccination campaigns.
Marketing and customer behavior: examples include product type and satisfaction
Move out of the hospital and into the boardroom, and you’ll find business analysts using the same test. A classic business example of chi-square test for independence compares product category with customer satisfaction level.
Imagine an e-commerce company surveys 500 customers:
| Product Type | Unsatisfied | Neutral | Satisfied | Total |
|---|---|---|---|---|
| Electronics | 50 | 60 | 140 | 250 |
| Clothing | 20 | 50 | 180 | 250 |
| Total | 70 | 110 | 320 | 500 |
The question: Is satisfaction level independent of product type?
If the electronics category has a higher rate of unsatisfied customers than clothing, and the chi-square test produces a small p-value, the company has evidence that product type and satisfaction are associated. That can justify deeper quality checks, returns analysis, or targeted improvements for electronics.
This is one of the best examples of chi-square test for independence examples for managers and analysts because it turns raw survey data into actionable strategy.
Education: examples of chi-square test for independence examples in teaching methods and pass rates
Education research is another rich source of real examples. Suppose a school district wants to know whether a new teaching method is related to exam pass/fail outcomes.
Data from 300 students:
| Teaching Method | Passed | Failed | Total |
|---|---|---|---|
| Traditional | 110 | 40 | 150 |
| New Method | 130 | 20 | 150 |
| Total | 240 | 60 | 300 |
Question: Is exam outcome independent of teaching method?
If the new method shows a higher pass rate (130/150 vs. 110/150), the chi-square test for independence can quantify whether that difference is statistically significant. Education researchers at universities like Harvard often use similar chi-square setups when analyzing categorical outcomes such as pass/fail, retention vs. dropout, or participation vs. non-participation (harvard.edu).
This is a clean example of chi-square test for independence where the result can guide decisions about whether to scale a new instructional approach.
Politics and polling: voter preference by age group
Pollsters love categorical data. One of the best examples of chi-square test for independence examples in political science is testing whether voting preference is related to age group.
Imagine a national poll of 1,000 likely voters:
| Age Group | Candidate A | Candidate B | Undecided | Total |
|---|---|---|---|---|
| 18–34 | 160 | 120 | 70 | 350 |
| 35–54 | 130 | 190 | 30 | 350 |
| 55+ | 140 | 140 | 20 | 300 |
| Total | 430 | 450 | 120 | 1000 |
Question: Is candidate preference independent of age group?
A chi-square test here checks whether the pattern of support differs across age brackets in a way that’s unlikely to be random. If the test shows a significant association, campaign strategists know that age and candidate preference are linked, which can influence where they focus outreach.
Polling organizations regularly publish cross-tab tables like this. These tables are textbook-ready examples of chi-square test for independence examples in large-scale survey research.
Workplace analytics: remote work and turnover intention
In the post-2020 workplace, remote and hybrid work have become a major research topic. Here’s an example of chi-square test for independence involving work arrangement and intention to leave.
Suppose a company surveys 600 employees:
| Work Arrangement | Intend to Leave | Plan to Stay | Total |
|---|---|---|---|
| On-site | 90 | 210 | 300 |
| Hybrid | 40 | 160 | 200 |
| Fully Remote | 10 | 90 | 100 |
| Total | 140 | 460 | 600 |
Question: Is turnover intention independent of work arrangement?
If on-site workers show a higher intention to leave than hybrid or remote workers, a chi-square test can flag a statistically significant association. This is one of the more modern real examples of chi-square test for independence examples, reflecting 2024–2025 trends in flexible work and retention.
HR analytics teams use this kind of test to support decisions on remote work policies, office redesigns, and retention initiatives.
Sports analytics: position and injury type
Sports data also generates excellent examples. Consider a professional basketball league tracking whether player position is related to injury type.
Data from one season:
| Position | Lower Body Injury | Upper Body Injury | No Injury | Total |
|---|---|---|---|---|
| Guard | 40 | 15 | 145 | 200 |
| Forward | 50 | 25 | 125 | 200 |
| Center | 30 | 10 | 60 | 100 |
| Total | 120 | 50 | 330 | 500 |
Question: Is injury type independent of player position?
If forwards have a higher rate of lower body injuries, and the chi-square test confirms a significant association, training staff might adjust conditioning programs by position. Sports scientists and medical teams often use chi-square tests in exactly this way to connect categorical risk factors to outcomes.
How to recognize good examples of chi-square test for independence examples
At this point, we’ve walked through several examples of chi-square test for independence examples across health, business, education, politics, workplace analytics, and sports. They all share a set of characteristics that make them suitable for this test:
- Two variables, both categorical. Examples include smoker vs. non-smoker, product type, age group, work arrangement, or satisfaction level.
- Data in counts, not percentages. The chi-square test for independence uses frequencies in each cell of a contingency table.
- Reasonable expected counts. A standard rule of thumb is that most expected cell counts should be at least 5. When that fails, analysts often switch to Fisher’s exact test.
- Independent observations. Each person, customer, voter, or player should appear only once in the table.
If your scenario fits that pattern, there’s a good chance you’re looking at a valid example of chi-square test for independence.
For more technical guidance on when and how to use this test, many university statistics departments provide open course notes and examples. One widely used reference style is similar to materials you’ll find from U.S. universities such as those linked through .edu domains.
Interpreting results in real examples
In all the best examples of chi-square test for independence examples, there are two layers of interpretation:
Statistical conclusion
- If the p-value is small (often below 0.05), you reject the null hypothesis that the variables are independent.
- You then say there is evidence of an association between the variables.
Substantive conclusion
- In the smoking and lung disease example, a significant result supports the idea that smoking status and disease status are related in the sample.
- In the product satisfaction example, a significant result suggests that satisfaction depends on product type.
But a statistically significant association does not automatically mean the relationship is large or practically important. That’s why analysts often report an effect size measure such as Cramér’s V along with the chi-square statistic, especially in large datasets.
Common mistakes when creating your own examples
When people try to construct their own examples of chi-square test for independence examples, a few mistakes show up over and over:
- Using continuous data without categorizing. Income, height, or temperature need to be grouped into categories (like income brackets) before using this test.
- Mixing percentages and counts in the same table. The test needs raw counts.
- Violating independence. For example, including repeated measurements from the same person as if they were separate individuals.
- Tiny sample sizes. With very small tables, chi-square approximations can be unreliable.
If you’re working with health or medical data, sites like Mayo Clinic and WebMD often present risk factor vs. outcome tables in a way that looks very similar to chi-square setups (mayoclinic.org, webmd.com). Those are good templates when you’re trying to design your own realistic examples.
FAQ: examples of chi-square test for independence examples
Q1. What is a simple real-world example of chi-square test for independence?
A straightforward example of chi-square test for independence is checking whether smoking status (smoker vs. non-smoker) is related to lung disease (disease vs. no disease) in a group of patients. You put the counts into a 2×2 table and test whether disease status is independent of smoking.
Q2. What kinds of variables work best in examples of chi-square test for independence examples?
The test is designed for categorical variables. Examples include gender, age group, product category, political party, satisfaction level, or work arrangement. As long as both variables are categorical and you have counts for each combination, you can usually set up the test.
Q3. Can I use the chi-square test for independence with Likert-scale survey data (e.g., strongly agree to strongly disagree)?
Yes. Many real examples of chi-square test for independence examples use Likert-scale responses as one variable and something like treatment group, demographic group, or product type as the other. Even though the scale is ordered, it’s treated as categorical for the purposes of this test.
Q4. How large does my sample need to be for a valid chi-square test for independence?
There’s no single magic number, but standard guidelines suggest that most expected counts in the table should be at least 5. If several expected counts are below 5, especially in small tables, Fisher’s exact test is often preferred.
Q5. Where can I find more real examples of chi-square test for independence examples in published research?
You’ll see them frequently in public health reports from the CDC, medical research summaries from the NIH, and educational studies from major universities. Any time you see a cross-tabulation of two categorical variables with a p-value reported, there’s a good chance a chi-square test for independence was used.
Related Topics
The best examples of chi-square test examples in healthcare studies
Real-world examples of chi-square test for independence
The best examples of chi-square test examples for contingency tables
The best examples of chi-square test examples in genetics
Chi-Square Test Examples in Market Research: An In-Depth Analysis
Explore More Chi-Square Test Examples
Discover more examples and insights in this category.
View All Chi-Square Test Examples