MethodsArticlesCompareAbout
MethodsArticlesCompareAbout
MethodsContingency Tables
Data-DrivenPlanning & AnalysisQuantitative ResearchIntermediate

Contingency Tables

Analyze relationships between categorical variables using cross-tabulation to reveal statistically significant user patterns.

Contingency Tables organize categorical data into a matrix to reveal statistically significant relationships between user segments and behaviors.

Share
Duration60 minutes or more.
MaterialsCollected data, Excel or another tool for working with data.
People1 researcher.
InvolvementNo User Involvement

Contingency Tables, also known as cross-tabulation or crosstabs, are statistical tools that organize data into a matrix format to reveal relationships between two or more categorical variables. Researchers place one variable along the rows and another along the columns, with each cell showing the frequency count or percentage of observations that fall into that particular combination of categories. UX researchers, data analysts, and product teams use contingency tables to analyze survey responses, compare user segments, evaluate A/B test results, and identify statistically significant patterns in behavioral data. The method is particularly valuable when you need to answer questions like whether mobile users behave differently than desktop users, whether enterprise customers prefer different features than small business customers, or whether satisfaction levels vary across demographic groups. By applying chi-square tests or Fisher's exact tests, researchers can determine whether observed patterns are statistically significant or merely due to chance. Contingency tables bridge the gap between qualitative insights and quantitative evidence, providing the statistical confidence needed to support data-driven product and design decisions. They are especially powerful when combined with qualitative research methods that explain the reasons behind the patterns the numbers reveal.

WHEN TO USE
  • When you need to test whether two categorical variables such as user type and behavior are statistically related
  • When analyzing survey data to compare responses across different user segments or demographic groups
  • When evaluating A/B test results across multiple user segments to understand differential effects
  • When building quantitative evidence to support or challenge qualitative research findings about user patterns
  • When you need to present statistical relationships between variables in a clear tabular format for stakeholders
WHEN NOT TO USE
  • ×When analyzing continuous numerical variables that require correlation or regression analysis instead of cross-tabulation
  • ×When your sample size is too small to meet the minimum expected frequency requirements for chi-square testing
  • ×When you need to understand causal relationships rather than just statistical associations between variables
  • ×When your data has only one categorical variable and you need simple frequency distribution analysis instead
HOW TO RUN

Step-by-Step Process

01

Identify Variables

Determine the two categorical variables you want to examine for a possible relationship. These variables should have two or more categories, ideally having a logical connection that can impact each other.

02

Create a Hypothesis

Formulate a null hypothesis stating that there is no relationship between the two variables, and an alternative hypothesis stating that there is a relationship between the two variables.

03

Collect Data

Gather data regarding the two selected variables from the relevant participants, ensuring to have a representative sample of the population.

04

Prepare Contingency Table

Create a table with rows representing one categorical variable and columns representing the other categorical variable. Assign cell values based on the number of instances where the categories from each variable intersect.

05

Calculate Row and Column Totals

Add up the cell values for each row and column and place these sums at the end of each row and column within the table.

06

Calculate Expected Frequencies

For each cell in the contingency table, calculate the expected frequency by multiplying the row total and column total corresponding to that cell, and then divide it by the overall total. Place the calculated values in the contingency table, adjacent to the corresponding observed values.

07

Compute the Test Statistic

Calculate the chi-square (X²) test statistic using the formula: X² = Σ((observed frequency - expected frequency)² / expected frequency), where 'Σ' denotes the sum of all the calculated values for each cell in the table.

08

Determine the Degrees of Freedom

Calculate the degrees of freedom using the formula: df = (number of rows - 1) x (number of columns - 1).

09

Find the Critical Value

Consult a chi-square distribution table to locate the critical value that corresponds to your chosen level of significance (e.g., 0.05) and the calculated degrees of freedom.

10

Interpret the Results

Compare the calculated chi-square statistic to the critical value. If the statistic is greater than or equal to the critical value, you can reject the null hypothesis, meaning there is a significant relationship between the two variables. If the statistic is less than the critical value, you cannot reject the null hypothesis, meaning there is no significant relationship between the two variables.

EXPECTED OUTCOME

What to Expect

After conducting contingency table analysis, your team will have clear statistical evidence about relationships between categorical variables in your user data. You will know whether observed differences between user segments are statistically significant or merely due to random variation. The analysis will produce cross-tabulation matrices with frequency counts and percentages, chi-square test results with p-values, and effect size measures that quantify the strength of associations. Teams typically use these findings to validate or refine user personas, support segmentation strategies, identify differential user needs across groups, and provide quantitative backing for design decisions. The results translate directly into actionable recommendations for product targeting, feature prioritization, and experience personalization.

