SlideShare a Scribd company logo
1 of 37
Chi-Square Testof
Independence
Shakir Rahman
BScN, MScN, MSc Applied Psychology, PhD Nursing (Candidate)
University of Minnesota USA.
Principal & Assistant Professor
Ayub International College of Nursing & AHS Peshawar
Visiting Faculty
Swabi College of Nursing & Health Sciences Swabi
Nowshera College of Nursing & Health Sciences Nowshera
1
LEARNINGOBJECTIVES
By the end of this session the students would be able to:
• Recognize the differences between categorical data and continuous data
• Discuss assumptions of chi square distribution
• Correctly interpret and use the terms:
 chi-square test of independence,
 contingency table
 degrees of freedom,
 “2x2” and “r x c” table.
• Calculate expected numbers of thecells of a contingency table .
• Calculate chi-square test statistic and its appropriate degrees of freedom.
• Refer the chi-square table to obtain tabulatedvalue
2
.
• Categorical variables take on values that are names or
labels, such as ethnicity (e.g., Sindhi, Punjabi, Balochi
etc.) and methods of teaching (e.g. lecture, discussion,
activity based etc.)
• Quantitative variables are numerical. They represent a
measurable quantity. For example, the number of
students taking Biostatistics Supplementary classes .
4
OVERVIEWOFDATA
ANALYSIS
Data
Continuous
Categorical Chi-square
Test
T-test for two
independent
samples/
ANOVA
5
CHI-SQUARETEST
• It is used to determine whether there is a significant
association between the two categorical variables
from a single population.
6
CHI-SQUAREDISTRIBUTION
PROPERTIES
• As the degrees of freedom increases, the chi-square
curve approaches a normal distribution
• It has many shapes which are based on its degree of
freedom (df)
• Distribution is skewed to the right
• A chi-square distribution takes positive values only
7
8
Chi SquareTest
Commonly used approaches are:
• Test for independence
• Test of homogeneity
9
CHI-SQUARE TEST OF
INDEPENDENCE
A chi-square test of independenceis used
when we want to see if there is a
relationship/association between
two categorical variables
1
0
EXAMPLES OF RELATIONSHIPS
BETWEEN QUALITATIVE VARIABLES
• Qualitative variables are either ordinal ornominal.
Examples:
 Do the nurses feel differently about a new postoperative procedure
than doctors?
Preference (Old/New) Subjects (Nurses/ Doctors)
children
 Is there any relationship between Soya Use & Lung cancer?
Soya Intake (yes/no) Lung cancer (yes/no)
 Is there any relationship between parent’s and their
