Chi – square
Dr. Anshul Singh Thapa
An Introduction
Chi – square performs two types of functions:
Goodness of fit:
A common use is to assess whether a measured/observed set of measures follows an expected pattern. The expected frequency may be determined from prior knowledge (such as previous year’s exam results) or by calculation of an average from the given data.
Chi – square test for goodness of fit, level of single nominal variable.
Measure of Independence:
The chi-square test can be used in the reverse manner to goodness of fit. If the two sets of measure are compared, then we can determine whether it align or do not align.
Chi – Square test for independence is used when there are two nominal variables, each with several category
Steps to determine Chi – square
Expected Frequencies:
expected frequency for chi-square can be find in three ways:
Goodness of fit test
Calculate the expected frequencies. In general the expected frequency for any call can be calculated from the following equation:
E = RT X CT/ N
E = Expected Frequency
RT = The row total for the row containing the cell
CT = The column total for the column containing the cell
N = The total number of observation
Measure of independence
Steps of Hypothesis Testing
Data of Mental Health Disorder due to stress of the Youth of US region (1000)
CATEGORIES | Condition | O |
Anxiety disorder | 134 | |
Alcohol and drug abuse | 160 | |
Mood disorder | 97 | |
Schizophrenia | 12 | |
None of these condition | 597 | |
| |
(X2) = Σ [(O – E)2 /E].
Data of Mental Health Disorder due to stress of the Youth of US region (1000)
CATEGORIES | Condition | O | E |
Anxiety disorder | 134 | 146 | |
Alcohol and drug abuse | 160 | 164 | |
Mood disorder | 97 | 83 | |
Schizophrenia | 12 | 15 | |
None of these condition | 597 | 592 | |
| | |
(X2) = Σ [(O – E)2 /E].
Data of Mental Health Disorder due to stress of the Youth of US region (1000)
CATEGORIES | Condition | O | E | (O - E) |
Anxiety disorder | 134 | 146 | -12 | |
Alcohol and drug abuse | 160 | 164 | -4 | |
Mood disorder | 97 | 83 | 14 | |
Schizophrenia | 12 | 15 | -3 | |
None of these condition | 597 | 592 | 5 | |
| | | |
(X2) = Σ [(O – E)2 /E].
Data of Mental Health Disorder due to stress of the Youth of US region (1000)
CATEGORIES | Condition | O | E | (O - E) | (O - E)2 |
Anxiety disorder | 134 | 146 | -12 | 144 | |
Alcohol and drug abuse | 160 | 164 | -4 | 16 | |
Mood disorder | 97 | 83 | 14 | 196 | |
Schizophrenia | 12 | 15 | -3 | 9 | |
None of these condition | 597 | 592 | 5 | 25 | |
| | | | |
(X2) = Σ [(O – E)2 /E].
Data of Mental Health Disorder due to stress of the Youth of US region (1000)
CATEGORIES | Condition | O | E | (O - E) | (O - E)2 | (O - E)2 / E |
Anxiety disorder | 134 | 146 | -12 | 144 | .99 | |
Alcohol and drug abuse | 160 | 164 | -4 | 16 | .10 | |
Mood disorder | 97 | 83 | 14 | 196 | 2.36 | |
Schizophrenia | 12 | 15 | -3 | 9 | .60 | |
None of these condition | 597 | 592 | 5 | 25 | .40 | |
| | | | | |
(X2) = Σ [(O – E)2 /E].
Data of Mental Health Disorder due to stress of the Youth of US region (1000)
CATEGORIES | Condition | O | E | (O - E) | (O - E)2 | (O - E)2 / E |
Anxiety disorder | 134 | 146 | -12 | 144 | .99 | |
Alcohol and drug abuse | 160 | 164 | -4 | 16 | .10 | |
Mood disorder | 97 | 83 | 14 | 196 | 2.36 | |
Schizophrenia | 12 | 15 | -3 | 9 | .60 | |
None of these condition | 597 | 592 | 5 | 25 | .40 | |
| | | | | = 4.09 |
(X2) = Σ [(O – E)2 /E].
Steps of Hypothesis Testing
Calculate the expected frequencies. In general the expected frequency for any call can be calculated from the following equation:
E = RT X CT/ N
E = Expected Frequency
RT = The row total for the row containing the cell
CT = The column total for the column containing the cell
N = The total number of observation
Measure of independence
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 |
No Covishield | 220 | 2216 | 2436 |
Total | 240 | 3008 | 3248 |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | | |
No Covishield | | | |
Total | | | |
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 |
No Covishield | 220 | 2216 | 2436 |
Total | 240 | 3008 | 3248 |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | | 812 |
No Covishield | | | |
Total | | | |
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 |
No Covishield | 220 | 2216 | 2436 |
Total | 240 | 3008 | 3248 |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | 752 | 812 |
No Covishield | | | |
Total | | | |
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 |
No Covishield | 220 | 2216 | 2436 |
Total | 240 | 3008 | 3248 |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | 752 | 812 |
No Covishield | | | |
Total | 240 | | |
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 |
No Covishield | 220 | 2216 | 2436 |
Total | 240 | 3008 | 3248 |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | 752 | 812 |
No Covishield | 180 | | |
Total | 240 | | |
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 |
No Covishield | 220 | 2216 | 2436 |
Total | 240 | 3008 | 3248 |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | 752 | 812 |
No Covishield | 180 | | 2436 |
Total | 240 | | |
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 |
No Covishield | 220 | 2216 | 2436 |
Total | 240 | 3008 | 3248 |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | 752 | 812 |
No Covishield | 180 | | 2436 |
Total | 240 | 3008 | |
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 |
No Covishield | 220 | 2216 | 2436 |
Total | 240 | 3008 | 3248 |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | 752 | 812 |
No Covishield | 180 | 2256 | 2436 |
Total | 240 | 3008 | |
In a COVID-19 vaccination campaign in a certain area, Covishield was administered to 812 persons out of a total population of 3,248. the number of fever cases is shown below:
Treatment | Fever | No fever | Total |
Covishield | 20 | 792 | 812 (25 %) |
No Covishield | 220 | 2216 | 2436 (75 %) |
Total | 240 | 3008 | 3248 (100 %) |
let us take the hypothesis that Covishield is not effective in checking COVID-19
Applying Chi – Square:
Treatment | Fever | No fever | Total |
Covishield | 60 | 752 | 812 |
No Covishield | 180 | 2256 | 2436 |
Total | 240 | 3008 | 3248 |
| O | E |
Fever and Covishield | 20 | 60 |
Fever and No Covishield | 220 | 180 |
No Fever and Covishield | 792 | 752 |
No Fever and No Covishield | 2216 | 2256 |
| O | E | (O – E)2 |
Fever and Covishield | 20 | 60 | 1600 |
Fever and No Covishield | 220 | 180 | 1600 |
No Fever and Covishield | 792 | 752 | 1600 |
No Fever and No Covishield | 2216 | 2256 | 1600 |
| O | E | (O – E)2 | (O – E)2 / E |
Fever and Covishield | 20 | 60 | 1600 | 26.667 |
Fever and No Covishield | 220 | 180 | 1600 | 8.889 |
No Fever and Covishield | 792 | 752 | 1600 | 2.128 |
No Fever and No Covishield | 2216 | 2256 | 1600 | 0.709 |
| O | E | (O – E)2 | (O – E)2 / E |
Fever and Covishield | 20 | 60 | 1600 | 26.667 |
Fever and No Covishield | 220 | 180 | 1600 | 8.889 |
No Fever and Covishield | 792 | 752 | 1600 | 2.128 |
No Fever and No Covishield | 2216 | 2256 | 1600 | 0.709 |
| | Σ [(O – E)2 /E] = 38.393 | ||
�Degree of freedom (v) = (r – 1) (c – 1) = (2 – 1) (2 – 1) = 1�v = 1�level of significance = 0.05 �the table valve of Chi – Square = 3.84�The calculated value of Chi – Square is greater than the table value. The hypothesis is rejected. Hence Covishield is useful in checking COVID-19�
| O | E | (O – E)2 | (O – E)2 / E |
Fever and Covishield | 20 | 60 | 1600 | 26.667 |
Fever and No Covishield | 220 | 180 | 1600 | 8.889 |
No Fever and Covishield | 792 | 752 | 1600 | 2.128 |
No Fever and No Covishield | 2216 | 2256 | 1600 | 0.709 |
| | Σ [(O – E)2 /E] = 38.393 | ||