Comparing Two Proportions Using Dependent Samples (p 1 vs. p 2 )

Slides:



Advertisements
Similar presentations
Comparing Two Proportions (p1 vs. p2)
Advertisements

Four girls soccer teams took a random sample of players regarding the number of goals scored per game. The results are below. Use a significance level.
1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Goodness-of-Fit Tests.
Quantitative Skills 4: The Chi-Square Test
The Structure of a Hypothesis Test. Hypothesis Testing Hypothesis Test Statistic P-value Conclusion.
Hypothesis Testing “Teach A Level Maths” Statistics 2 Hypothesis Testing © Christine Crisp.
Nonparametric Inference
Two-Way Tables Two-way tables come about when we are interested in the relationship between two categorical variables. –One of the variables is the row.
LARGE SAMPLE TESTS ON PROPORTIONS
Statistics for the Social Sciences Psychology 340 Fall 2006 Hypothesis testing.
Statistics 303 Chapter 9 Two-Way Tables. Relationships Between Two Categorical Variables Relationships between two categorical variables –Depending on.
Statistics for Managers Using Microsoft® Excel 5th Edition
Statistics for the Social Sciences Psychology 340 Spring 2005 Hypothesis testing.
Chapter 9 Hypothesis Testing.
1 1 Slide IS 310 – Business Statistics IS 310 Business Statistics CSU Long Beach.
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
AP Statistics Section 13.1 A. Which of two popular drugs, Lipitor or Pravachol, helps lower bad cholesterol more? 4000 people with heart disease were.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Chapter 8 Inferences Based on a Single Sample: Tests of Hypothesis.
Nonparametric Inference
Inference for proportions - Comparing 2 proportions IPS chapter 8.2 © 2006 W.H. Freeman and Company.
Analysis of Count Data Chapter 26
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
14 Elements of Nonparametric Statistics
Inference for a Single Population Proportion (p).
Comparing Two Population Means
Week 111 Power of the t-test - Example In a metropolitan area, the concentration of cadmium (Cd) in leaf lettuce was measured in 7 representative gardens.
Chapter 10 Inferences from Two Samples
Testing means, part II The paired t-test. Outline of lecture Options in statistics –sometimes there is more than one option One-sample t-test: review.
STA Lecture 291 STA 291 Lecture 29 Review. STA Lecture 292 Final Exam, Thursday, May 6 When: 6:00pm-8:00pm Where: CB 106 Make-up exam: Friday.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Section 11-4 McNemar’s Test for Matched Pairs.
AP Statistics Section 13.1 A. Which of two popular drugs, Lipitor or Pravachol, helps lower bad cholesterol more? 4000 people with heart disease were.
1 Section 9-4 Two Means: Matched Pairs In this section we deal with dependent samples. In other words, there is some relationship between the two samples.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Hypothesis Testing State the hypotheses. Formulate an analysis plan. Analyze sample data. Interpret the results.
Chapter 7 Inferences Based on a Single Sample: Tests of Hypotheses.
Chapter 9 Three Tests of Significance Winston Jackson and Norine Verberg Methods: Doing Social Research, 4e.
+ Chi Square Test Homogeneity or Independence( Association)
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
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.
Fitting probability models to frequency data. Review - proportions Data: discrete nominal variable with two states (“success” and “failure”) You can do.
One-way ANOVA: - Comparing the means IPS chapter 12.2 © 2006 W.H. Freeman and Company.
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.
Test of Goodness of Fit Lecture 43 Section 14.1 – 14.3 Fri, Apr 8, 2005.
Section 10.1 Estimating with Confidence AP Statistics February 11 th, 2011.
Week111 The t distribution Suppose that a SRS of size n is drawn from a N(μ, σ) population. Then the one sample t statistic has a t distribution with n.
Chapter Outline Goodness of Fit test Test of Independence.
CHAPTERS HYPOTHESIS TESTING, AND DETERMINING AND INTERPRETING BETWEEN TWO VARIABLES.
Dan Piett STAT West Virginia University Lecture 12.
+ Chapter 11 Inference for Distributions of Categorical Data 11.1Chi-Square Goodness-of-Fit Tests 11.2Inference for Relationships.
Statistics: Unlocking the Power of Data Lock 5 Section 4.2 Measuring Evidence with p-values.
+ Unit 6: Comparing Two Populations or Groups Section 10.2 Comparing Two Means.
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
1 Outline 1.Count data 2.Properties of the multinomial experiment 3.Testing the null hypothesis 4.Examples.
Topic 21—Comparison of Proportions Example. Test of Significance A test of significance for the difference of two proportions Requirements: – Indep. SRS.
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.
Test of Goodness of Fit Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007.
Inference for a Single Population Proportion (p)
Chapter 12 Tests with Qualitative Data
AP Stats Check In Where we’ve been…
Chapter 8 Section 8.5 Testing µ1 - µ2 and p1 - p2 Independent Samples Hypothesis Testing Mr. zboril | Milford PEP.
Inference for Relationships
CHAPTER 12 Inference for Proportions
CHAPTER 12 Inference for Proportions
Chapter 13: Chi-Square Procedures
Presentation transcript:

