Chapter 9 Comparison of Paired Samples Fall 2010 9 1 Introduction Overview In a paired sample design we model the data as if there is a single bucket of balls and each draw from the bucket results in a pair of numbers that we can distinguish as first and second This model applies if there are two measurments on each individual often before and after or if a pair of individuals are sampled together such as twins siblings a matched pair design In a paired design the method of analysis is as follows Take individual differences for each pair Treat the differences as a sample from a single population Structure of the Data The data from a paired design can be tabulated in this form Individual Y1 Y2 di Y1 Y2 1 2 n Mean y 1 y 2 SD s1 s2 The important summary statistics are d sd s Pn d i 1 di n y 1 y 2 and sd Pn d 2 n 1 i 1 di 9 2 Paired Sample t Test and Confidence Interval Confidence Intervals The population mean difference is represented by d The following confidence interval formula for d is derived assuming that the population of differences has a normal distribution sd sd d t 2 d d t 2 n n If there are n pairs there are n 1 degrees of freedom and the area between t 2 and t 2 is the confidence level 1 often chosen to be 95 Hypothesis Tests For hypothesis tests of the null hypothesis H0 d 0 versus either a one or two sided alternative the test statistic is td d sd n and p values are found by computing areas under t distributions with n 1 degrees of freedom Example Exercise 9 3 Cyclic adenosine monophosphate cAMP is a substance that can mediate celluar response to hormones In a study of maturation of egg cells in frogs oocytes from each of four females were divided into two batches one batch was exposed to progesterone and the other was not After two minutes each batch was assayed for its cAMP content Example cont Summary In an experiment eggs from each of four female frogs are divided into two groups One group of eggs from each frog is treated with progesterone one is not The cAMP level is measured for each group of eggs Frog 1 2 3 4 Mean SD Control 6 01 2 28 1 51 2 12 2 98 2 05 Progesterone 5 23 1 21 1 40 1 38 2 31 1 95 Difference 0 78 1 07 0 11 0 74 0 68 0 40 d population mean decrease in cAMP due to progesterone Example cont Question 1 Find a 95 confidence interval for d 2 Test the hypothesis H0 d 0 3 HA d 6 0 Interpret both results in the context of this setting Example cont Chalkboard Calculations Do the Calculations on the Board Interpretation Confidence Interval We are 95 confident that the mean decrease in cAMP pmol oocyte due to exposure to progesterone for two minutes under the given experimental conditions for eggs sampled from this population of frogs would be between 0 04 and 1 32 Interpretation Hypothesis Testing There is evidence that exposure to progesterone under the experimental conditions causes a change in the mean cAMP levels in this population of frogs two sided paired t test p 0 042 9 4 Sign Test Sign Tests The paired t test assumes that differences are normally distributed If this is not true the Central Limit Theorem can be used to justify that the t test is still valid provided that the sample sizes are large enough As usual how large is large enough depends on the character of the nonnormality in the population The sign test is a nonparametric test that does not depend on a normal assumption for the population of differences To carry out a sign test we ignore the magnitude of differences and just record whether each difference is positive or negative Sign Tests cont P values are then computed from a binomial distribution with p 0 5 Technically the sign test is not testing equality of population means Instead a sign test is testing if the differences are equally likely to be positive versus either a nondirectional or directional alternative Example The compound mCPP is thought to be a hunger supressant In an experiment nine obese men had their weight change kg recored after each of two two week periods once when taking a placebo and once when taking mCPP There was a two week washout period between measurement periods Example Negative values indicate a weight loss A negative difference indicates more weight was lost with mCPP than with the placebo Subject 1 2 3 4 5 6 7 8 9 mCPPP 0 0 1 1 1 6 0 3 1 1 0 9 0 5 0 7 1 2 Placebo 1 1 0 5 0 5 0 0 0 5 1 3 1 4 0 0 0 8 difference 1 1 1 6 2 1 0 3 0 6 2 2 0 9 0 7 0 4 Calculation In the data six of nine men lost more weight while using mCPP than when using the placebo Is this difference significant here consider a one sided test If mCPP had absolutely no effect then we would expect the changes in weight to be random and either treatment would be equally likely to appear better for each individual With this null assumption the number of individuals that lose more weight with mCPP than with a placebo is a binomial random variable with n 9 and p 0 5 If mCPP has an effect we would expect the proportion of men who lose more weight with the drug than with a placebo to be higher than 0 5 Calculation cont The test statistic is the number of negative differences 6 The p value is the probability of obtaining 6 or more successes in 9 independent trials with success probability p 0 5 Here is how to compute this in R p1 sum dbinom 6 9 9 0 5 p1 1 0 2539063 or p1 1 pbinom 5 9 5 p1 1 0 2539063 The sign test test statistic N number of positives 1 N number of negatives nondirectional 1 6 2 Bs max N N 2 1 2 Bs N 3 1 2 Bs N Calculating the p value two sided p 2 IP Y Bs where Y B n 0 5 Calculating the p value one sided Two steps 1 Check directionality see if the data deviate from H0 in the direction specified by HA 1 2 2 If not the p value is greater than 50 If so proceed to Step 2 p IP Y Bs where Y B n 0 5 Example rat experiment 8 rats were given a drug Hemoglobin content of blood was measured before and after the drug Where d ybefore yafter Test whether the drug has an impact on hemoglobin content data summary N 1 and N 7 Chalkboard Calculations The sign test What if there are ties …
View Full Document