1Stat 13, UCLA, Ivo DinovSlide 1UCLA STAT 13Introduction toStatistical Methods for the Life and Health SciencesInstructor: Ivo Dinov, Asst. Prof. of Statistics and NeurologyTeaching Assistants:Jacquelina Dacosta & Chris BarrUniversity of California, Los Angeles, Fall 2006http://www.stat.ucla.edu/~dinov/courses_students.htmlStat 13, UCLA, Ivo DinovSlide 2Comparison of Two Independent SamplesStat 13, UCLA, Ivo DinovSlide 3Comparison of Two Independent Samplesz Many times in the sciences it is useful to compare two groups Male vs. Female Drug vs. Placebo NC vs. Disease1μ2μ1σ2σ1y2y1s2sPopulation 1Population 2Sample 1Size n1Sample 2Size n2Q: Different?Stat 13, UCLA, Ivo DinovSlide 4Comparison of Two Independent Samplesz Two Approaches for Comparison Confidence Intervals we already know something about CI’s Hypothesis Testing this will be newz What seems like a reasonable way to compare two groups?z What parameter are we trying to estimate?Stat 13, UCLA, Ivo DinovSlide 5Comparison of Two Independent Samplesz RECALL: The sampling distribution of was centered atμ, and had a standard deviation ofz We’ll start by describing the sampling distribution of Mean: μ1–μ2 Standard deviation of z What seems like appropriate estimates for these quantities?21yy −ynσ222121nnσσ+Stat 13, UCLA, Ivo DinovSlide 6Standard Error ofz We know estimatesz What we need to describe next is the precision of our estimate,21yy −21yy −21μμ−()21yySE−()222122212121SESEnsnsSEyy+=+=−2Stat 13, UCLA, Ivo DinovSlide 7Standard Error ofExample: A study is conducted to quantify the benefits of a new cholesterol lowering medication. Two groups of subjects are compared, those who took the medication twice a day for 3 years, and those who took a placebo. Assume subjects were randomly assigned to either group and that both groups data are normally distributed. Results from the study are shown below:21yy − Medication Placebo y 209.8 224.3 n 10 10 s 44.3 46.2 SE 14.0 14.6 Stat 13, UCLA, Ivo DinovSlide 8Standard Error ofExample: Cholesterol medicine (cont’)(e.g., ftp://ftp.nist.gov/pub/dataplot/other/reference/CHOLEST2.DAT)Calculate an estimate of the true mean difference between treatment groups and this estimate’s precision. First, denote medication as group 1 and placebo as group 221yy − Medication Placebo y 209.8 224.3 n 10 10 s 44.3 46.2 SE 14.0 14.6 ()5.143.2248.20921−=−=−yy()24.20102.46103.442222212121=+=+=−nsnsSEyyStat 13, UCLA, Ivo DinovSlide 9Pooled vs. Unpooledz is know as an unpooled version of the standard error there is also a “pooled” SEz First we describe a “pooled” variance, which can be thought of as a weighted average of and 222121nsns+21s22s()()211212222112−+−+−=nnsnsnspooledStat 13, UCLA, Ivo DinovSlide 10Pooled vs. Unpooledz Then we use the pooled variance to calculate the pooled version of the standard error NOTE: If (n1= n2) and (s1= s2) the pooled and unpooled will give the same answer for It is when n1n2that we need to decide whether to use pooled or unpooled: if then use pooled (unpooled will give similar answer) if then use unpooled (pooled will NOT give similar answer) ⎟⎟⎠⎞⎜⎜⎝⎛+=21211nnsSEpooledpooled()21yySE−≠21ss =21ss ≠Stat 13, UCLA, Ivo DinovSlide 11Pooled vs. Unpooledz RESULT: Because both methods are similar when s1=s2and n1=n2, and the pooled version is not valid whenz Why all the torture? This will come up again in chapter 11.zBecause the df increases a great deal when we do pool the variance.Stat 13, UCLA, Ivo DinovSlide 12CI for μ1-μ2z RECALL: We described a CI earlier as:the estimate + (an appropriate multiplier)x(SE)z A 100(1-α)% confidence interval for μ1-μ2(p.227)where df = ()()21221)(yySEdftyy−±−α()() ()1124214122221−+−+nSEnSESESE3Stat 13, UCLA, Ivo DinovSlide 13Example: Cholesterol medication (cont’)Calculate a 95% confidence interval for μ1-μ2We know and from the previous slides. Now we need to find the t multiplierNOTE: Calculating that df is not really that fun, a quick rule of thumb for checking your work is: n1+ n2-2()21yySE−21yy −()() ()1797.17021.93179056.1674111106.14110146.141444222≈==−+−+=dfRound down to be conservativeCI for μ1-μ2Stat 13, UCLA, Ivo DinovSlide 14()())21.28 ,21.57()24.20(110.25.14)24.20()17(5.14)(025.022121−=±−=±−=±−−tSEdftyyyyαCONCLUSION: We are highly confident at the 0.05 level, that the true mean differencein cholesterol between the medication and placebo groups is between -57.02 and 28.02 mg/dL.Note the change in the conclusion of the parameter that we are estimating. Still looking for the 5 basic parts of a CI conclusion (see slide 38 of lecture set 5).CI for μ1-μ2Stat 13, UCLA, Ivo DinovSlide 15z What’s so great about this type of confidence interval?z In the previous example our CI contained zero This interval isn't telling us much because: the true mean difference could be more than zero (in which case the mean of group 1 is larger than the mean of group 2) or the true mean difference could be less than zero (in which case the mean of group 1 is smaller than the mean of group 2) or the true mean difference could even be zero! The ZERO RULE! Suppose the CI came out to be (5.2, 28.1), would this indicate a true mean difference?CI for μ1-μ2Stat 13, UCLA, Ivo DinovSlide 16Hypothesis Testing: The independent t testz The idea of a hypothesis test is to formulate a hypothesis that nothing is going on and then to see if collected data is consistent with this hypothesis (or if the data shows something different) Like innocent until proven guiltyz There are four main parts to a hypothesis test: hypotheses test statistic p-value conclusionStat 13, UCLA, Ivo DinovSlide 17Hypothesis Testing: #1 The Hypothesesz There are two hypotheses: Null hypothesis (aka the “status quo” hypothesis) denoted by Ho Alternative hypothesis (aka the research hypothesis) denoted by HaStat 13, UCLA, Ivo DinovSlide 18Hypothesis Testing: #1 The Hypothesesz If we are comparing two group means nothing going on would imply no difference the means are "the same" z For the independent t-test the hypotheses are: Ho: (no statistical difference in the population means)Ha: (a statistical difference in the population
View Full Document