Top Rated Bangalore Call Girls Ramamurthy Nagar ⟟ 9332606886 ⟟ Call Me For G...
Chi square
1. Chi Square test
By
Dr Utpal Sharma
Assistant Professor
Department of Community Medicine
SMIMS, Gangtok, Sikkim
2. What is what….???
Parametric statistics
These significance tests based on assumption
of a normal distribution in a population.
Eg ‘z’ test, ‘t’ test and ‘F’ test
Non parametric statistics
Also called “Distribution free statistics”
The population studied need not fulfill the
criteria of normal distribution
3. Why non parametric statistics…??
Simple to derive
Ease of application (ranking, counting,
adding..etc)
Rapid in nature
Susceptibility to violation of assumption is less,
even if this happens easy to detect
Ordinal or Nominal data required whereas
parametric statistics requires interval or ratio
Being quick and easy, gives efficient results only
when the sample size is small
4. Cont….
In large sample non-parametric statistics are less
efficient and laborious
Statistical efficiency where the assumptions of
parametric tests are not met these non-parametric
tests gives superior results
Disadvantage of non parametric statistics
Not useful in large samples
Lower statistical efficiency
5. Types of non parametric statistics
Nominal data and independent sample
Chi-square test
Binomial test
Fisher exact test
Nominal data and matched samples
Mc Nemar Chi-square test
Ordinal data and independent sample
Mann-Whitney ‘U’ test
Median test
Kruskal-Wallis test
Kolmogrov Smirnov test
Ordinal data and matched sample
Sign test
Wilcoxan model
6. Chi square test
Most commonly used non-parametric statistics
Used when data is represented in frequencies
or proportions
Useful in discrete data
Any continuous data can be converted to
categorical data and the statistics can be used
7. Calculation of Chi-square value
Make a contingency table
Note the frequencies observed in the cells (o).
Calculate the expected value in each cell on assumption
of “null hypothesis”
Find the difference between observed frequencies and
the expected frequencies in each cell
Calculate the total chi-square values using formulae
Find out the degree of freedom
Look for the p value in the table for the calculated chi-
square value
8. Example
In a hospital 300 cases of typhoid fever were
admitted in any point of time, 150 cases were
given ciprofloxacin and rest 150 were given
chloramphenicol. Find whether the difference is
significant.
Table : Complete cure after 10 days of treatment
Drug Cured Not cured Total
Ciprofloxacin 143 7 150
Chloromphenicol 137 13 150
Total 280 20 300
9. cont…
Start calculation with “null hypothesis” that there is
no difference between the cure rate of two drugs
So the cure rate of both the drugs were same is the
expected frequencies (E).
Since the cure rate of both the drugs will be same…
…..percentage of cure rate will be the expected
frequencies (280/300=0.93)
Similarly for the not cured the expected frequencies
will be 20/300=0.07
10. Cont….
Now to calculate the expected values when the null
hypothesis is true i.e cure rate of both the drugs were same
For cured
Ciprofloxacin 150×0.93=139.5
Chloramphenicol 150×0.93=139.5
For not cured
Ciprofloxacin 150×0.07=10.5
Chloramphenicol 150×0.07=10.5
So, the contingency table of expected values
Expected values
Cured Not cured
Ciprofloxacin 139.5 10.5
Chloramphenicol 139.5 10.5
11. Cont….
Now we calculate the chi-square value by using the
formula
So, we have
X2
= 0.08+ 0.0448+1.167+0.595
X2
=1.895
The p value for the calculated chi square is more than 0.1 at a
confidence limit of 95% it is not significant.
12. Alternate formulae for calculating
Chi square value
We can also use the formulae
Where,
N= a+b+c+d