PRO TIPS

Expert Advice

Present results as contingency graphs or mosaic plots for better visualization and stakeholder communication.

Remember that substantive significance may differ from statistical significance -- always check with statistical tests.

Multidimensional contingency tables with three or more variables are possible but significantly more complex to evaluate.

Ensure sample sizes are sufficient -- chi-square tests require expected cell frequencies of at least 5 per cell.

Examine both absolute numbers and percentages to understand the practical significance of observed patterns.

Consider using Cramer's V or phi coefficient alongside chi-square to measure the strength of association.

Cross-tabulate user segments with behavior patterns to identify targeting and personalization opportunities.

Combine contingency analysis with qualitative methods to understand the reasons behind observed statistical patterns.

COMMON MISTAKES

Pitfalls to Avoid

Confusing correlation with causation

A statistically significant relationship between variables does not mean one causes the other. Always consider confounding variables and use contingency tables to identify associations, not prove causation.

Ignoring expected frequency requirements

Chi-square tests are unreliable when expected cell frequencies fall below 5. Check this assumption before interpreting results, and use Fisher's exact test for small samples instead.

Overlooking practical significance

A statistically significant result with a tiny effect size may not matter practically. Always report effect size measures like Cramer's V alongside p-values to assess real-world importance.

Testing too many variables

Running multiple contingency tests without correction inflates the chance of false positives. Apply Bonferroni correction or similar adjustments when testing multiple hypotheses simultaneously.

Poor variable categorization

Poorly defined or overlapping categories produce meaningless results. Ensure categories are mutually exclusive, collectively exhaustive, and meaningful for the research questions being investigated.

DELIVERABLES

What You'll Produce

Contingency Table Matrix

Frequency distribution table showing relationships between categorical variables.

Interpretation Report

Report outlining key findings, significance levels, and design implications.

Data Visualization

Bar charts, mosaic plots, or heatmaps illustrating the cross-tabulation results.

Data Collection Summary

Documentation of data sources, methods, and contextual details for interpretation.

Statistical Analysis Report

Report with chi-square or Fisher's exact test statistics and p-values.

Recommendations List

Prioritized actionable recommendations based on contingency table insights.

Feedback Loop Plan

Plan for sharing findings with stakeholders and measuring implemented changes.

FAQ

Frequently Asked Questions

METHOD DETAILS
Goal
Planning & Analysis
Sub-category
Web Analytics
Tags
contingency tablescross-tabulationchi-square testquantitative analysisstatistical analysiscategorical datauser segmentationsurvey analysisdata-driven researchA/B testingrespondent comparison
Related Topics
Statistical AnalysisSurvey ResearchUser SegmentationA/B TestingQuantitative UX ResearchData-Driven Design
HISTORY

Contingency tables have a long history in statistical analysis, dating back to Karl Pearson's development of the chi-square test of independence in 1900. Pearson created the test as a way to determine whether observed frequencies in categorical data differ significantly from expected frequencies, establishing one of the foundational methods of inferential statistics. The cross-tabulation format itself predates Pearson, having been used in various forms for demographic and social research throughout the 19th century. Ronald Fisher later contributed Fisher's exact test in the 1930s as an alternative for small samples. In the context of UX and market research, contingency tables became widely adopted as survey research grew in the mid-20th century. Today they remain one of the most commonly used statistical techniques in social science, market research, and UX analytics, valued for their simplicity, interpretability, and ability to reveal meaningful patterns in categorical data without requiring advanced statistical expertise.

SUITABLE FOR
  • Providing detailed description and exploration of quantitative survey data
  • Comparing behavioral or attitudinal differences between user segments
  • Testing hypotheses about relationships between categorical variables
  • Identifying patterns in user demographics correlated with behaviors
  • Supporting data-driven personas with quantitative segment analysis
  • Validating qualitative research findings with statistical evidence
  • Analyzing A/B test results across different user groups
  • Informing marketing and product decisions with segmentation insights
RESOURCES
  • Contingency Table in PythonA Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
RELATED METHODS
  • Analysis of Cognitive Work
  • Benchmarking
  • Business Model Canvas

93 methods. Step-by-step guides. No signup required.

ExploreAll MethodsArticlesCompare
PopularUser TestingCard SortingA/B TestingDesign Sprint
ResourcesAboutArticles & GuidesQuiz

2026 UXAtlas. 100% free. No signup required.

93 methods. Step-by-step guides. No signup required.

ExploreAll MethodsArticlesCompare
PopularUser TestingCard SortingA/B TestingDesign Sprint

2026 UXAtlas. 100% free. No signup required.