education?
Parent’s Education (Illiterate/Up toIntermediate/Graduate)
10
Children’s Education (Illiterate/Up toIntermediate/Graduate)
CONTINGENCY
TABLE
Helmet used at
the time ofroad
accident
Got serious brain injury
Yes No
Yes 5 995
No 25 975
12
CONTINGENCY
TABLE
•The table which classifies categories of the qualitative
variable.
•The number of individuals or items assigned to each
category is called the frequency.
13
• When we consider two categorical variables at a time,
then an observation will belong to a particular category
of variable one as well as a particular category of
variable two. This type of table is referred as
contingency table
The simplest form of contingency table is a 2x2 contingency table withboth
variables having exactly two categories.
WHAT INFORMATION DOES
CONTINGENCY TABLEREVEAL?
14
Helmet used at
the time of road
accident
Got serious brain injury
Yes No
Yes 5 995
No 25 975
•What information does cell no.1 give?
Five persons (5), who used helmet at the time of
road accident had serious brain injury.
15
WHAT OTHER INFORMATION DOES
CONTINGENCY TABLE REVEAL?
In this table Two independent categorical variables that
form a “r x c” contingency table, where “r” is the number of
rows (number of categories in first variable e.g. helmet used
at the time of accident or not?) and “c” is the number of
columns (number of categories in the second variable e.g.
got severe brain injury or not?) in the table.
16
17
• The data are obtained from a random sample
• Expected frequencies of each cell must be 5 or
greater than 5
Note: Must use frequencies:
In case, if percentages are given then
convert those into frequencies.
ASSUMPTIONS OF CHI-SQUARE TESTOF
INDEPENDENCE
18
FISHER'SEXACTTEST
• If assumptions of chi- square isnot
fulfilling:
i.e. one or more of the cells has an expected
frequency less than five
Fisher's exact test is used regardless of how
small the expected frequency is…….
19
HYPOTHESIS TESTING IN CHI-SQUARE
TEST OFINDEPENDENCE
Null Hypothesis:
H0: Two variables areindependent
OR
H0: There is no association between two variables
Alternate Hypothesis:
Ha: Two variables are notindependent
OR
Ha: There is an association between two variables.
20
TestStatistic: Chi-square test
Expected Frequency (E) for a Cell=
(Row Total X Column Total) / GrandTotal
)2
( O  E
 2    ij ij
Eij
HYPOTHESIS TESTING IN CHI-SQUARE
TEST OF
Significance level
I:
NAlp
Dha
EPENDENCE
21
Degrees of freedom (df)= (rows-1)(columns-1), where “r” is the
total number of rows and “c” is the total number of columns.
HYPOTHESIS TESTING IN CHI-SQUARE
TEST OF INDEPENDENCE
Critical Region: 2
(cal)> 2
(tab) or 2
,df
22
CRITICALREGION
23
How to calculate Chi-square test statistic?
Row# Column# O(Observed) E(Expected) (O-E) (O-E)2 (O-E)2/E
1 1 O11 E11 (O11-E11) (O11-E11)2 (O11-E11)2/E11
1 2 O12 E12 (O12-E12) (O12-E12)2 (O12-E12)2/E12
. . . . . . .
i j Oij Eij (Oij-Eij) (Oij-Eij)2 (Oij-Eij)2/Eij
. . . . . . .
r c Orc Erc (Orc-Erc) (Orc-Erc)2 (Orc-Erc)2/Erc
Sum GrandTotal GrandTotal 2
24
STEPSTOCALCULATECHI
SQUARE(2 )
• First calculate all expected cells(E)
• Subtract Expected frequency from Observed
frequency
• Square the difference ofO-E
• Divide (O-E)2 by E
• Do this for all cells in the table, and add them all
together
• Sum of column (O-E)2/E give us Chi- Square (2 )
value
25
Helmet used atthe
time of road
accident
Got serious braininjury Total
Yes No
Yes 5 995 1000
No 25 975 1000
Total 30 1970 2000
Observed Frequency:
Helmet used
at the time
of road
accident
Got serious brain injury Total
Yes No
Yes 1000*30/2000 1000*1970/2000 1000
No 1000*30/2000 1000*1970/2000 1000
Total 30 1970 2000
Calculation of Expected Frequency:
Helmet used
at the time of
roadaccident
Got serious brain injury
Yes No
Yes 15 985
No 15 985
Expected Frequencies after calculation:
27
A total of 165 patients with incomplete spinal cord injury came to a clinic over a
period of one year were treated with three treatment regimens (1: Only medicine;
2: Medicine & physical therapies; 3: Medicine and physical therapies with counseling.
Each patient’s condition was rated fully improved, partially improved or not improved.
The resultsare shown here.
Type of Therapy Patient’s Condition Total
Fully improved Partially
improved
Not improved
Only Medicine 10 15 25 R1 =50
Medicine & physicaltherapies 15 25 15 R2 =55
Medicine & physicaltherapies
with counseling
20 30 10 R3 =60
Total C1 =45 C2 =70 C3 =50 N =165
TYPEOFTHERAPYANDPATIENT’SCONDITION
WITHINCOMPLETESPINALCORDINJURY
Test whether there is an associationbetween type of therapy and patient’scondition
at 5% level ofsignificance.
28
Type of Therapy and Patient’s Condition with Incomplete Spinal
Cord Injury (contd.)
Type of Therapy Patient’s Condition Total
Fully improved Partially improved Not improved
Only Medicine (I) O11 = 10 O12 = 15 O13 = 25 R1 = 50
E11 = (50)(45)/165 E12 =(50)(70)/165 E13 =(50)(50)/165
= 13.6 = 21.2 = 15.2
Medicine & physical
therapies with skill
building activities (II)
O21 =15
E21= (55)(45)/165
= 15.0
O22 =25
E22= (55)(70)/165
= 23.3
O23 =15
E23=(55)(50)/165
= 16.7
R2 = 55
Medicine & physical
therapies with skill
building activities and
counseling (III)
O31= 20
E31=(45)(60)/165
= 16.4
O32 =30
E32=(70)(60)/165
= 25.5
O33 =10
E33=(50)(60)/165
= 18.1
R3 = 60
Total C1 =45 C2 =70 C3 =50 N =165
Row# Column # O (Observed) E (Expected) (O-E) (O-E)2 (O-E)2/E
1 1 10 13.6 -3.6 12.96 0.95
1 2 15 21.2 -6.2 38.44 1.81
1 3 25 15.2 9.8 96.04 6.32
2 1 15 15.0 0 0 0.0
2 2 25 23.3 1.7 2.89 0.12
2 3 15 16.7 -1.7 2.89 0.17
3 1 20 16.4 3.6 12.96 0.79
3 2 30 25.5 4.5 20.25 0.79
3 3 10 18.1 -8.1 65.61 3.62
Sum
2=14.59
TYPEOFTHERAPYANDPATIENT’SCONDITION
WITHINCOMPLETESPINALCORDINJURY
30
HOW TOOBSERVECRITICALVALUEIN
CHI-SQUARETABLE?
Tabulated
2-value
at =0.05
and df=4
is 9.49
31
STEPSOFHYPOTHESIS
TE
STING
1) Hypothesis:
H0: There is no association between type of therapy andpatient’s
condition
Ha: There is an association between type of therapy andpatient’s
condition
2) Alpha =0.05
3) Test Statistics:Chi Square Test
Eij
Chi Square calculated value = 14.59
 2   (O E ) 2
