7. Comparing Two Groups Goal: Use CI and/or significance test to compare means (quantitative variable) proportions (categorical variable) Group 1 Group.

Slides:



Advertisements
Similar presentations
Chapter 18: Inference about One Population Mean STAT 1450.
Advertisements

INFERENCE: SIGNIFICANCE TESTS ABOUT HYPOTHESES Chapter 9.
Objectives (BPS chapter 18) Inference about a Population Mean  Conditions for inference  The t distribution  The one-sample t confidence interval 
Inference for a population mean BPS chapter 18 © 2006 W. H. Freeman and Company.
5. Statistical Inference: Estimation
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Variance Chapter 16.
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.
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Significance Testing Chapter 13 Victor Katch Kinesiology.
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. More About Significance Tests Chapter 13.
Copyright ©2011 Brooks/Cole, Cengage Learning Analysis of Variance Chapter 16 1.
Chapter 11: Inference for Distributions
1 BA 555 Practical Business Analysis Review of Statistics Confidence Interval Estimation Hypothesis Testing Linear Regression Analysis Introduction Case.
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.
Review for Final Exam Some important themes from Chapters 9-11 Final exam covers these chapters, but implicitly tests the entire course, because we use.
Review of Statistics 101 We review some important themes from the course 1.Introduction Statistics- Set of methods for collecting/analyzing data (the art.
7. Comparing Two Groups Goal: Use CI and/or significance test to compare means (quantitative variable) proportions (categorical variable) Group 1 Group.
Chapter 10 Analyzing the Association Between Categorical Variables
How Can We Test whether Categorical Variables are Independent?
Chapter 9 Comparing Two Groups
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
Inferential Statistics: SPSS
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 12 Analyzing the Association Between Quantitative Variables: Regression Analysis Section.
Week 9 Chapter 9 - Hypothesis Testing II: The Two-Sample Case.
Hypothesis Testing – Examples and Case Studies
Hypothesis Testing II The Two-Sample Case.
Hypothesis testing – mean differences between populations
Chapter 19: Two-Sample Problems STAT Connecting Chapter 18 to our Current Knowledge of Statistics ▸ Remember that these formulas are only valid.
Section 10.1 ~ t Distribution for Inferences about a Mean Introduction to Probability and Statistics Ms. Young.
Education 793 Class Notes T-tests 29 October 2003.
More About Significance Tests
+ Chapter 9 Summary. + Section 9.1 Significance Tests: The Basics After this section, you should be able to… STATE correct hypotheses for a significance.
Comparing Two Population Means
Agresti/Franklin Statistics, 1 of 111 Chapter 9 Comparing Two Groups Learn …. How to Compare Two Groups On a Categorical or Quantitative Outcome Using.
Review of Chapters 1- 5 We review some important themes from the first 5 chapters 1.Introduction Statistics- Set of methods for collecting/analyzing data.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
CHAPTER 18: Inference about a Population Mean
Agresti/Franklin Statistics, 1 of 106  Section 9.4 How Can We Analyze Dependent Samples?
Inference We want to know how often students in a medium-size college go to the mall in a given year. We interview an SRS of n = 10. If we interviewed.
Review of Chapters 1- 6 We review some important themes from the first 6 chapters 1.Introduction Statistics- Set of methods for collecting/analyzing data.
1 Chapter 10: Introduction to Inference. 2 Inference Inference is the statistical process by which we use information collected from a sample to infer.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.4 Analyzing Dependent Samples.
Copyright © 2012 Pearson Education. All rights reserved © 2010 Pearson Education Copyright © 2012 Pearson Education. All rights reserved. Chapter.
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
AP Statistics Chapter 24 Comparing Means.
Introduction to Inference: Confidence Intervals and Hypothesis Testing Presentation 8 First Part.
Introduction to Inference: Confidence Intervals and Hypothesis Testing Presentation 4 First Part.
Fall 2002Biostat Statistical Inference - Confidence Intervals General (1 -  ) Confidence Intervals: a random interval that will include a fixed.
1 Chapter 11: Analyzing the Association Between Categorical Variables Section 11.1: What is Independence and What is Association?
Chapter 12 Confidence Intervals and Hypothesis Tests for Means © 2010 Pearson Education 1.
Agresti/Franklin Statistics, 1 of 88 Chapter 11 Analyzing Association Between Quantitative Variables: Regression Analysis Learn…. To use regression analysis.
MTH3003 PJJ SEM II 2014/2015 F2F II 12/4/2015.  ASSIGNMENT :25% Assignment 1 (10%) Assignment 2 (15%)  Mid exam :30% Part A (Objective) Part B (Subjective)
Statistical Analysis II Lan Kong Associate Professor Division of Biostatistics and Bioinformatics Department of Public Health Sciences December 15, 2015.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.1 Categorical Response: Comparing Two Proportions.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
Uncertainty and confidence Although the sample mean,, is a unique number for any particular sample, if you pick a different sample you will probably get.
Two-Sample-Means-1 Two Independent Populations (Chapter 6) Develop a confidence interval for the difference in means between two independent normal populations.
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 &
Objectives (PSLS Chapter 18) Comparing two means (σ unknown)  Two-sample situations  t-distribution for two independent samples  Two-sample t test 
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 1 FINAL EXAMINATION STUDY MATERIAL III A ADDITIONAL READING MATERIAL – INTRO STATS 3 RD EDITION.
16/23/2016Inference about µ1 Chapter 17 Inference about a Population Mean.
Lecture Slides Elementary Statistics Twelfth Edition
8. Association between Categorical Variables
Review for Exam 2 Some important themes from Chapters 6-9
Comparing 2 Groups Most Research is Interested in Comparing 2 (or more) Groups (Populations, Treatments, Conditions) Longitudinal: Same subjects at different.
Presentation transcript:

7. Comparing Two Groups Goal: Use CI and/or significance test to compare means (quantitative variable) proportions (categorical variable) Group 1 Group 2 Estimate Population mean Population proportion We conduct inference about the difference between the means or difference between the proportions (order irrelevant).

Types of variables and samples The outcome variable on which comparisons are made is the response variable. The variable that defines the groups to be compared is the explanatory variable. Example: Reaction time is response variable Experimental group is explanatory variable (categorical var. with categories cell-phone, control) Or, could express experimental group as “cell-phone use” with categories (yes, no)

Different methods apply for dependent samples -- natural matching between each subject in one sample and a subject in other sample, such as in “longitudinal studies,” which observe subjects repeatedly over time independent samples -- different samples, no matching, as in “cross-sectional studies” Example: We later consider a separate part of the experiment in which the same subjects formed the control group at one time and the cell-phone group at another time.

se for difference between two estimates (independent samples) The sampling distribution of the difference between two estimates is approximately normal (large n 1 and n 2 ) and has estimated Example: Data on “Response times” has 32 using cell phone with mean 585.2, s = in control group with mean 533.7, s = 65.3 What is se for difference between means of – = 51.4?

(Note larger than each separate se. Why?) So, the estimated difference of 51.4 has a margin of error of about 2( ) = 95% CI is about 51.4 ±, or (, ). (Good idea to re-do analysis without outlier, to check its influence.)

CI comparing two proportions Recall se for a sample proportion used in a CI is So, the se for the difference between sample proportions for two independent samples is A CI for the difference between population proportions is As usual, z depends on confidence level, 1.96 for 95% confidence

Example: College Alcohol Study conducted by Harvard School of Public Health ( Trends over time in percentage of binge drinking (consumption of 5 or more drinks in a row for men and 4 or more for women, at least once in past two weeks) or activities influenced by it? “Have you engaged in unplanned sexual activities because of drinking alcohol?” 1993: 19.2% yes of n = 12, : 21.3% yes of n = 8783 What is 95% CI for change saying “yes”?

Estimated change in proportion saying “yes” is – = % CI for change in population proportion is ± 1.96( ) = ± We can be 95% confident that …

Comments about CIs for difference between two population proportions If 95% CI for is (0.01, 0.03), then 95% CI for is (, ). It is arbitrary what we call Group 1 and Group 2 and the order of comparing proportions. When 0 is not in the CI, we can conclude that one population proportion is higher than the other. (e.g., if all positive values when take Group 2 – Group 1, then conclude population proportion higher for Group 2 than Group 1)

When 0 is in the CI, it is plausible that the population proportions are identical. Example: Suppose 95% CI for change in population proportion (2001 – 1993) is (-0.01, 0.03) “95% confident that population proportion saying yes was between smaller and larger in 2001 than in 1993.” There is a significance test of H 0 :  1 =  2 that the population proportions are identical (i.e., difference  1 -  2 = 0), using test statistic z = (difference between sample proportions)/se For unplanned sex in 1993 and 2001, z = diff./se = 0.021/ = Two-sided P-value = This seems to be statistical significance without practical significance!

Details about test on pp of text; use se 0 which pools data to get better estimate under H 0 (We study this test as a special case of “chi-squared test” in next chapter, which deals with possibly many groups, many outcome categories) The theory behind the CI uses the fact that sample proportions (and their differences) have approximate normal sampling distributions for large n’s, by the Central Limit Theorem, assuming randomization) In practice, formula works ok if at least 10 outcomes of each type for each sample

Quantitative Responses: Comparing Means Parameter:  2 -  1 Estimator: Estimated standard error: –Sampling dist.: Approximately normal (large n’s, by CLT) –CI for independent random samples from two normal population distributions has form –Formula for df for t-score is complex (later). If both sample sizes are at least 30, can just use z-score

Example: GSS data on “number of close friends” Use gender as the explanatory variable: 486 females with mean 8.3, s = males with mean 8.9, s = 15.5 Estimated difference of 8.9 – 8.3 = 0.6 has a margin of error of 1.96( ) =, and 95% CI is 0.6 ±, or (, ).

We can be 95% confident that … Order is arbitrary. 95% CI comparing means for females – males is (, ) When CI contains 0, it is plausible that the difference is 0 in the population (i.e., population means equal) Here, normal population assumption clearly violated. For large n’s, no problem because of CLT, and for small n’s the method is robust. (But, means may not be relevant for very highly skewed data.) Alternatively could do significance test to find strength of evidence about whether population means differ.

Significance Tests for  2 -  1 Typically we wish to test whether the two population means differ (null hypothesis being no difference, “no effect”). H 0 :  2 -  1 = 0 (  1 =  2 ) H a :  2 -  1  0 (  1   2 ) Test Statistic:

Test statistic has usual form of (estimate of parameter – null hypothesis value)/standard error. P-value: 2-tail probability from t distribution For 1-sided test (such as H a :  2 -  1 > 0), P-value = one-tail probability from t distribution (but, not robust) Interpretation of P-value and conclusion using  -level same as in one-sample methods (e.g., Suppose P-value = Then, under supposition that null hypothesis true, probability = 0.58 of getting data like observed or even “more extreme,” where “more extreme” determined by H a )

Example: Comparing female and male mean number of close friends, H 0 :  1 =  2 H a :  1   2 Difference between sample means = 8.9 – 8.3 = 0.6 se = Test statistic t = P-value = If null hypothesis true of equal population means, would not be unusual to get samples such as observed. For  = 0.05, not enough evidence to reject null. It is plausible that the population means are identical. For H a :  1 <  2, P-value = For H a :  1 >  2 P-value =

Equivalence of CI and Significance Test “H 0 :  1 =  2 rejected (not rejected) at 0.05-level in favor of H a :  1   2 ” is equivalent to “95% CI for  1 -  2 does not contain 0 (contains 0)” Example: P-value = 0.58, so “we do not reject H 0 of equal population means at 0.05 level” 95% CI of (-1.5, 2.7) contains 0. (For  other than 0.05, corresponds to 100(1 -  )% confidence)

Alternative inference comparing means assumes equal population standard deviations We will not consider formulas for this approach here (in Sec. 7.5 of text), as it’s a special case of “analysis of variance” methods studied later in Chapter 12. This CI and test uses t distribution with df = n 1 + n We will see how software displays this approach and the one we’ve used that does not assume equal population standard deviations.

Example: Exercise 7.30, p Improvement scores for therapy A: 10, 20, 30 therapy B: 30, 45, 45 A: mean = 20, s 1 = 10 B: mean = 40, s 2 = 8.66 Data file, which we input into SPSS and analyze Subject Therapy Improvement 1 A 10 2 A 20 3 A 30 4 B 30 5 B 45 6 B 45

Test of H 0 :  1 =  2 H a :  1   2 Test statistic t = When df =, P-value = For one-sided H a :  1 <  2 (i.e., predict before study that therapy B is better), P-value = With  = 0.05, insufficient evidence to reject null for two- sided H a, but can reject null for one-sided H a and conclude therapy B better. (but remember, must choose H a ahead of time!)

How does software get df for “unequal variance” method? When allow  1 2   2 2 recall that The “adjusted” degrees of freedom for the t distribution approximation is (Welch-Satterthwaite approximation) :

Some comments about comparing means If data show potentially large differences in variability (say, the larger s being at least double the smaller s), safer to use the “unequal variances” method One-sided t tests are not robust against severe violations of the normal population assumption, when n is relatively small. (Better to use “nonparametric” methods for one-sided inference when normal assumption is badly violated, invalidating t inferences; see text Sec. 7.7) CI more informative than test, showing whether plausible values are near or far from H 0.

When groups have similar variability, a summary measure of effect size that does not depend on units of measurement or on sample size n is Example: The therapies had sample means of 20 and 40 and standard deviations of 10 and If the standard deviation in each group is 9 (say), then effect size = (20 – 40)/9 = -2.2 Mean for therapy B estimated to be about two std. dev’s larger than the mean for therapy A, a large effect.

Comparing Means with Dependent Samples Setting: Each sample has the same subjects (as in longitudinal studies or crossover studies) or matched pairs of subjects Then, it is not true that for comparing two statistics, Must allow for “correlation” between estimates (Why?) Data: y i = difference in scores for subject (pair) i Treat data as single sample of difference scores, with sample mean and sample standard deviation s d and parameter  d = population mean difference score. In fact,  d =   –  

Example: Cell-phone study also had experiment with same subjects in each group (data on p. 194 of text) For this “matched-pairs” design, data file has the form Subject Cell_no Cell_yes … (for 32 subjects)

We reduce the 32 observations to 32 difference scores, 636 – 604 = – 556 = – 540 = 75 …. and analyze them with standard methods for a single sample =, s d =, For a 95% CI, df = n – 1 = 31, t-score = 2.04 We get 50.6 ±, or ( )

We can be 95% confident that … For testing H 0 : µ d = 0 against H a : µ d  0, the test statistic is t = ( - 0)/se =, Two-sided P-value =, so there is extremely strong evidence against the null hypothesis of no difference between the population means.

In class, we will use SPSS to Run the dependent-samples t analyses Plot cell_yes against cell_no and observe a strong positive correlation ( ), which illustrates how an analysis that ignores the dependence between the observations would be inappropriate. Note that one subject (number 28) is an outlier (unusually high) on both variables With outlier deleted, SPSS tell us that t =, df = for comparing means (P = ) for comparing means, 95% CI of ( ). The previous results were not influenced greatly by the outlier.

Some comments Dependent samples have advantages of (1) controlling sources of potential bias (e.g., balancing samples on variables that could affect the response), (2) having a smaller se for the difference of means, when the pairwise responses are highly positively correlated (in which case, the difference scores show less variability than the separate samples) The McNemar test (pp ) compares proportions with dependent samples Fisher’s exact test (pp ) compares proportions for small independent samples

Final Comment Sometimes it’s more useful to compare groups using ratios rather than differences of parameters Example: U.S. Dept. of Justice reports that proportion of adults in prison is about 900/100,000 for males, 60/100,000 for females Difference: 900/100,000 – 60/100,000 = 840/100,000 = Ratio: [900/100,000]/[60/100,000] = 900/60 = 15.0 In applications in which the proportion refers to an undesirable outcome (e.g., most medical studies), ratio called relative risk