際際滷

際際滷Share a Scribd company logo
The Chi Square Test
Muhammad Shahid
Sr. lecturer IIN
Introduction
 We often have occasions to make
comparisons between two characteristics
of something to see if they are linked or
related to each other.
 One way to do this is to work out what we
would expect to find if there was no
relationship between them (the usual null
hypothesis) and what we actually observe.
Introduction
 The test we use to measure the
differences between what is observed
and what is expected according to an
assumed hypothesis is called the chi-
square test.
For Example
 Some null hypotheses may be:
 there is no relationship between the height
of the post RN and Generic BSN students .
 there is no connection between the size of
farm and the type of farm
Important
 The chi square test can only be used on
data that has the following
characteristics:
The data must be in the form
of frequencies
The frequency data must have a
precise numerical value and must be
organised into categories or groups.
The total number of observations must be
greater than 20.
The expected frequency in any one cell
of the table must be greater than 5.
Formula
 2 =  (O  E)2
E
2 = The value of chi square
O = The observed value
E = The expected value
 (O  E)2 = all the values of (O  E) squared then added
together
 Write down the NULL HYPOTHESIS
and ALTERNATIVE HYPOTHESIS
and set the LEVEL OF
SIGNIFICANCE.
 NH  there is no association between gender and
hypertensive status
 AH there is association between gender and
hypertensive status
 We will set the level of significance at 0.05.
Step 01
Construct a table with the information you have observed
or obtained.
Observed Frequencies (O)
HTN
Status
Males Females
N 50 50
PH 20 40
H 10 30
 The number of degrees of freedom to use is: the
number of rows in the table minus 1, multiplied by the
number of columns minus 1. This is (2-1) x (3-1) = 1 x 2 =
2 degrees of freedom.
Critical value X2=5.991
 Look up the significance tables. These will
tell you whether to accept the null
hypothesis or reject it.
Step 02 & 03 significance level
 Step 04 calculation of calculated value
HTN
Status
MALES FEMALES
N E1=40 E2=60
PH E3=24 E4=36
H E5=16 E5=24
Expected frequency = row total x column total
Grand total
Eg: expected frequency for Normal male E1 = (100 x 80) / 200 = 40
HTN
Status
Males Females
Row Total
N 50 50 100
PH 20 40 60
H 10 30 40
Column
total
80 120 200
O E O-E (O-E)2 (O-E)2
E
50 40 10 100 100/40 =2.5
50 60 -10 100 100/60 =1.66
20 24 -4 16 16/24 =0.66
40 36 4 16 16/36 =0.44
10 16 -6 36 36/16 =2.25
30 24 6 36 36/24 =1.5
(X2)=9.01
Add up all of the above numbers to obtain
the value for chi square: 2 = 9.01
 Comparison of critical and calculated
value
We find that our answer of 9.01 is greater than the
critical value of 5.991 (for 2 degrees of freedom and a
significance level of 0.05) and so we reject the null
hypothesis.
Step Decision
 We reject the null hypotheses because
the calculated value fall into rejection
area
Step 06 conclusion
 There is an association between gender
and hypertensive status at alpha 0.05

More Related Content

chi square test lecture for nurses in pakistan

  • 1. The Chi Square Test Muhammad Shahid Sr. lecturer IIN
  • 2. Introduction We often have occasions to make comparisons between two characteristics of something to see if they are linked or related to each other. One way to do this is to work out what we would expect to find if there was no relationship between them (the usual null hypothesis) and what we actually observe.
  • 3. Introduction The test we use to measure the differences between what is observed and what is expected according to an assumed hypothesis is called the chi- square test.
  • 4. For Example Some null hypotheses may be: there is no relationship between the height of the post RN and Generic BSN students . there is no connection between the size of farm and the type of farm
  • 5. Important The chi square test can only be used on data that has the following characteristics: The data must be in the form of frequencies The frequency data must have a precise numerical value and must be organised into categories or groups. The total number of observations must be greater than 20. The expected frequency in any one cell of the table must be greater than 5.
  • 6. Formula 2 = (O E)2 E 2 = The value of chi square O = The observed value E = The expected value (O E)2 = all the values of (O E) squared then added together
  • 7. Write down the NULL HYPOTHESIS and ALTERNATIVE HYPOTHESIS and set the LEVEL OF SIGNIFICANCE. NH there is no association between gender and hypertensive status AH there is association between gender and hypertensive status We will set the level of significance at 0.05. Step 01
  • 8. Construct a table with the information you have observed or obtained. Observed Frequencies (O) HTN Status Males Females N 50 50 PH 20 40 H 10 30
  • 9. The number of degrees of freedom to use is: the number of rows in the table minus 1, multiplied by the number of columns minus 1. This is (2-1) x (3-1) = 1 x 2 = 2 degrees of freedom. Critical value X2=5.991 Look up the significance tables. These will tell you whether to accept the null hypothesis or reject it. Step 02 & 03 significance level
  • 10. Step 04 calculation of calculated value HTN Status MALES FEMALES N E1=40 E2=60 PH E3=24 E4=36 H E5=16 E5=24 Expected frequency = row total x column total Grand total Eg: expected frequency for Normal male E1 = (100 x 80) / 200 = 40
  • 11. HTN Status Males Females Row Total N 50 50 100 PH 20 40 60 H 10 30 40 Column total 80 120 200
  • 12. O E O-E (O-E)2 (O-E)2 E 50 40 10 100 100/40 =2.5 50 60 -10 100 100/60 =1.66 20 24 -4 16 16/24 =0.66 40 36 4 16 16/36 =0.44 10 16 -6 36 36/16 =2.25 30 24 6 36 36/24 =1.5 (X2)=9.01 Add up all of the above numbers to obtain the value for chi square: 2 = 9.01
  • 13. Comparison of critical and calculated value We find that our answer of 9.01 is greater than the critical value of 5.991 (for 2 degrees of freedom and a significance level of 0.05) and so we reject the null hypothesis.
  • 14. Step Decision We reject the null hypotheses because the calculated value fall into rejection area
  • 15. Step 06 conclusion There is an association between gender and hypertensive status at alpha 0.05