ij ij
32
STEPSOFHYPOTHESISTESTING
> 2 tab
(cal)
4) Critical Region: Reject H0 if 2
df = (r-1)(c-1) = (3-1)(3-1) = 4
2 tab = 2 = 2=0.05,df=4
,df
2 = 9.49
5) Conclusion: As 2
(cal) = 14.59 and is greater than the tabulatedvalue of
9.49. So, we Reject H0 at 5% level of significance and conclude that
there is an association between type of therapy and patient’s condition.
33
SUMMAR
Y
34
Acknowledgements
Dr Tazeen Saeed Ali
RM, RM, BScN, MSc ( Epidemiology & Biostatistics), Ph.D.
(Medical Sciences), Post Doctorate (Health Policy & Planning)
Associate Dean School of Nursing & Midwifery
The Aga Khan University Karachi.
Kiran Ramzan Ali Lalani
BScN, MSc Epidemiology & Biostatistics (Candidate)
Registered Nurse (NICU)
Aga Khan University Hospital
REFERENCES
 Kuzma, J.W. (2004). Basic Statistics for the
Health Sciences. (4thed.). California:
Mayfield.
 Bluman, G. A. (2008). Elementary
Statistics, A step by step approach(7th ed.)
McGraw Hill.
Thanks! 35

More Related Content

Similar to Lecture 12 Chi-Square.pptx

Categorical-data-afghvvghgfhg.analysis.ppt
Categorical-data-afghvvghgfhg.analysis.pptCategorical-data-afghvvghgfhg.analysis.ppt
Categorical-data-afghvvghgfhg.analysis.ppt
qkmaiu
 
Chapter 4Summarizing Data Collected in the Sample.docx
Chapter 4Summarizing Data Collected in the Sample.docxChapter 4Summarizing Data Collected in the Sample.docx
Chapter 4Summarizing Data Collected in the Sample.docx
keturahhazelhurst
 
7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics
Jayashritha
 
Metanalysis Lecture
Metanalysis LectureMetanalysis Lecture
Metanalysis Lecture
drmomusa
 
Commonly used statistical tests in research
Commonly used statistical tests in researchCommonly used statistical tests in research
Commonly used statistical tests in research
Naqeeb Ullah Khan
 
Intro to tests of significance qualitative
Intro to tests of significance qualitativeIntro to tests of significance qualitative
Intro to tests of significance qualitative
Pandurangi Raghavendra
 

Similar to Lecture 12 Chi-Square.pptx (20)

Categorical-data-afghvvghgfhg.analysis.ppt
Categorical-data-afghvvghgfhg.analysis.pptCategorical-data-afghvvghgfhg.analysis.ppt
Categorical-data-afghvvghgfhg.analysis.ppt
 