Comparing Two Proportions Using Dependent Samples (p 1 vs. p 2 )

Inferential Methods (cont’d) Large dependent samples - McNemar’s test (chi-square) Large dependent samples - McNemar’s test (chi-square) Small dependent samples - McNemar’s test (binomial ) Small dependent samples - McNemar’s test (binomial )

Matched Dichotomous Data In some studies, we make comparisons of proportions across samples which are dependent. In some studies, we make comparisons of proportions across samples which are dependent. E.g. Cross-over studies E.g. Cross-over studies - Relief of headaches using Drug A vs. Drug B - Subject receives both treatments in random order E.g. Treating ear infections E.g. Treating ear infections - randomly assign a one of two treatments to each ear E.g. Infection status before and after treatment E.g. Infection status before and after treatment

Example 1: Effect of Disinfectant Use on Acute Cutaneous Complications (ACCs) During Insulin Pump Treatment A study examined the effect of disinfectant use on acute cutaneous complications (ACC’s) during insulin-pump treatment. At the time of the initial exam, 70.0% of 40 diabetic patients with insulin pumps had ACC’s at the needle insertion site. After use of a disinfectant on the skin before needle insertion for two to four weeks, 27.5% of the patients had ACC’s at the needle insertion site. A study examined the effect of disinfectant use on acute cutaneous complications (ACC’s) during insulin-pump treatment. At the time of the initial exam, 70.0% of 40 diabetic patients with insulin pumps had ACC’s at the needle insertion site. After use of a disinfectant on the skin before needle insertion for two to four weeks, 27.5% of the patients had ACC’s at the needle insertion site.

Example 1: Effect of Disinfectant Use on Acute Cutaneous Complications (ACCs) During Insulin Pump Treatment The data here is matched because we are examining infection status before and after regular disinfectant use at the injection site. The data here is matched because we are examining infection status before and after regular disinfectant use at the injection site. We can create the data table as shown below We can create the data table as shown below Proportion with ACCs before treatment = (a+b)/n Proportion with ACCs after treatment = (a+c)/n The difference between these quantities is (a+b)/n – (a+c)/n = (b – c)/n If disinfectant use if NOT effective we expect b = c, if it is we expect b > c.

Example 2: Cross-over study (Drug A vs. Drug B) Generic table from a cross-over study Generic table from a cross-over study If there is no difference between the drugs success rates we expect b = c. If Drug B is better than Drug A we would expect b < c. If Drug A is better than Drug B we would expect b > c. At any rate if b and c differ substantially then we have evidence of a difference between the drugs. Proportion successfully treated with drug A = (a+b)/n Proportion successfully treated with drug B = (a+c)/n The difference between these quantities is (a+b)/n – (a+c)/n = (b – c)/n The cells corresponding to b and c represent what we call discordant pairs and the total… b + c = # of discordant pairs.

