# Analysis of Contingency Tables

• /
• Blog
• /
• Analysis of Contingency Tables

A contingency table is a tool used to summarize and analyze the relationship between two categorical variables. It is a type of cross-tabulation that displays the frequencies or counts of the combinations of categories for the two variables.

To create a contingency table, the following steps are typically followed:

1. Identify the two categorical variables to be analyzed.
2. Collect and summarize the data. Count the number of observations in each combination of categories for the two variables.
3. Organize the data in a table with the categories of the first variable listed along the rows and the categories of the second variable listed along the columns.
4. Enter the counts or frequencies in the cells of the table.

An example of a contingency table is shown below, which displays the relationship between gender (male or female) and political party (Democrat or Republican):

DemocratRepublicanTotal
Male203050
Female304070
Total5070120

In this example, the contingency table shows that there are 50 males in the sample, with 20 identifying as Democrats and 30 identifying as Republicans. There are 70 females in the sample, with 30 identifying as Democrats and 40 identifying as Republicans.

Contingency tables can be used to perform a Chi-square test to determine whether there is a significant association between the two variables. To do this, the following steps are typically followed:

1. Calculate the expected frequencies for each combination of categories using the formula: $$\LARGE{E_{ij} = \frac{R_iC_j}{n}}$$ Where: • $$E_{ij}$$ is the expected frequency for the combination of categories i and j • $$R_i$$ is the row total for category i • $$C_j$$ is the column total for category j • $$n$$ is the total sample size
2. Calculate the Chi-square statistic using the formula: $$\LARGE{\chi^2 = \sum_{i=1}^{n}\sum_{j=1}^{m}\frac{(O_{ij} - E_{ij})^2}{E_{ij}}}$$ Where: • $$O_{ij}$$ is the observed frequency for the combination of categories i and j • $$E_{ij}$$ is the expected frequency for the combination of categories i and j • $$n$$ is the number of rows • $$m$$ is the number of columns
3. Determine the critical value of the Chi-square statistic based on the significance level (alpha) of the test and the degrees of freedom. The degrees of freedom are calculated as (n - 1) x (m - 1).
4. Compare the calculated Chi-square statistic to the critical value to determine whether to reject or fail to reject the null hypothesis. If the calculated Chi-square statistic exceeds the critical value, the null hypothesis is rejected, and the alternative hypothesis is accepted.

In conclusion, contingency tables are useful for summarizing and analyzing the relationship between two categorical variables. They can be used to perform a Chi-square test, which can help determine whether there is a significant association between the two variables.

In addition to analyzing the relationship between two categorical variables, contingency tables can also be used to analyze the relationship between a categorical variable and a continuous variable. In this case, the continuous variable is typically grouped into intervals or categories, and a contingency table is created to summarize the frequencies or counts for each combination of categories.

Overall, contingency tables are a useful tool for analyzing the relationship between two categorical variables and can provide valuable insights into the patterns and trends in the data.

Posted on December 22, 2022 by  Quality Gurus

## SALE! 4 Most Popular Courses

 (adsbygoogle = window.adsbygoogle || []).push({}); 

###### Quality Gurus

Customers served! 1

Quality Management Course

FREE! Subscribe to get 52 weekly lessons. Every week you get an email that explains a quality concept, provides you with the study resources, test quizzes, tips and special discounts on our other e-learning courses.

 (adsbygoogle = window.adsbygoogle || []).push({}); 

Similar Posts:

December 21, 2022

## One Sample t Test

One Sample t Test

January 20, 2022

## Not Following the Procedure – Root Cause Analysis

Not Following the Procedure – Root Cause Analysis

December 26, 2022

## Poisson Distribution

Poisson Distribution

November 3, 2021

## Examples of Six Sigma Projects

Examples of Six Sigma Projects

April 7, 2018

## Factors and Considerations in Selecting a Six Sigma Project

Factors and Considerations in Selecting a Six Sigma Project

January 11, 2022

## How to Manage Process Variation?

How to Manage Process Variation?

March 29, 2018

## Benefits of Six Sigma and Lean

Benefits of Six Sigma and Lean

May 11, 2019

## Defects per million opportunities (DPMO)

Defects per million opportunities (DPMO)

December 26, 2021

## Seven Quality Tools – Control Charts

Seven Quality Tools – Control Charts

32 Courses on SALE!