Chapter 4Summarizing Data Collected in the Sample.docx
Chapter 4Summarizing Data Collected in the Sample.docxChapter 4Summarizing Data Collected in the Sample.docx
Chapter 4Summarizing Data Collected in the Sample.docx
 
7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics7. Chi square test.pdf pharmaceutical biostatistics
7. Chi square test.pdf pharmaceutical biostatistics
 
Test of significance
Test of significanceTest of significance
Test of significance
 
Chi square test
Chi square testChi square test
Chi square test
 
Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9
 
Anova single factor
Anova single factorAnova single factor
Anova single factor
 
Chi squared test
Chi squared test Chi squared test
Chi squared test
 
Lect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_testLect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_test
 
Metanalysis Lecture
Metanalysis LectureMetanalysis Lecture
Metanalysis Lecture
 
Chi square test
Chi square testChi square test
Chi square test
 
Understanding randomisation
Understanding randomisationUnderstanding randomisation
Understanding randomisation
 
Commonly used statistical tests in research
Commonly used statistical tests in researchCommonly used statistical tests in research
Commonly used statistical tests in research
 
Contingency Tables
Contingency TablesContingency Tables
Contingency Tables
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
Intro to tests of significance qualitative
Intro to tests of significance qualitativeIntro to tests of significance qualitative
Intro to tests of significance qualitative
 
HFS3283 paired t tes-t and anova
HFS3283 paired t tes-t and anovaHFS3283 paired t tes-t and anova
HFS3283 paired t tes-t and anova
 
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
Parametric test  - t Test, ANOVA, ANCOVA, MANOVAParametric test  - t Test, ANOVA, ANCOVA, MANOVA
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
 
Statistical analysis by iswar
Statistical analysis by iswarStatistical analysis by iswar
Statistical analysis by iswar
 
ChandanChakrabarty_1.pdf
ChandanChakrabarty_1.pdfChandanChakrabarty_1.pdf
ChandanChakrabarty_1.pdf
 

More from shakirRahman10

Unit 12. Limitations & Recomendations.pptx
Unit 12. Limitations & Recomendations.pptxUnit 12. Limitations & Recomendations.pptx
Unit 12. Limitations & Recomendations.pptx
shakirRahman10
 
Unit 11. Interepreting the Research Findings.pptx
Unit 11. Interepreting the Research Findings.pptxUnit 11. Interepreting the Research Findings.pptx
Unit 11. Interepreting the Research Findings.pptx
shakirRahman10
 
Unit 10. Data Collection & Analysis.pptx
Unit 10. Data Collection & Analysis.pptxUnit 10. Data Collection & Analysis.pptx
Unit 10. Data Collection & Analysis.pptx
shakirRahman10
 
Unit 9c. Data Collection tools.pptx
Unit 9c. Data Collection tools.pptxUnit 9c. Data Collection tools.pptx
Unit 9c. Data Collection tools.pptx
shakirRahman10
 
Unit 9b. Sample size estimation.ppt
Unit 9b. Sample size estimation.pptUnit 9b. Sample size estimation.ppt
Unit 9b. Sample size estimation.ppt
shakirRahman10
 
Unit 9a. Sampling Techniques.pptx
Unit 9a. Sampling Techniques.pptxUnit 9a. Sampling Techniques.pptx
Unit 9a. Sampling Techniques.pptx
shakirRahman10
 
Unit 8. Ethical Considerations in Reseaerch.pptx
Unit 8. Ethical Considerations in Reseaerch.pptxUnit 8. Ethical Considerations in Reseaerch.pptx
Unit 8. Ethical Considerations in Reseaerch.pptx
shakirRahman10
 
Unit 7. Theoritical & Conceptual Framework.pptx
Unit 7. Theoritical & Conceptual Framework.pptxUnit 7. Theoritical & Conceptual Framework.pptx
Unit 7. Theoritical & Conceptual Framework.pptx
shakirRahman10
 
Unit 6. Literature Review & Synthesis.pptx
Unit 6. Literature Review & Synthesis.pptxUnit 6. Literature Review & Synthesis.pptx
Unit 6. Literature Review & Synthesis.pptx
shakirRahman10
 
Unit 5. Research Question and Hypothesis.pptx
Unit 5. Research Question and Hypothesis.pptxUnit 5. Research Question and Hypothesis.pptx
Unit 5. Research Question and Hypothesis.pptx
shakirRahman10
 
