Stat 217 – Day 27 Chi-square tests (Topic 25). The Plan Exam 2 returned at end of class today  Mean.80 (36/45)  Solutions with commentary online  Discuss.

Slides:



Advertisements
Similar presentations
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
Advertisements

CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
Chapter 11 Inference for Distributions of Categorical Data
Chapter 13: Inference for Distributions of Categorical Data
Copyright ©2011 Brooks/Cole, Cengage Learning More about Inference for Categorical Variables Chapter 15 1.
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. More About Categorical Variables Chapter 15.
Stat 301 – Day 17 Tests of Significance. Last Time – Sampling cont. Different types of sampling and nonsampling errors  Can only judge sampling bias.
Stat 217 – Day 9 Sampling. Recap (Lab 1) Observational unit = Sarah’s attempts (n = 8) Research hypothesis:Can Sarah solve problems  Research conjecture:
CHAPTER 11 Inference for Distributions of Categorical Data
Stat 217 – Day 24 Analysis of Variance Have yesterday’s handout handy.
Stat 512 – Lecture 14 Analysis of Variance (Ch. 12)
Stat 217 – Day 21 Cautions/Limitations with Inference Procedures.
Stat 217 – Day 22 Review. Last Time – Subtle Issues Make sure you have a random sample or interval doesn’t tell you much! Make sure you have a sample!
Stat Day 16 Observations (Topic 16 and Topic 14)
Stat 512 Day 9: Confidence Intervals (Ch 5) Open Stat 512 Java Applets page.
Stat 512 – Lecture 12 Two sample comparisons (Ch. 7) Experiments revisited.
Statistics 303 Chapter 9 Two-Way Tables. Relationships Between Two Categorical Variables Relationships between two categorical variables –Depending on.
Stat 217 – Week 10. Outline Exam 2 Lab 7 Questions on Chi-square, ANOVA, Regression  HW 7  Lab 8 Notes for Thursday’s lab Notes for final exam Notes.
Stat 512 – Lecture 13 Chi-Square Analysis (Ch. 8).
Stat 217 – Day 25 Regression. Last Time - ANOVA When?  Comparing 2 or means (one categorical and one quantitative variable) Research question  Null.
Stat 512 – Day 8 Tests of Significance (Ch. 6). Last Time Use random sampling to eliminate sampling errors Use caution to reduce nonsampling errors Use.
Stat 217 – Day 15 Statistical Inference (Topics 17 and 18)
Stat 217 – Day 20 Comparing Two Proportions The judge asked the statistician if she promised to tell the truth, the whole truth, and nothing but the truth?
Review for Exam 2 Some important themes from Chapters 6-9 Chap. 6. Significance Tests Chap. 7: Comparing Two Groups Chap. 8: Contingency Tables (Categorical.
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
Presentation 12 Chi-Square test.
1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Test of Independence.
More About Significance Tests
Chapter 11: Applications of Chi-Square. Count or Frequency Data Many problems for which the data is categorized and the results shown by way of counts.
Chapter 11: Applications of Chi-Square. Chapter Goals Investigate two tests: multinomial experiment, and the contingency table. Compare experimental results.
LECTURE 19 THURSDAY, 14 April STA 291 Spring
Chi-square test or c2 test
Chapter 26 Chi-Square Testing
CHAPTER 11 SECTION 2 Inference for Relationships.
Section 9-1: Inference for Slope and Correlation Section 9-3: Confidence and Prediction Intervals Visit the Maths Study Centre.
The z test statistic & two-sided tests Section
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
Data Analysis for Two-Way Tables. The Basics Two-way table of counts Organizes data about 2 categorical variables Row variables run across the table Column.
CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
Statistical Significance for a two-way table Inference for a two-way table We often gather data and arrange them in a two-way table to see if two categorical.
Statistics: Unlocking the Power of Data Lock 5 Exam 2 Review STAT 101 Dr. Kari Lock Morgan 11/13/12 Review of Chapters 5-9.
EGR 252 S10 JMB Ch.10 Part 3 Slide 1 Statistical Hypothesis Testing - Part 3  A statistical hypothesis is an assertion concerning one or more populations.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
Comparing Counts Chapter 26. Goodness-of-Fit A test of whether the distribution of counts in one categorical variable matches the distribution predicted.
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
+ Section 11.1 Chi-Square Goodness-of-Fit Tests. + Introduction In the previous chapter, we discussed inference procedures for comparing the proportion.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
Objectives (BPS chapter 12) General rules of probability 1. Independence : Two events A and B are independent if the probability that one event occurs.
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
Comparing Observed Distributions A test comparing the distribution of counts for two or more groups on the same categorical variable is called a chi-square.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8… Where we are going… Significance Tests!! –Ch 9 Tests about a population proportion –Ch 9Tests.
Textbook Section * We already know how to compare two proportions for two populations/groups. * What if we want to compare the distributions of.
 Check the Random, Large Sample Size and Independent conditions before performing a chi-square test  Use a chi-square test for homogeneity to determine.
CHAPTER 11 Inference for Distributions of Categorical Data
Stat 217 – Day 28 Review Stat 217.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 10 Analyzing the Association Between Categorical Variables
CHAPTER 11 Inference for Distributions of Categorical Data
Analyzing the Association Between Categorical Variables
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Presentation transcript:

Stat 217 – Day 27 Chi-square tests (Topic 25)

The Plan Exam 2 returned at end of class today  Mean.80 (36/45)  Solutions with commentary online  Discuss in class tomorrow Today: Chi-square Tuesday: ANOVA Wednesday: Begin Regression Thursday: Regression lab

Previously One population proportion or mean Comparing two population proportions or means  Is the difference statistically significant = larger than what we would expect by chance (if no difference in the populations) Simulation Normal probability model  Chance = random sampling or random assignment

Next Comparing more than 2 population proportions or more than 2 population means Same first question: Is the response variable quantitative or categorical? Random sampling or random assignment  Same analysis but affects “scope of conclusions”

Activity 25-1 (p. 507) (a)-(f) Observational study with an independent random sample in each of 1972, 1988, 2004 (explanatory variable) looking at whether people are “very happy” (response variable) Could the differences in these three sample proportions have arisen by chance (random sampling process) alone?

Activity 25-1 Parameters?  Let  72 represent the proportion of all adult Americans who would have rated their general level as happiness as very happy in 1972  Similarly for  88 and  04 (g) H 0 :  72 =  88 =  04 no association between happiness level and year Ha: not all 3 equal (is an association) General strategy? Assume Ho is true, what expect to see? Are our observed results surprising?

If Ho is true What would our segmented bar graph look like in this case? So our two-way table would be? “expected counts”

Test statistic Compare the observed counts to these expected counts (n) Large values are evidence against Ho How decide what is large? Chi-square distribution

Minitab output (handout) Chi-Square Test: 1972, 1988, 2004 Expected counts are printed below observed counts Chi-Square contributions are printed below expected counts Total Total Chi-Sq = 5.064, DF = 2, P-Value = 0.079

Minitab output (handout) Chi-Square Test: 1972, 1988, 2004 Expected counts are printed below observed counts Chi-Square contributions are printed below expected counts Total Total Chi-Sq = 5.064, DF = 2, P-Value = 0.079

Minitab output (handout) Chi-Square Test: 1972, 1988, 2004 Expected counts are printed below observed counts Chi-Square contributions are printed below expected counts Total Total Chi-Sq = 5.064, DF = 2, P-Value = ( )

Minitab output (handout) Chi-Square Test: 1972, 1988, 2004 Expected counts are printed below observed counts Chi-Square contributions are printed below expected counts Total Total Chi-Sq = 5.064, DF = 2, P-Value =

Minitab output (handout) Chi-Square Test: 1972, 1988, 2004 Expected counts are printed below observed counts Chi-Square contributions are printed below expected counts Total Total Chi-Sq = 5.064, DF = 2, P-Value = 0.079

Activity 25-1 (p) With p-value =.079, fail to reject at the 5% level (but would at 10% level!) (q) You have weak statistical evidence that the population proportions of very happy people were not identical for these three years. (Because these were random samples, you are safe in generalizing this conclusion to the populations of all American adults in each year but not a randomized experiment so no cause and effect relationship)

Activity 25-5 (p. 515) Two way table Chi-square test (output on handout) But what about a two-sample z-test? Same exact results if using a two-sided alternative!

Technical conditions Independent random samples… Expected cell counts are all at least 5  Are some ways to work around this…

To Turn in with Partner  Read background of Activity 25-3  Examine output on handout  What conclusions would you draw: Significance, Causation, Generalizability For Tuesday  Finish Topic 25 Output on handout (don’t have to learn Minitab) Notice how the hypothesis statements in the pink boxes differ across the scenarios  Self-check Activity 25-6

Activity 25-2 (p. 511) What if have a non-binary response variable? Same thing! (a) Ho: the population distributions of happiness were the same all three years no association between happiness level and year Ha: the population distributions were not the same (is an association) (b) X 2 = (df = 4), p-value =.000 (c) Strong evidence of a change in at least one of these population distributions

Activity 25-2 Where are the differences (descriptively)? Fewer “not too happy” in 1998 than expected. More “not too happy” in 1972 than expected.

Activity 25-3 (e)-(g) Can apply to randomized experiment as well Ho: The population proportions of potential customers who would leave a tip (or the probability is the same regardless of the type of card they receive) No association between type of card and whether or not tip Ha: not the same (is an association) Conclusion: Is significant evidence that the type of card affects the likelihood of someone receiving a tip (more leaving a tip with a joke card than expected)  At least for this waitress, this coffee bar

Activity 25-4 (b) Data collection: one sample, both variables recorded simultaneously (not independent random samples or randomized experiment) Ho: no association between happiness level and political inclination in population Ha: is an association Same analysis!

Activity 25-4 Conclusion We have strong evidence (p-value =.001 <.05) that there is a relationship between political inclination and happiness level in the population of adult Americans.