SlideShare una empresa de Scribd logo
1 de 12
Focus FoxA statistically minded toll collector wonders if drivers are equally
likely to choose each of the three lanes at his toll booth. He selects a
random sample from all the cars that approach the booth when all
three lanes are empty, so that the driver’s choice isn’t influenced by
the cars already at the booth.
Which of the following is the correct expression for the chi-square
goodness-of-fit test in this situation?
a.
Lane Left Center right
Number of drivers 137 159 169
Inference for Relationships
What if we want to compare a single categorical variable across
several populations or treatments? - we need a new test…
- Determine whether the distribution of the categorical variable
is the same for each population
- Examine related test to see if there is an association between
the variable and populations
Recall:
Two-Way Tables, conditional probabilities
Inference for Relationships
Market researchers suspect that background music may affect the
mood and buying behavior of customers. One study in a supermarket
compared three randomly assigned treatments: no music, French
accordion music, and Italian string music. Under each condition, the
researchers recorded the numbers of bottles of French, Italian, and
other wine purchased.
a. Calculate the conditional distribution of the type of wine sold for
each treatment.
Wine No Music French Italian Totals
French 30 39 30 99
Italian 11 1 19 31
Other 43 35 35 113
Totals 84 75 84 243
Inference for Relationships
b. Make an appropriate graph for comparing the conditional
distributions you found.
Wine No Music French Italian Totals
French 30 39 30 99
Italian 11 1 19 31
Other 43 35 35 113
Totals 84 75 84 243
Inference for Relationships
c. Are the distribution of wine purchases under the three music
treatments similar or different? Reference evidence found in parts
a & b.
Wine No Music French Italian Totals
French 30 39 30 99
Italian 11 1 19 31
Other 43 35 35 113
Totals 84 75 84 243
Inference for Relationships
In the wine example, if we use a one sample z test, we could select a
comparison that is significant or isn’t significant.
Individual comparisons don’t tell us whether the three distributions of
the categorical variable are significantly different.
We need to make multiple comparisons
- An overall test to see if there is any differences in parameters
- Detailed follow-up analysis to decide which of the parameters differ and
to estimate how large the differences are
We compare the observed counts in the a two-way table with the
counts we would expect if H0 is true.
Inference for Relationships
The null hypothesis in the wine and music experiment is that there is
no difference in the distribution of wine purchases in the store when
no music, French accordion music, or Italian string music is played.
To find the expected counts we start by assuming the H0 is true. We
can see from the two-way table that 99 of the 243 bottles of wine
bought during the study were French wines.
Wine No Music French Italian Totals
French 30 39 30 99
Italian 11 1 19 31
Other 43 35 35 113
Totals 84 75 84 243
Inference for Relationships
If the specific type of music that’s playing has no effect on wine
purchases, the proportion of French wine sold under each music
condition should be 99/243 = 0.407.
There are 84 bottles of wine bought when no music is playing, so
0.407•84 = 34.22 bottles of French wine on average.
There are 75 bottles of bought when French music is playing, so
0.407•75 = 30.56 bottles of French wine on average.
There are 84 bottles of wine bought when Italian music is playing, so
0.407•84 = 34.22 bottles of French wine on average.
Wine No Music French Italian Totals
French 30 39 30 99
Italian 11 1 19 31
Other 43 35 35 113
Totals 84 75 84 243
Inference for Relationships
Repeat the process for each type of wine using the proportion of total
bottles sold against each type of wine sold.
Wine No Music French Italian Totals
French 30 39 30 99
Italian 11 1 19 31
Other 43 35 35 113
Totals 84 75 84 243
Wine No Music French Italian Totals
French 34.22 30.56 34.22 99
Italian 31
Other 113
Totals 84 75 84 243
Inference for Relationships
There is a general formula for the expected count in any cell of a two-
way table:
row total • column total
table total
99 • 84
243
Notice that all the
expected counts in the wine
study are at least 5.
Wine No Music French Italian Totals
French 30 39 30 99
Italian 11 1 19 31
Other 43 35 35 113
Totals 84 75 84 243
Wine No Music French Italian Totals
French 34.22 30.56 34.22 99
Italian 10.72 9.57 10.72 31
Other 39.06 34.88 39.06 113
Totals 84 75 84 243
Inference for Relationships
Finding the chi-square statistic χ2 = ∑ (observed – expected)2
Expected
Calculate the chi-square
statistic for the observed
and expected counts of
wine and music.
(30-34.22)2 + (39-30.56)2 +….
34.22 30.56
Wine No Music French Italian Totals
French 30 39 30 99
Italian 11 1 19 31
Other 43 35 35 113
Totals 84 75 84 243
Wine No Music French Italian Totals
French 34.22 30.56 34.22 99
Italian 10.72 9.57 10.72 31
Other 39.06 34.88 39.06 113
Totals 84 75 84 243
Inference for Relationships
Think of the chi-square statistic χ2 as a measure of how much the
observed counts deviate from the expected counts.
Large values of χ2 are evidence against the null, and the P-value
measures the strength of the evidence.
We will use Table C, but our df are a little different
df = (number of rows – 1)(number of columns – 1)

Más contenido relacionado

Más de amylute

Chi square test for homgeneity
Chi square test for homgeneityChi square test for homgeneity
Chi square test for homgeneityamylute
 
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
 

Más de amylute (14)