Unit 4. Research Problem, Purpose, Objectives, Significance and Scope..pptx
Unit 4. Research Problem, Purpose, Objectives, Significance and Scope..pptxUnit 4. Research Problem, Purpose, Objectives, Significance and Scope..pptx
Unit 4. Research Problem, Purpose, Objectives, Significance and Scope..pptx
shakirRahman10
 
Unit 3. Outcome Reseaerch.pptx
Unit 3. Outcome Reseaerch.pptxUnit 3. Outcome Reseaerch.pptx
Unit 3. Outcome Reseaerch.pptx
shakirRahman10
 
Unit 2. Introduction to Quantitative & Qualitative Reseaerch.pptx
Unit 2. Introduction to Quantitative & Qualitative Reseaerch.pptxUnit 2. Introduction to Quantitative & Qualitative Reseaerch.pptx
Unit 2. Introduction to Quantitative & Qualitative Reseaerch.pptx
shakirRahman10
 
Unit I. Introduction to Nursing Research.pptx
Unit I. Introduction to Nursing Research.pptxUnit I. Introduction to Nursing Research.pptx
Unit I. Introduction to Nursing Research.pptx
shakirRahman10
 
Lecture 13 Regression & Correlation.ppt
Lecture 13 Regression & Correlation.pptLecture 13 Regression & Correlation.ppt
Lecture 13 Regression & Correlation.ppt
shakirRahman10
 
Lecture 9 t-test for one sample.pptx
Lecture 9 t-test for one sample.pptxLecture 9 t-test for one sample.pptx
Lecture 9 t-test for one sample.pptx
shakirRahman10
 
Lecture 8 Type 1 and 2 errors.pptx
Lecture 8 Type 1 and 2 errors.pptxLecture 8 Type 1 and 2 errors.pptx
Lecture 8 Type 1 and 2 errors.pptx
shakirRahman10
 
Lecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptxLecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptx
shakirRahman10
 

More from shakirRahman10 (20)

Unit 12. Limitations & Recomendations.pptx
Unit 12. Limitations & Recomendations.pptxUnit 12. Limitations & Recomendations.pptx
Unit 12. Limitations & Recomendations.pptx
 
Unit 11. Interepreting the Research Findings.pptx
Unit 11. Interepreting the Research Findings.pptxUnit 11. Interepreting the Research Findings.pptx
Unit 11. Interepreting the Research Findings.pptx
 
Unit 10. Data Collection & Analysis.pptx
Unit 10. Data Collection & Analysis.pptxUnit 10. Data Collection & Analysis.pptx
Unit 10. Data Collection & Analysis.pptx
 
Unit 9c. Data Collection tools.pptx
Unit 9c. Data Collection tools.pptxUnit 9c. Data Collection tools.pptx
Unit 9c. Data Collection tools.pptx
 
Unit 9b. Sample size estimation.ppt
Unit 9b. Sample size estimation.pptUnit 9b. Sample size estimation.ppt
Unit 9b. Sample size estimation.ppt
 
Unit 9a. Sampling Techniques.pptx
Unit 9a. Sampling Techniques.pptxUnit 9a. Sampling Techniques.pptx
Unit 9a. Sampling Techniques.pptx
 
Unit 8. Ethical Considerations in Reseaerch.pptx
Unit 8. Ethical Considerations in Reseaerch.pptxUnit 8. Ethical Considerations in Reseaerch.pptx
Unit 8. Ethical Considerations in Reseaerch.pptx
 
Unit 7. Theoritical & Conceptual Framework.pptx
Unit 7. Theoritical & Conceptual Framework.pptxUnit 7. Theoritical & Conceptual Framework.pptx
Unit 7. Theoritical & Conceptual Framework.pptx
 
Unit 6. Literature Review & Synthesis.pptx
Unit 6. Literature Review & Synthesis.pptxUnit 6. Literature Review & Synthesis.pptx
Unit 6. Literature Review & Synthesis.pptx
 
Unit 5. Research Question and Hypothesis.pptx
Unit 5. Research Question and Hypothesis.pptxUnit 5. Research Question and Hypothesis.pptx
Unit 5. Research Question and Hypothesis.pptx
 
