SlideShare a Scribd company logo
1 of 10
Comparing Several PropsThe chi-square test for Homogeneity allows us to test if
many populations and/or treatments have the same
proportional distributions
H0: p1 = p2 = p3 … or “no difference in the proportions of
successes for various populations or treatments”
Ha: at least two pi’s are different or “there is a difference in
the proportions of successes for various populations or
treatments”
Example on page 710
The chi-square statistic χ2 of a 2x2 table is equivalent to a
two-sample z test statistic squared z2.
Comparing Several PropsIt is also common to take a single random sample of a single
population and classify the data in two categorical variables.
A study followed a random sample of 8474 people with normal
blood pressure for about four years. All the individuals were free
of heart disease at the beginning of the study. Each person took
the Spielberger Trait Anger Scale Test, which measures how prone
a person is to sudden anger. Researchers also recorded whether
each individual developed coronary hear disease (CHD). This
includes people who had heart attacks and those who needed
medical treatment for heart disease.
Low Anger Moderate Anger High Anger Total
CHD 53 110 27 190
NO CHD 3057 4621 606 8284
Total 3110 4731 663 8474
Comparing Several PropsRandom sample of 8474 people with normal blood pressure. All
the individuals were free of heart disease at the beginning of the
study. Each person took the Spielberger Trait Anger Scale Test,
which measures how prone a person is to sudden anger. Whether
each individual developed coronary hear disease (CHD, including
people who had heart attacks and those who needed medical
treatment for heart disease.
Calculate appropriate conditional distributions to describe the
relationship between anger and CHD status
Low Anger Moderate Anger High Anger Total
CHD 53 110 27 190
NO CHD 3057 4621 606 8284
Total 3110 4731 663 8474
Comparing Several Props
Make a well-labeled graph that compares the conditional
distributions in part A
Write a few sentences describing the relationship between the two
variables.
Do these data provide convincing evidence of an association
between the variables in the larger population? … need new test!!
Low Anger Moderate Anger High Anger Total
CHD 53 110 27 190
NO CHD 3057 4621 606 8284
Total 3110 4731 663 8474
Comparing Several PropsChi-Square Test for Association/Independence
Null – no association between categorical variables
Alternative – there is an association between variables
H0: there is no association between anger level and heart
disease in the population of people with normal blood pressure
Ha: there is an association between anger level and heart
disease in the population of people with normal blood pressure
No association means one variable does not occur in common
with the other; the variables are independent
Goal – analyze the relationship between two variables.
Comparing Several PropsH0: there is no association between anger level and heart
disease in the population of people with normal blood pressure
Ha: there is an association between anger level and heart
disease in the population of people with normal blood pressure
Similarly:
H0: anger and heart disease are independent in the
population of people with normal blood pressure
Ha: anger and heart disease are not independent in the
population of people with normal blood pressure.
Begin by comparing observed counts with the expected counts
if null is true.
Comparing Several PropsFind expected counts
The null hypothesis is that there is no association between
anger level and heart disease in the population of interest. If we
assume that H0 is true, then anger level and heart disease are
independent. We can find the expected cell counts
Low Anger Moderate Anger High Anger Total
CHD 53 110 27 190
NO CHD 3057 4621 606 8284
Total 3110 4731 663 8474
Comparing Several Props
Chi-Square Test for Association/Independence
If Large Sample Size, Random, & Independent conditions are met
H0: There is no association between two categorical variables in the
population of interest
Ha: there is an association between two categorical variables in the
population of interest
Or
H0: two categorical variables are independent in the population of
interest
Ha: two categorical variables are not independent in the population of
interest
Find expected counts, then calculate chi-square statistic
Degree of freedom = (number of rows – 1)(number of columns – 1)
P-value area to the right of the statistic
Comparing Several Props
Do the data provide convincing evidence of an association between
anger level and heart disease in the population of interest? Carry
out an appropriate test to help answer the question.
Observed counts: Expected Counts:
State:
Plan:
Do:
Conclude:
Pg. 717
Low Mod. High Low Mod. High
CHD 53 110 27 69.73 106.08 14.19
NO CHD 3057 4621 606 3040.27 4624.92 618.81
Comparing Several Props
Can we conclude that being prone to anger causes heart disease?
- Observational study
- Lurking variables

More Related Content

More from amylute

Transforming data for inference
Transforming data for inferenceTransforming data for inference
Transforming data for inferenceamylute
 
Inference in regression line test
Inference  in regression line testInference  in regression line test
Inference in regression line testamylute
 
Regression inference confidence intervals
Regression inference confidence intervalsRegression inference confidence intervals
Regression inference confidence intervalsamylute
 
Using chi square wisely
Using chi square wiselyUsing chi square wisely
Using chi square wiselyamylute
 
Chi square test for homgeneity
Chi square test for homgeneityChi square test for homgeneity
Chi square test for homgeneityamylute
 
Relationships across distribution
Relationships across distributionRelationships across distribution
Relationships across distributionamylute
 
Chi square goodness of fit test
Chi square goodness of fit testChi square goodness of fit test
Chi square goodness of fit testamylute
 
Chi square distribution table c
Chi square distribution table cChi square distribution table c
Chi square distribution table camylute
 
Ap statistics chp. 11
Ap statistics chp. 11Ap statistics chp. 11
Ap statistics chp. 11amylute
 
Dividing polys
Dividing polysDividing polys
Dividing polysamylute
 
Solving triangles pp slides
Solving triangles pp slidesSolving triangles pp slides
Solving triangles pp slidesamylute
 
Conditional prob & independence
Conditional prob & independenceConditional prob & independence
Conditional prob & independenceamylute
 
Two way tables & venn diagrams
Two way tables & venn diagramsTwo way tables & venn diagrams
Two way tables & venn diagramsamylute
 
Probability models & basic rules
Probability models & basic rulesProbability models & basic rules
Probability models & basic rulesamylute
 
Simulation
SimulationSimulation
Simulationamylute
 
Mthys of probability
Mthys of probabilityMthys of probability
Mthys of probabilityamylute
 
4.3 using studies wisely
4.3 using studies wisely4.3 using studies wisely
4.3 using studies wiselyamylute
 
4.2 blocking
4.2 blocking4.2 blocking
4.2 blockingamylute
 
4.2 placebos & double blind
4.2 placebos & double blind4.2 placebos & double blind
4.2 placebos & double blindamylute
 
4.2 good vs. bad exp
4.2 good vs. bad exp4.2 good vs. bad exp
4.2 good vs. bad expamylute
 

More from amylute (20)

Transforming data for inference
Transforming data for inferenceTransforming data for inference
Transforming data for inference
 
Inference in regression line test
Inference  in regression line testInference  in regression line test
Inference in regression line test
 
Regression inference confidence intervals
Regression inference confidence intervalsRegression inference confidence intervals
Regression inference confidence intervals
 
Using chi square wisely
Using chi square wiselyUsing chi square wisely
Using chi square wisely
 
Chi square test for homgeneity
Chi square test for homgeneityChi square test for homgeneity
Chi square test for homgeneity
 
Relationships across distribution
Relationships across distributionRelationships across distribution
Relationships across distribution
 
Chi square goodness of fit test
Chi square goodness of fit testChi square goodness of fit test
Chi square goodness of fit test
 
Chi square distribution table c
Chi square distribution table cChi square distribution table c
Chi square distribution table c
 
Ap statistics chp. 11
Ap statistics chp. 11Ap statistics chp. 11
Ap statistics chp. 11
 
Dividing polys
Dividing polysDividing polys
Dividing polys
 
Solving triangles pp slides
Solving triangles pp slidesSolving triangles pp slides
Solving triangles pp slides
 
Conditional prob & independence
Conditional prob & independenceConditional prob & independence
Conditional prob & independence
 
Two way tables & venn diagrams
Two way tables & venn diagramsTwo way tables & venn diagrams
Two way tables & venn diagrams
 
Probability models & basic rules
Probability models & basic rulesProbability models & basic rules
Probability models & basic rules
 
Simulation
SimulationSimulation
Simulation
 
Mthys of probability
Mthys of probabilityMthys of probability
Mthys of probability
 
4.3 using studies wisely
4.3 using studies wisely4.3 using studies wisely
4.3 using studies wisely
 
4.2 blocking
4.2 blocking4.2 blocking
4.2 blocking
 
4.2 placebos & double blind
4.2 placebos & double blind4.2 placebos & double blind
4.2 placebos & double blind
 
4.2 good vs. bad exp
4.2 good vs. bad exp4.2 good vs. bad exp
4.2 good vs. bad exp
 

Recently uploaded

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
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...christianmathematics
 
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 GraphThiyagu K
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
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 17Celine George
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
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 ImpactPECB
 

Recently uploaded (20)

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
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
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...
 
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
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
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
 

Chi square test of association independence

  • 1. Comparing Several PropsThe chi-square test for Homogeneity allows us to test if many populations and/or treatments have the same proportional distributions H0: p1 = p2 = p3 … or “no difference in the proportions of successes for various populations or treatments” Ha: at least two pi’s are different or “there is a difference in the proportions of successes for various populations or treatments” Example on page 710 The chi-square statistic χ2 of a 2x2 table is equivalent to a two-sample z test statistic squared z2.
  • 2. Comparing Several PropsIt is also common to take a single random sample of a single population and classify the data in two categorical variables. A study followed a random sample of 8474 people with normal blood pressure for about four years. All the individuals were free of heart disease at the beginning of the study. Each person took the Spielberger Trait Anger Scale Test, which measures how prone a person is to sudden anger. Researchers also recorded whether each individual developed coronary hear disease (CHD). This includes people who had heart attacks and those who needed medical treatment for heart disease. Low Anger Moderate Anger High Anger Total CHD 53 110 27 190 NO CHD 3057 4621 606 8284 Total 3110 4731 663 8474
  • 3. Comparing Several PropsRandom sample of 8474 people with normal blood pressure. All the individuals were free of heart disease at the beginning of the study. Each person took the Spielberger Trait Anger Scale Test, which measures how prone a person is to sudden anger. Whether each individual developed coronary hear disease (CHD, including people who had heart attacks and those who needed medical treatment for heart disease. Calculate appropriate conditional distributions to describe the relationship between anger and CHD status Low Anger Moderate Anger High Anger Total CHD 53 110 27 190 NO CHD 3057 4621 606 8284 Total 3110 4731 663 8474
  • 4. Comparing Several Props Make a well-labeled graph that compares the conditional distributions in part A Write a few sentences describing the relationship between the two variables. Do these data provide convincing evidence of an association between the variables in the larger population? … need new test!! Low Anger Moderate Anger High Anger Total CHD 53 110 27 190 NO CHD 3057 4621 606 8284 Total 3110 4731 663 8474
  • 5. Comparing Several PropsChi-Square Test for Association/Independence Null – no association between categorical variables Alternative – there is an association between variables H0: there is no association between anger level and heart disease in the population of people with normal blood pressure Ha: there is an association between anger level and heart disease in the population of people with normal blood pressure No association means one variable does not occur in common with the other; the variables are independent Goal – analyze the relationship between two variables.
  • 6. Comparing Several PropsH0: there is no association between anger level and heart disease in the population of people with normal blood pressure Ha: there is an association between anger level and heart disease in the population of people with normal blood pressure Similarly: H0: anger and heart disease are independent in the population of people with normal blood pressure Ha: anger and heart disease are not independent in the population of people with normal blood pressure. Begin by comparing observed counts with the expected counts if null is true.
  • 7. Comparing Several PropsFind expected counts The null hypothesis is that there is no association between anger level and heart disease in the population of interest. If we assume that H0 is true, then anger level and heart disease are independent. We can find the expected cell counts Low Anger Moderate Anger High Anger Total CHD 53 110 27 190 NO CHD 3057 4621 606 8284 Total 3110 4731 663 8474
  • 8. Comparing Several Props Chi-Square Test for Association/Independence If Large Sample Size, Random, & Independent conditions are met H0: There is no association between two categorical variables in the population of interest Ha: there is an association between two categorical variables in the population of interest Or H0: two categorical variables are independent in the population of interest Ha: two categorical variables are not independent in the population of interest Find expected counts, then calculate chi-square statistic Degree of freedom = (number of rows – 1)(number of columns – 1) P-value area to the right of the statistic
  • 9. Comparing Several Props Do the data provide convincing evidence of an association between anger level and heart disease in the population of interest? Carry out an appropriate test to help answer the question. Observed counts: Expected Counts: State: Plan: Do: Conclude: Pg. 717 Low Mod. High Low Mod. High CHD 53 110 27 69.73 106.08 14.19 NO CHD 3057 4621 606 3040.27 4624.92 618.81
  • 10. Comparing Several Props Can we conclude that being prone to anger causes heart disease? - Observational study - Lurking variables