150 likes | 275 Views
Class 14. Testing Hypotheses about Means Paired samples. 10.3 p 419-425. Weight (in pounds) of 72 anorexic patients before and after treatment. Data/Data Analysis/ Descriptive Statistics/Summary Statistics and Confidence Level for Mean. s/n^.5 7.9/72^.5.
E N D
Class 14 Testing Hypotheses about Means Paired samples 10.3 p 419-425
Weight (in pounds) of 72 anorexic patients before and after treatment
Data/Data Analysis/Descriptive Statistics/Summary Statistics and Confidence Level for Mean s/n^.5 7.9/72^.5 82.36 +/- 1.218 is the 95% confidence interval for the mean.
Test Statistic H0: μb = μa Ha: μa > μb P-value = t.dist.rt(2.40,142) = 0.0088
H0: μb = μa Ha: μa > μb Data must be in two columns. Same as previous slide! If this is all you want, =t.test() is for you!
The 2-sample t-test we just did is VALID. But we can do better….. By taking advantage of our paired data.
Paired Data • n1 must equal n2 • For each of the before values, there must be a corresponding after value for the same element. • Here the data elements are the patients. And the paired nature of the data is OBVIOUS. • Using a paired test when the data are paired USUALLY leads to a valid and LOWER p-value. • Because s1 and s2 (the standard deviations of each group) do NOT enter into the “equation” • Instead, we use the sample standard deviation of the n differences…which is usually “pretty” small. • Instead of dealing with the variation in weights across the patients (s1 and s2), we deal only with the variation in pounds gained. • 90 to 92 and 45 to 47 are both gains of 2.
H0: μb = μa Ha: μa > μb Better than before!
1 for 1-tail 1 for paired H0: μb = μa The = t.dist(array1,array2,1,1) takes you directly to the p-value Ha: μa > μb If all you want is the p-value…..
H0: μb = μa Ha: μa > μb A paired two-sample t-test for means Is equivalent to A one-sample t-test of H0: μA-B = 0. 2.68/.92
Test Statistic H0: Ha: P-value and Conclusion