Unit 4. Research Problem, Purpose, Objectives, Significance and Scope..pptx
Unit 4. Research Problem, Purpose, Objectives, Significance and Scope..pptxUnit 4. Research Problem, Purpose, Objectives, Significance and Scope..pptx
Unit 4. Research Problem, Purpose, Objectives, Significance and Scope..pptx
 
Unit 3. Outcome Reseaerch.pptx
Unit 3. Outcome Reseaerch.pptxUnit 3. Outcome Reseaerch.pptx
Unit 3. Outcome Reseaerch.pptx
 
Unit 2. Introduction to Quantitative & Qualitative Reseaerch.pptx
Unit 2. Introduction to Quantitative & Qualitative Reseaerch.pptxUnit 2. Introduction to Quantitative & Qualitative Reseaerch.pptx
Unit 2. Introduction to Quantitative & Qualitative Reseaerch.pptx
 
Unit I. Introduction to Nursing Research.pptx
Unit I. Introduction to Nursing Research.pptxUnit I. Introduction to Nursing Research.pptx
Unit I. Introduction to Nursing Research.pptx
 
Lecture 14. ANOVA.pptx
Lecture 14. ANOVA.pptxLecture 14. ANOVA.pptx
Lecture 14. ANOVA.pptx
 
Lecture 13 Regression & Correlation.ppt
Lecture 13 Regression & Correlation.pptLecture 13 Regression & Correlation.ppt
Lecture 13 Regression & Correlation.ppt
 
Lecture 10 t –test for Two Independent Samples.pptx
Lecture 10 t –test for Two Independent Samples.pptxLecture 10 t –test for Two Independent Samples.pptx
Lecture 10 t –test for Two Independent Samples.pptx
 
Lecture 9 t-test for one sample.pptx
Lecture 9 t-test for one sample.pptxLecture 9 t-test for one sample.pptx
Lecture 9 t-test for one sample.pptx
 
Lecture 8 Type 1 and 2 errors.pptx
Lecture 8 Type 1 and 2 errors.pptxLecture 8 Type 1 and 2 errors.pptx
Lecture 8 Type 1 and 2 errors.pptx
 
Lecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptxLecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptx
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Recently uploaded (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Lecture 12 Chi-Square.pptx

  • 1.
  • 2. Chi-Square Testof Independence Shakir Rahman BScN, MScN, MSc Applied Psychology, PhD Nursing (Candidate) University of Minnesota USA. Principal & Assistant Professor Ayub International College of Nursing & AHS Peshawar Visiting Faculty Swabi College of Nursing & Health Sciences Swabi Nowshera College of Nursing & Health Sciences Nowshera 1
  • 3. LEARNINGOBJECTIVES By the end of this session the students would be able to: • Recognize the differences between categorical data and continuous data • Discuss assumptions of chi square distribution • Correctly interpret and use the terms:  chi-square test of independence,  contingency table  degrees of freedom,  “2x2” and “r x c” table. • Calculate expected numbers of thecells of a contingency table . • Calculate chi-square test statistic and its appropriate degrees of freedom. • Refer the chi-square table to obtain tabulatedvalue 2 .
  • 4. • Categorical variables take on values that are names or labels, such as ethnicity (e.g., Sindhi, Punjabi, Balochi etc.) and methods of teaching (e.g. lecture, discussion, activity based etc.) • Quantitative variables are numerical. They represent a measurable quantity. For example, the number of students taking Biostatistics Supplementary classes . 4
  • 6. CHI-SQUARETEST • It is used to determine whether there is a significant association between the two categorical variables from a single population. 6
  • 7. CHI-SQUAREDISTRIBUTION PROPERTIES • As the degrees of freedom increases, the chi-square curve approaches a normal distribution • It has many shapes which are based on its degree of freedom (df) • Distribution is skewed to the right • A chi-square distribution takes positive values only 7
  • 8. 8
  • 9. Chi SquareTest Commonly used approaches are: • Test for independence • Test of homogeneity 9
  • 10. CHI-SQUARE TEST OF INDEPENDENCE A chi-square test of independenceis used when we want to see if there is a relationship/association between two categorical variables 1 0
  • 11. EXAMPLES OF RELATIONSHIPS BETWEEN QUALITATIVE VARIABLES • Qualitative variables are either ordinal ornominal. Examples:  Do the nurses feel differently about a new postoperative procedure than doctors? Preference (Old/New) Subjects (Nurses/ Doctors) children  Is there any relationship between Soya Use & Lung cancer? Soya Intake (yes/no) Lung cancer (yes/no)  Is there any relationship between parent’s and their education? Parent’s Education (Illiterate/Up toIntermediate/Graduate) 10 Children’s Education (Illiterate/Up toIntermediate/Graduate)
  • 12. CONTINGENCY TABLE Helmet used at the time ofroad accident Got serious brain injury Yes No Yes 5 995 No 25 975 12
  • 13. CONTINGENCY TABLE •The table which classifies categories of the qualitative variable. •The number of individuals or items assigned to each category is called the frequency. 13
  • 14. • When we consider two categorical variables at a time, then an observation will belong to a particular category of variable one as well as a particular category of variable two. This type of table is referred as contingency table The simplest form of contingency table is a 2x2 contingency table withboth variables having exactly two categories. WHAT INFORMATION DOES CONTINGENCY TABLEREVEAL? 14
  • 15. Helmet used at the time of road accident Got serious brain injury Yes No Yes 5 995 No 25 975 •What information does cell no.1 give? Five persons (5), who used helmet at the time of road accident had serious brain injury. 15
  • 16. WHAT OTHER INFORMATION DOES CONTINGENCY TABLE REVEAL? In this table Two independent categorical variables that form a “r x c” contingency table, where “r” is the number of rows (number of categories in first variable e.g. helmet used at the time of accident or not?) and “c” is the number of columns (number of categories in the second variable e.g. got severe brain injury or not?) in the table. 16
  • 17. 17
  • 18. • The data are obtained from a random sample • Expected frequencies of each cell must be 5 or greater than 5 Note: Must use frequencies: In case, if percentages are given then convert those into frequencies. ASSUMPTIONS OF CHI-SQUARE TESTOF INDEPENDENCE 18
  • 19. FISHER'SEXACTTEST • If assumptions of chi- square isnot fulfilling: i.e. one or more of the cells has an expected frequency less than five Fisher's exact test is used regardless of how small the expected frequency is……. 19
  • 20. HYPOTHESIS TESTING IN CHI-SQUARE TEST OFINDEPENDENCE Null Hypothesis: H0: Two variables areindependent OR H0: There is no association between two variables Alternate Hypothesis: Ha: Two variables are notindependent OR Ha: There is an association between two variables. 20
  • 21. TestStatistic: Chi-square test Expected Frequency (E) for a Cell= (Row Total X Column Total) / GrandTotal )2 ( O  E  2    ij ij Eij HYPOTHESIS TESTING IN CHI-SQUARE TEST OF Significance level I: NAlp Dha EPENDENCE 21
  • 22. Degrees of freedom (df)= (rows-1)(columns-1), where “r” is the total number of rows and “c” is the total number of columns. HYPOTHESIS TESTING IN CHI-SQUARE TEST OF INDEPENDENCE Critical Region: 2 (cal)> 2 (tab) or 2 ,df 22
  • 24. How to calculate Chi-square test statistic? Row# Column# O(Observed) E(Expected) (O-E) (O-E)2 (O-E)2/E 1 1 O11 E11 (O11-E11) (O11-E11)2 (O11-E11)2/E11 1 2 O12 E12 (O12-E12) (O12-E12)2 (O12-E12)2/E12 . . . . . . . i j Oij Eij (Oij-Eij) (Oij-Eij)2 (Oij-Eij)2/Eij . . . . . . . r c Orc Erc (Orc-Erc) (Orc-Erc)2 (Orc-Erc)2/Erc Sum GrandTotal GrandTotal 2 24
  • 25. STEPSTOCALCULATECHI SQUARE(2 ) • First calculate all expected cells(E) • Subtract Expected frequency from Observed frequency • Square the difference ofO-E • Divide (O-E)2 by E • Do this for all cells in the table, and add them all together • Sum of column (O-E)2/E give us Chi- Square (2 ) value 25
  • 26. Helmet used atthe time of road accident Got serious braininjury Total Yes No Yes 5 995 1000 No 25 975 1000 Total 30 1970 2000 Observed Frequency: Helmet used at the time of road accident Got serious brain injury Total Yes No Yes 1000*30/2000 1000*1970/2000 1000 No 1000*30/2000 1000*1970/2000 1000 Total 30 1970 2000 Calculation of Expected Frequency:
  • 27. Helmet used at the time of roadaccident Got serious brain injury Yes No Yes 15 985 No 15 985 Expected Frequencies after calculation: 27
  • 28. A total of 165 patients with incomplete spinal cord injury came to a clinic over a period of one year were treated with three treatment regimens (1: Only medicine; 2: Medicine & physical therapies; 3: Medicine and physical therapies with counseling. Each patient’s condition was rated fully improved, partially improved or not improved. The resultsare shown here. Type of Therapy Patient’s Condition Total Fully improved Partially improved Not improved Only Medicine 10 15 25 R1 =50 Medicine & physicaltherapies 15 25 15 R2 =55 Medicine & physicaltherapies with counseling 20 30 10 R3 =60 Total C1 =45 C2 =70 C3 =50 N =165 TYPEOFTHERAPYANDPATIENT’SCONDITION WITHINCOMPLETESPINALCORDINJURY Test whether there is an associationbetween type of therapy and patient’scondition at 5% level ofsignificance. 28
  • 29. Type of Therapy and Patient’s Condition with Incomplete Spinal Cord Injury (contd.) Type of Therapy Patient’s Condition Total Fully improved Partially improved Not improved Only Medicine (I) O11 = 10 O12 = 15 O13 = 25 R1 = 50 E11 = (50)(45)/165 E12 =(50)(70)/165 E13 =(50)(50)/165 = 13.6 = 21.2 = 15.2 Medicine & physical therapies with skill building activities (II) O21 =15 E21= (55)(45)/165 = 15.0 O22 =25 E22= (55)(70)/165 = 23.3 O23 =15 E23=(55)(50)/165 = 16.7 R2 = 55 Medicine & physical therapies with skill building activities and counseling (III) O31= 20 E31=(45)(60)/165 = 16.4 O32 =30 E32=(70)(60)/165 = 25.5 O33 =10 E33=(50)(60)/165 = 18.1 R3 = 60 Total C1 =45 C2 =70 C3 =50 N =165
  • 30. Row# Column # O (Observed) E (Expected) (O-E) (O-E)2 (O-E)2/E 1 1 10 13.6 -3.6 12.96 0.95 1 2 15 21.2 -6.2 38.44 1.81 1 3 25 15.2 9.8 96.04 6.32 2 1 15 15.0 0 0 0.0 2 2 25 23.3 1.7 2.89 0.12 2 3 15 16.7 -1.7 2.89 0.17 3 1 20 16.4 3.6 12.96 0.79 3 2 30 25.5 4.5 20.25 0.79 3 3 10 18.1 -8.1 65.61 3.62 Sum 2=14.59 TYPEOFTHERAPYANDPATIENT’SCONDITION WITHINCOMPLETESPINALCORDINJURY 30
  • 32. STEPSOFHYPOTHESIS TE STING 1) Hypothesis: H0: There is no association between type of therapy andpatient’s condition Ha: There is an association between type of therapy andpatient’s condition 2) Alpha =0.05 3) Test Statistics:Chi Square Test Eij Chi Square calculated value = 14.59  2   (O E ) 2 ij ij 32
  • 33. STEPSOFHYPOTHESISTESTING > 2 tab (cal) 4) Critical Region: Reject H0 if 2 df = (r-1)(c-1) = (3-1)(3-1) = 4 2 tab = 2 = 2=0.05,df=4 ,df 2 = 9.49 5) Conclusion: As 2 (cal) = 14.59 and is greater than the tabulatedvalue of 9.49. So, we Reject H0 at 5% level of significance and conclude that there is an association between type of therapy and patient’s condition. 33
  • 35. Acknowledgements Dr Tazeen Saeed Ali RM, RM, BScN, MSc ( Epidemiology & Biostatistics), Ph.D. (Medical Sciences), Post Doctorate (Health Policy & Planning) Associate Dean School of Nursing & Midwifery The Aga Khan University Karachi. Kiran Ramzan Ali Lalani BScN, MSc Epidemiology & Biostatistics (Candidate) Registered Nurse (NICU) Aga Khan University Hospital
  • 36. REFERENCES  Kuzma, J.W. (2004). Basic Statistics for the Health Sciences. (4thed.). California: Mayfield.  Bluman, G. A. (2008). Elementary Statistics, A step by step approach(7th ed.) McGraw Hill.