1 Desipramine is an antidepressant affecting the brain chemicals that may become unbalanced and cause depression. It was tested for recovery from cocaine.

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 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 26: Comparing Counts
CHAPTER 11 Inference for Distributions of Categorical Data
Analysis of Two-Way Tables Inference for Two-Way Tables IPS Chapter 9.1 © 2009 W.H. Freeman and Company.
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
Presentation 12 Chi-Square test.
Chapter 13 Chi-Square Tests. The chi-square test for Goodness of Fit allows us to determine whether a specified population distribution seems valid. The.
How Can We Test whether Categorical Variables are Independent?
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 11: Inference for Distributions of Categorical Data Section 11.2 Inference.
Analysis of Two-Way Tables
Analysis of Count Data Chapter 26
Lecture Presentation Slides SEVENTH EDITION STATISTICS Moore / McCabe / Craig Introduction to the Practice of Chapter 9 Analysis of Two-Way Tables.
Goodness-of-Fit Tests and Categorical Data Analysis
A random sample of 300 doctoral degree
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.
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.
11.2 Inference for Relationships. Section 11.2 Inference for Relationships COMPUTE expected counts, conditional distributions, and contributions to the.
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.
Lecture 9 Chapter 22. Tests for two-way tables. Objectives The chi-square test for two-way tables (Award: NHST Test for Independence)  Two-way tables.
Chapter 11 Inference for Tables: Chi-Square Procedures 11.1 Target Goal:I can compute expected counts, conditional distributions, and contributions to.
CHAPTER 11 SECTION 2 Inference for Relationships.
Chapter 11 The Chi-Square Test of Association/Independence Target Goal: I can perform a chi-square test for association/independence to determine whether.
Analysis of Two-Way tables Ch 9
+ Chi Square Test Homogeneity or Independence( Association)
Chi-Square Analysis Test of Homogeneity. Sometimes we compare samples of different populations for certain characteristics. This data is often presented.
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
Analysis of two-way tables - Inference for two-way tables IPS chapter 9.1 © 2006 W.H. Freeman and Company.
Analysis of two-way tables - Inference for two-way tables IPS chapter 9.2 © 2006 W.H. Freeman and Company.
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.
Essential Statistics Chapter 161 Review Part III_A_Chi Z-procedure Vs t-procedure.
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.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 11: Inference for Distributions of Categorical Data Section 11.2 Inference.
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.
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
The table shows a random sample of 100 hikers and the area of hiking preferred. Are hiking area preference and gender independent? Hiking Preference Area.
Lecture 9 Chapter 22. Tests for two-way tables. Objectives (PSLS Chapter 22) The chi-square test for two-way tables (Award: NHST Test for Independence)[B.
AP STATISTICS LESSON (DAY 1) INFERENCE FOR TWO – WAY TABLES.
+ Chapter 11 Inference for Distributions of Categorical Data 11.1Chi-Square Goodness-of-Fit Tests 11.2Inference for Relationships.
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
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 11. The chi-square test for goodness of fit.
Chapter 13- Inference For Tables: Chi-square Procedures Section Test for goodness of fit Section Inference for Two-Way tables Presented By:
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
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.
Chapter 13 Section 2. Chi-Square Test 1.Null hypothesis – written in words 2.Alternative hypothesis – written in words – always “different” 3.Alpha level.
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 &
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
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,
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
Objectives (BPS chapter 23)
Two-Way Tables and The Chi-Square Test*
Section 13.2 Chi-square Test of Association / Independence
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
Analyzing the Association Between Categorical Variables
Inference for Two Way Tables
Comparing Proportions for Multiple Populations
Chapter 13: Chi-Square Procedures
Analysis of two-way tables
Presentation transcript:

1 Desipramine is an antidepressant affecting the brain chemicals that may become unbalanced and cause depression. It was tested for recovery from cocaine addiction. Treatment with desipramine was compared to a standard treatment (lithium, with strong anti-manic effects) and a placebo. Is desipramine effective in preventing relapses?

Hypothesis: no association We use the chi-square (   ) test to assess the null hypothesis of no relationship between the two categorical variables of a two-way table. Two-way tables sort the data according to two categorical variables. We want to test the hypothesis that there is no relationship between these two categorical variables (H 0 ).

Expected Cell Counts To test this hypothesis, we compare actual counts from the sample data with expected counts, given the null hypothesis of no relationship. The expected count in any cell of a two-way table when H 0 is true is: 3

25*26/74 ≈ * * * * * *0.65 Desipramine Lithium Placebo Expected relapse counts No Yes 35% Overall non-relapse % Observed Cocaine addiction NOTE: 26/74 = /25=.6 7/26=.27 4/23=.17 Desipramine is an antidepressant affecting the brain chemicals that may become unbalanced and cause depression. It was thus tested for recovery from cocaine addiction. Treatment with desipramine was compared to a standard treatment (lithium, with strong anti-manic effects) and a placebo.

5 The Chi-Square Statistic To see if the data give convincing evidence against the null hypothesis, we compare the observed counts from our sample with the expected counts assuming H 0 is true. The test statistic that makes the comparison is the chi-square statistic. The chi-square statistic is a measure of how far the observed counts are from the expected counts. The formula for the statistic is: Where “observed count” represents an observed cell count, “expected count” represents the expected count for the same cell, and the sum is over all r  c cells in the table. The chi-square statistic is a measure of how far the observed counts are from the expected counts. The formula for the statistic is: Where “observed count” represents an observed cell count, “expected count” represents the expected count for the same cell, and the sum is over all r  c cells in the table.

6 The Chi-Square Distributions If the expected counts are large and the observed counts are very different, a large value of  2 will result, providing evidence against the null hypothesis. The P-value for a  2 test comes from comparing the value of the  2 statistic with critical values for a chi-square distribution. The chi-square distributions are a family of distributions that take only positive values and are skewed to the right. A particular  2 distribution is specified by giving its degrees of freedom. The  2 test for a two-way table with r rows and c columns uses critical values from the  2 distribution with (r – 1)(c – 1) degrees of freedom. The P-value is the area under the density curve of this  2 distribution to the right of the value of the test statistic. The chi-square distributions are a family of distributions that take only positive values and are skewed to the right. A particular  2 distribution is specified by giving its degrees of freedom. The  2 test for a two-way table with r rows and c columns uses critical values from the  2 distribution with (r – 1)(c – 1) degrees of freedom. The P-value is the area under the density curve of this  2 distribution to the right of the value of the test statistic. The Chi-Square Distributions

When is it safe to use a  2 test? We can safely use the chi-square test when:  The samples are simple random samples (SRS).  All individual expected counts are 1 or more (≥1)  No more than 20% of expected counts are less than 5 (< 5)  For a 2x2 table, this implies that all four expected counts should be 5 or more.

Observed Cocaine addiction The p-value is <0.005 or half a percent. This is very significant. We reject the null hypothesis of no association and conclude that there is a significant relationship between treatment (desipramine, lithium, placebo) and outcome (relapse or not). Try using Software. Statistical software output for the cocaine study - look at the last lines of output: HW: Read section 9.1; do #9.1, 9.2, 9.7, 9.15, 9.16, 9.19, 9.20, 9.28, 9.36(a) Tests NDF -LogLike RSquare (U) TestChiSquareProb>ChiSq Likelihood Ratio * Pearson *

Summary: Analyzing two-way tables When analyzing relationships between two categorical variables, follow this procedure: 1. Calculate descriptive statistics that convey the important information in the table—usually column or row percents. Always take percents with respect to the explanatory variable's totals! 2. Find the expected counts and use them to compute the X 2 statistic. 3. Compare your X 2 statistic to the chi-square critical values from Table F to find the approximate P-value for your test - or use software to do all the computations, including the expected values! 4. Draw a conclusion about the association between the row and column variables - don't forget the context!

Table F gives upper critical values for many χ 2 distributions. Finding the p-value with Table F The χ 2 distributions are a family of distributions that can take only positive values, are skewed to the right, and are described by a specific degrees of freedom.

Table F df = (r−1)(c−1) If  2 = 10.73, the p-value is between and From software we have P=.0047 In a 3x2 table, df=2x1=2