McNemar’s Test Procedure Hypotheses Hypotheses H o : p 1 = p 2 (treatment 1 and 2 are equal) H A : p 1 > p 2 (treatment 1 is better than 2) Reject H o if b is “large” Reject H o if b is “large” H A : p 1 < p 2 (treatment 2 is better than 1) Reject H o if c is “large” Reject H o if c is “large” H A : p 1 = p 2 (treatment 1 and 2 are different) Reject Ho if b or c Reject Ho if b or c is “large” is “large”

McNemar’s Test Procedure We know that the total number of discordant pairs is b + c. We know that the total number of discordant pairs is b + c. If the null hypothesis is true b and c should be equal. If the null hypothesis is true b and c should be equal. If the null is true then b and c are like the number of heads and tails in (b + c) flips of a fair coin, both are binomial with p =.50. If the null is true then b and c are like the number of heads and tails in (b + c) flips of a fair coin, both are binomial with p =.50. Excessively large values for either b or c provide evidence against the null hypothesis. Excessively large values for either b or c provide evidence against the null hypothesis.

McNemar’s Test: P-values (uses binomial probabilities) H A : p 1 > p 2 Reject H o if H A : p 1 < p 2 Reject H o if H A : p 1 = p 2 Reject H o if Use either binomial probability tables or computer software to find these probabilities.

Example 1: Effect of Disinfectant Use on Acute Cutaneous Complications (ACCs) During Insulin Pump Treatment The results of treating n = 40 patients a = 9 subjects had ACCs both before and after disinfectant b = 19 subjects had ACCs before the disinfectant and did NOT have ACCs after the use of disinfectant c = 2 subjects had no ACCs before disinfectant use but had them after disinfectant was used d = 10 patients had no ACCs before or after the use of disinfectant. H o : there is no change in ACC incidence following use of disinfectant. H A : the ACC rate is lower following the use disinfectant. Intuitively we will reject H o if b is “large”… use McNemar’s Test.

Example 1: Effect of Disinfectant Use on Acute Cutaneous Complications (ACCs) During Insulin Pump Treatment 1) Let p = probability of ACC H o : p before = p after H A : p before > p after 2) Choose  and reject if b is “large”. 3) b = 19 with (b+c) = 21 4) Find p-value = P(X > 19|n=21, p=.50) = ) Therefore we conclude that the ACC infection rate is lower following the use of disinfectant at the injection site (p =.0001).

Example 2: Aspartame and Headaches In a double-blind study of aspartame and headaches, 40 subjects were given aspartame and a placebo after different times. All of the subjects had reported suffering from headaches after consuming food products that contained aspartame. In a double-blind study of aspartame and headaches, 40 subjects were given aspartame and a placebo after different times. All of the subjects had reported suffering from headaches after consuming food products that contained aspartame.

Example 2: Aspartame and Headaches 1) Let p = probability of headache H o : p aspartame = p placebo H A : p aspartame > p placebo 2) Choose  and reject if b is “large”. 3) b = 12 with (b+c) = 20 4) Find p-value = P(X > 12|n=20, p=.50) = ) Therefore we fail to conclude that there is a difference between the proportion of subjects getting headaches after consuming aspartame vs. placebo (p =.2517).

Large Sample McNemar’s Test Test Statistic

Example 1: Effect of Disinfectant Use on Acute Cutaneous Complications (ACCs) During Insulin Pump Treatment Using McNemar’s Test for large samples Find p-value = Therefore we conclude that the ACC infection rate is lower following the use of disinfectant at the injection site (p =.00048).

Chi-square Probability in JMP Enter chi-square statistic value and df then the p-value will automatically be calculated.