Chi-Square Test of Independence: Complete Guide

Introduction to Chi-Square Test

Chi-square test is a non-parametric test. The assumption of normal distribution in the population is not required for this test. The statistical technique chi-square can be used to find the association (dependencies) between sets of two or more categorical variables by comparing how close the observed frequencies are to the expected frequencies. In other words, a chi-square ($\chi^2$) statistic is used to investigate whether the distributions of categorical variables differ. Note that the responses of categorical variables should be independent of each other. We use the chi-square test to find a relationship between two nominal scaled variables.

Test Assumptions

  • The data should be categorical.
  • The observations should be independent.
  • The expected frequency in each cell should be at least 5. If this assumption is violated, one might need to combine categories or use a different test.

Use and Application of Chi-Square Test

The chi-square test of independence is used as a test of goodness of fit and as a test of independence. In a test of goodness of fit, we check whether or not the observed frequency distribution is different from the theoretical distribution. In contrast, in a test of independence, we assess, whether paired observations on two variables are independent from each other (from the contingency table).

Example of Chi-Square Test

A social scientist sampled 140 people and classified them according to income level and whether or not they played a state lottery in the last month. The sample information is reported below. Is it reasonable to conclude that playing the lottery is related to income level? Use the 0.05 significance level.

 Income
LowMiddleHighTotal
Played46282195
Did not play14121945
Total604040140

A step-by-step procedure for testing the hypothesis about the association between these two variables is described, below.

Step1:
$H_0$: There is no relationship between income and whether the person played the lottery.
$H_1$: There is a relationship between income and whether the person played the lottery.

Step2: Level of Significance 0.05

Step 3: Test statistics (calculations)

Observed Frequencies ($f_o$)Expected Frequencies ($f_e$)$\frac{(f_o – f_e)^2}{f_e}$
4695*60/140= 40.71$\frac{(46-40.71)^2}{40.71}$
2895*40/140= 27.14$\frac{(28-27.14)^2}{27.14}$
2195*40/140= 27.14$\frac{(21-27.14)^2}{27.14}$
1445*60/140= 19.29$\frac{(14-19.29)^2}{19.29}$
1245*40/140= 12.86$\frac{(12-12.6)^2}{12.86}$
1945*40/140= 12.86$\frac{(19-12.86)^2}{12.86}$
$ \chi^2=\sum[\frac{(f_0-f_e)^2}{f_e}]=$6.544

Step 4: Critical Region:
Tabular Chi-Square value at 0.05 level of significance and $(r-1) \times (c-1)=(2-1)\times(3-1)=2$ is 5.991.

Step 5: Decision
As the calculated Chi-Square value is greater than the tabular Chi-Square value, we reject $H_0$, which means that there is a relationship between income level and playing the lottery.

Note that there are several types of chi-square tests (such as Yates, Likelihood ratio, test in time series) available which depend on the way data was collected and also the hypothesis being tested.

Chi-Square Test

Perform online MCQs Test about General Knowledge

Learn more about Non-Parametric Tests

Mean: Measure of Central Tendency

Introduction to Mean: Measure of Central Tendency

The Measure of Central Tendency, Mean (known as average or arithmetic mean) is used to describe the data set as a single number (value). The measure of central tendency represents the middle (center) of the data, that is the average measure (performance or behaviour, etc) of data. This measure of central tendency is also known as a measure of central location or measure of center.

Mathematically, the mean can be defined as the sum of all values in a given dataset divided by the number of observations in that data. The mean is also called arithmetic mean or simply average.

Example of Mean

Example: Consider the following data set consisting of the marks of 15 students in a certain examination.

50, 55, 65, 43, 78, 20, 100, 5, 90, 23, 40, 56, 70, 88, 30

The mean of the above data values is computed by adding all these values (50 + 55 + 65 + 43 + 78 + 20 + 100 + 5 + 90 + 23 + 40 + 56 + 70 + 88 + 30 = 813) and then dividing by the number of observations added (15) which equals 54.2 marks, that is

$\frac{50 + 55 + 65 + 43 + 78 + 20 + 100 + 5 + 90 + 23 + 40 + 56 + 70 + 88 + 30 }{15}=\frac{813}{15}=54.2 $

Statistical Representation of Population Mean

The above procedure of calculating the mean can be represented mathematically

$\mu= \frac{\sum_{i=1}^n X_i}{N} $

The Greek symbol $\mu$ (pronounced “mu”) represents the population mean in statistics and $N$ is the number of observations in the population data set.

The above formula is known as the population means as it is computed for the whole population.

Statistical Representation of Sample Mean

The sample mean can also be calculated in the same manner as the population mean is calculated. Only the difference is in the representation of the formula, that is,

$\overline{X}= \frac{\sum_{i=1}^n X_i}{n} $.

The $\overline{X} $ represents the sample mean and $n$ shows a number of observations in the sample.

Points to Remember When Calculating Mean

The mean is used for numeric data only. In Statistics, calculating the mean, the data type should be Quantitative (measured on either a ratio or interval scale). Therefore, the numbers in the data set can be continuous and/ or discrete.

Note that mean should not be computed for alphabetic or categorical data (should not belong to nominal or ordinal scale). The mean is influenced by extreme values (very very large or small value) in data that change the mean drastically.

Mean: Measure of Central Tendency

For other measures of central tendencies visit: Measures of Central Tendencies

Frequently Asked Questions about Measure of Central Tendency

  1. What is meant by the measure of central tendency?
  2. Name a few measures of central tendency.
  3. What is the purpose of measure of central tendency?
  4. What are the important points when someone computes measures of central tendencies?
  5. What does the sample average mean?
  6. How a sample mean is represented statistically?