Stat 31, Section 1, Last Time Paired Diff’s vs. Unmatched Samples

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 Tables
AP Statistics Section 14.2 A. The two-sample z procedures of chapter 13 allowed us to compare the proportions of successes in two groups (either two populations.
Does Background Music Influence What Customers Buy?
CHAPTER 24: Inference for Regression
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.
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
1 Hypothesis Testing In this section I want to review a few things and then introduce hypothesis testing.
Stat 512 – Lecture 13 Chi-Square Analysis (Ch. 8).
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.
Lesson Inference for Two-Way Tables. Vocabulary Statistical Inference – provides methods for drawing conclusions about a population parameter from.
AP Statistics Section 14.2 A. The two-sample z procedures of chapter 13 allowed us to compare the proportions of successes in two groups (either two populations.
Stat 31, Section 1, Last Time T distribution –For unknown, replace with –Compute with TDIST & TINV (different!) Paired Samples –Similar to above, work.
Goodness-of-Fit Tests and Categorical Data Analysis
Inference for Linear Regression Conditions for Regression Inference: Suppose we have n observations on an explanatory variable x and a response variable.
Analysis of two-way tables - Formulas and models for two-way tables - Goodness of fit IPS chapters 9.3 and 9.4 © 2006 W.H. Freeman and Company.
Stat 31, Section 1, Last Time Inference for Proportions –Hypothesis Tests 2 Sample Proportions Inference –Skipped 2-way Tables –Sliced populations in 2.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Analysis of two-way tables - Formulas and models for two-way tables - Goodness of fit IPS chapters 9.3 and 9.4 © 2006 W.H. Freeman and Company.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
+ Chapter 12: More About Regression Section 12.1 Inference for Linear Regression.
CHAPTER 11 SECTION 2 Inference for Relationships.
13.2 Chi-Square Test for Homogeneity & Independence AP Statistics.
Analysis of Two-Way tables Ch 9
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 11 Chi- Square Test for Homogeneity Target Goal: I can use a chi-square test to compare 3 or more proportions. I can use a chi-square test for.
CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
Copyright © 2010 Pearson Education, Inc. Slide
N318b Winter 2002 Nursing Statistics Specific statistical tests Chi-square (  2 ) Lecture 7.
Lesson Inference for Two-Way Tables. Knowledge Objectives Explain what is mean by a two-way table. Define the chi-square (χ 2 ) statistic. Identify.
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.
Stat 31, Section 1, Last Time Distribution of Sample Means –Expected Value  same –Variance  less, Law of Averages, I –Dist’n  Normal, Law of Averages,
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
Chapter 14 Inference for Distribution of Categorical Variables: Chi-Squared Procedures.
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.
Chi Square Procedures Chapter 14. Chi-Square Goodness-of-Fit Tests Section 14.1.
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.
11/12 9. Inference for Two-Way Tables. Cocaine addiction Cocaine produces short-term feelings of physical and mental well being. To maintain the effect,
 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 8 Estimating with Confidence
CHAPTER 11 Inference for Distributions of Categorical Data
Vocabulary Statistical Inference – provides methods for drawing conclusions about a population parameter from sample data Expected Values– row total *
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 26: Inference for Regression
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
Inference for Relationships
CHAPTER 11 Inference for Distributions of Categorical Data
Analyzing the Association Between Categorical Variables
CHAPTER 12 More About Regression
Chapter 13: 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
CHAPTER 11 Inference for Distributions of Categorical Data
Analysis of two-way tables
Presentation transcript:

Stat 31, Section 1, Last Time Paired Diff’s vs. Unmatched Samples Compare with example Showed graphic about Paired often better Review of Gray Level Hypo Testing Inference for Proportions Confidence Intervals Sample Size Calculation

Reading In Textbook Approximate Reading for Today’s Material: Pages 536-549, 555-566, 582-611 Approximate Reading for Next Class: Pages 582-611, 634-667

Midterm II Coming on Tuesday, April 10 Think about: Sheet of Formulas Again single 8 ½ x 11 sheet New, since now more formulas Redoing HW… Asking about those not understood Midterm not cumulative Covered Material: HW 7 - 11

Midterm II Extra Office Hours: Monday, 4/9, 10:00 – 12:00 12:30 – 3:00 Tuesday, 4/10, 8:30 – 10:00 11:00 – 12:00

Hypo. Tests for Proportions Case 3: Hypothesis Testing General Setup: Given Value

Hypo. Tests for Proportions Assess strength of evidence by: P-value = P{what saw or m.c. | B’dry} = = P{observed or m.c. | p = } Problem: sd of

Hypo. Tests for Proportions Problem: sd of Solution: (different from above “best guess” and “conservative”) calculation is done base on:

Hypo. Tests for Proportions e.g. Old Text Problem 8.16 Of 500 respondents in a Christmas tree marketing survey, 44% had no children at home and 56% had at least one child at home. The corresponding figures from the most recent census are 48% with no children, and 52% with at least one. Test the null hypothesis that the telephone survey has a probability of selecting a household with no children that is equal to the value of the last census. Give a Z-statistic and P-value.

Hypo. Tests for Proportions e.g. Old Text Problem 8.16 Let p = % with no child (worth writing down)

Hypo. Tests for Proportions Observed , from P-value =

Hypo. Tests for Proportions P-value = 2 * NORMDIST(0.44,0.48,sqrt(0.48*(1-0.48)/500),true) See Class Example 30, Part 3 http://stat-or.unc.edu/webspace/postscript/marron/Teaching/stor155-2007/Stor155Eg30.xls = 0.0734 Yes-No: no strong evidence Gray-level: somewhat strong evidence

Hypo. Tests for Proportions Z-score version: P-value = So Z-score is: = 1.79

Hypo. Tests for Proportions Note also 1-sided version: Yes-no: is strong evidence Gray Level: stronger evidence HW: 8.22a (0.0057), 8.23, interpret from both yes-no and gray-level viewpoints

2 Sample Proportions In text Section 8.2 Skip this Ideas are only slight variation of above Basically mix & Match of 2 sample ideas, and proportion methods If you need it (later), pull out text Covered on exams to extent it is in HW

Chapter 9: Two-Way Tables Main idea: Divide up populations in two ways E.g. 1: Age & Sex E.g. 2: Education & Income Typical Major Question: How do divisions relate? Are the divisions independent? Similar idea to indepe’nce in prob. Theory Statistical Inference?

Two-Way Tables Class Example 31, Textbook Example 9.18 Market Researchers know that background music can influence mood and purchasing behavior. A supermarket compared three 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 purshased.

Two-Way Tables Class Example 31, Textbook Example 9.18 Here is the two way table that summarizes the data: Are the type of wine purchased, and the background music related? Music Wine: None French Italian 30 39 11 1 19 Other 43 35

Two-Way Tables Class Example 31: Visualization Shows how counts are broken down by: music type wine type

Two-Way Tables Big Question: Is there a relationship? Note: tallest bars French Wine  French Music Italian Wine  Italian Music Other Wine  No Music Suggests there is a relationship

Two-Way Tables General Directions: Can we make this precise? Could it happen just by chance? Really: how likely to be a chance effect? Or is it statistically significant? I.e. music and wine purchase are related?

Two-Way Tables Class Example 31, a look under the hood… Excel Analysis, Part 1: http://stat-or.unc.edu/webspace/postscript/marron/Teaching/stor155-2007/Stor155Eg31.xls Notes: Read data from file Only appeared as column Had to re-arrange Better way to do this??? Made graphic with chart wizard

Two-Way Tables HW: Make 2-way bar graphs, and discuss relationships between the divisions, for the data in: 9.1 (younger people tend to be better educated) 9.9 (you try these…) 9.11

Class Example 31 (Wine & Music), Part 2 Two-Way Tables An alternate view: Replace counts by proportions (or %-ages) Class Example 31 (Wine & Music), Part 2 http://stat-or.unc.edu/webspace/postscript/marron/Teaching/stor155-2007/Stor155Eg31.xls Advantage: May be more interpretable Drawback: No real difference (just rescaled)

Two-Way Tables Testing for independence: What is it? From probability theory: P{A | B} = P{A} i.e. Chances of A, when B is known, are same as when B is unknown Table version of this idea?

Independence in 2-Way Tables Recall: P{A | B} = P{A} Counts - proportions analog of these? Analog of P{A}? Proportions of factor A, “not knowing B” Called “marginal proportions” Analog of P{A|B}???

Independence in 2-Way Tables Marginal proportions (or counts): Sums along rows Sums along columns Useful to write at margins of table Hence name marginal Number of independent interest Also nice to put total at bottom

Independence in 2-Way Tables Marginal Counts: Class Example 31 (Wine & Music), Part 3 http://stat-or.unc.edu/webspace/postscript/marron/Teaching/stor155-2007/Stor155Eg31.xls Marginals are of independent interest: Other wines sold best (French second) Italian music sold most wine… But don’t tell whole story E.g.Can’t see same music & wine is best… Full table tells more than marginals

Independence in 2-Way Tables Recall definition of independence: P{A | B} = P{A} Counts analog of P{A|B}??? Recall: So equivalent condition is:

Independence in 2-Way Tables Counts analog of P{A|B}??? Equivalent condition for independence is: So for counts, look for: Table Prop’n = Row Marg’l Prop’n x Col’n Marg’l Prop’n i.e. Entry = Product of Marginals

Independence in 2-Way Tables Visualize Product of Marginals for: Class Example 31 (Wine & Music), Part 4 http://stat-or.unc.edu/webspace/postscript/marron/Teaching/stor155-2007/Stor155Eg31.xls Shows same structure as marginals But not match between music & wine Good null hypothesis

Independence in 2-Way Tables Independent model appears different But is it really different? Or could difference be simply explained by natural sampling variation? Check for statistical significance…

Independence in 2-Way Tables Approach: Measure “distance between tables” Use Chi Square Statistic Has known probability distribution when table is independent Assess significance using P-value Set up as: H0: Indep. HA: Dependent P-value = P{what saw or m.c. | Indep.}

Independence in 2-Way Tables Chi-square statistic: Based on: Observed Counts (raw data), Expected Counts (under indep.), Notes: Small for only random variation Large for significant departure from indep.

Independence in 2-Way Tables Chi-square statistic calculation: Class example 31, Part 5: http://stat-or.unc.edu/webspace/postscript/marron/Teaching/stor155-2007/Stor155Eg31.xls Calculate term by term Then sum Is X2 = 18.3 “big” or “small”?

Independence in 2-Way Tables H0 distribution of the X2 statistic: “Chi Squared” (another Greek letter ) Parameter: “degrees of freedom” (similar to T distribution) Excel Computation: CHIDIST (given cutoff, find area = prob.) CHIINV (given prob = area, find cutoff)

Independence in 2-Way Tables Explore the distribution: Applet from Webster West (U. So. Carolina) http://www.stat.sc.edu/~west/applets/chisqdemo.html Right Skewed Distribution Nearly Gaussian for more d.f.

Independence in 2-Way Tables For test of independence, use: degrees of freedom = = (#rows – 1) x (#cols – 1) E.g. Wine and Music: d.f. = (3 – 1) x (3 – 1) = 4

Independence in 2-Way Tables E.g. Wine and Music: P-value = P{Observed X2 or m.c. | Indep.} = = P{X2 = 18.3 of m.c. | Indep.} = = P{X2 >= 18.3 | d.f. = 4} = = 0.0011 Also see Class Example 31, Part 5 http://stat-or.unc.edu/webspace/postscript/marron/Teaching/stor155-2007/Stor155Eg31.xls

Independence in 2-Way Tables E.g. Wine and Music: P-value = 0.001 Yes-No: Very strong evidence against independence, conclude music has a statistically significant effect Gray-Level: Also very strong evidence

Independence in 2-Way Tables Excel shortcut: CHITEST Avoids the (obs-exp)^2 / exp calculat’n Automatically computes d.f. Returns P-value