Chi square test for homgeneity
Chi square test for homgeneityChi square test for homgeneity
Chi square test for homgeneity
 
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
 

Último

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
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
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
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
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
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
 
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 . pdfQucHHunhnh
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Último (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
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"
 
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
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
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 ...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.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
 
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
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

Chi-Square Goodness-of-Fit Test for Toll Booth Lanes

  • 1. Focus FoxA statistically minded toll collector wonders if drivers are equally likely to choose each of the three lanes at his toll booth. He selects a random sample from all the cars that approach the booth when all three lanes are empty, so that the driver’s choice isn’t influenced by the cars already at the booth. Which of the following is the correct expression for the chi-square goodness-of-fit test in this situation? a. Lane Left Center right Number of drivers 137 159 169
  • 2. Inference for Relationships What if we want to compare a single categorical variable across several populations or treatments? - we need a new test… - Determine whether the distribution of the categorical variable is the same for each population - Examine related test to see if there is an association between the variable and populations Recall: Two-Way Tables, conditional probabilities
  • 3. Inference for Relationships Market researchers suspect that background music may affect the mood and buying behavior of customers. One study in a supermarket compared three randomly assigned treatments: no music, French accordion music, and Italian string music. Under each condition, the researchers recorded the numbers of bottles of French, Italian, and other wine purchased. a. Calculate the conditional distribution of the type of wine sold for each treatment. Wine No Music French Italian Totals French 30 39 30 99 Italian 11 1 19 31 Other 43 35 35 113 Totals 84 75 84 243
  • 4. Inference for Relationships b. Make an appropriate graph for comparing the conditional distributions you found. Wine No Music French Italian Totals French 30 39 30 99 Italian 11 1 19 31 Other 43 35 35 113 Totals 84 75 84 243
  • 5. Inference for Relationships c. Are the distribution of wine purchases under the three music treatments similar or different? Reference evidence found in parts a & b. Wine No Music French Italian Totals French 30 39 30 99 Italian 11 1 19 31 Other 43 35 35 113 Totals 84 75 84 243
  • 6. Inference for Relationships In the wine example, if we use a one sample z test, we could select a comparison that is significant or isn’t significant. Individual comparisons don’t tell us whether the three distributions of the categorical variable are significantly different. We need to make multiple comparisons - An overall test to see if there is any differences in parameters - Detailed follow-up analysis to decide which of the parameters differ and to estimate how large the differences are We compare the observed counts in the a two-way table with the counts we would expect if H0 is true.
  • 7. Inference for Relationships The null hypothesis in the wine and music experiment is that there is no difference in the distribution of wine purchases in the store when no music, French accordion music, or Italian string music is played. To find the expected counts we start by assuming the H0 is true. We can see from the two-way table that 99 of the 243 bottles of wine bought during the study were French wines. Wine No Music French Italian Totals French 30 39 30 99 Italian 11 1 19 31 Other 43 35 35 113 Totals 84 75 84 243
  • 8. Inference for Relationships If the specific type of music that’s playing has no effect on wine purchases, the proportion of French wine sold under each music condition should be 99/243 = 0.407. There are 84 bottles of wine bought when no music is playing, so 0.407•84 = 34.22 bottles of French wine on average. There are 75 bottles of bought when French music is playing, so 0.407•75 = 30.56 bottles of French wine on average. There are 84 bottles of wine bought when Italian music is playing, so 0.407•84 = 34.22 bottles of French wine on average. Wine No Music French Italian Totals French 30 39 30 99 Italian 11 1 19 31 Other 43 35 35 113 Totals 84 75 84 243
  • 9. Inference for Relationships Repeat the process for each type of wine using the proportion of total bottles sold against each type of wine sold. Wine No Music French Italian Totals French 30 39 30 99 Italian 11 1 19 31 Other 43 35 35 113 Totals 84 75 84 243 Wine No Music French Italian Totals French 34.22 30.56 34.22 99 Italian 31 Other 113 Totals 84 75 84 243
  • 10. Inference for Relationships There is a general formula for the expected count in any cell of a two- way table: row total • column total table total 99 • 84 243 Notice that all the expected counts in the wine study are at least 5. Wine No Music French Italian Totals French 30 39 30 99 Italian 11 1 19 31 Other 43 35 35 113 Totals 84 75 84 243 Wine No Music French Italian Totals French 34.22 30.56 34.22 99 Italian 10.72 9.57 10.72 31 Other 39.06 34.88 39.06 113 Totals 84 75 84 243
  • 11. Inference for Relationships Finding the chi-square statistic χ2 = ∑ (observed – expected)2 Expected Calculate the chi-square statistic for the observed and expected counts of wine and music. (30-34.22)2 + (39-30.56)2 +…. 34.22 30.56 Wine No Music French Italian Totals French 30 39 30 99 Italian 11 1 19 31 Other 43 35 35 113 Totals 84 75 84 243 Wine No Music French Italian Totals French 34.22 30.56 34.22 99 Italian 10.72 9.57 10.72 31 Other 39.06 34.88 39.06 113 Totals 84 75 84 243
  • 12. Inference for Relationships Think of the chi-square statistic χ2 as a measure of how much the observed counts deviate from the expected counts. Large values of χ2 are evidence against the null, and the P-value measures the strength of the evidence. We will use Table C, but our df are a little different df = (number of rows – 1)(number of columns – 1)