
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The process of conducting a two-sample t-test to determine if there is a significant difference between the means of two independent samples from normal distributions with equal population variance. The formula for the pooled estimator of the population variance, the test statistic, and the rejection region. An example is provided to illustrate the application of the test.
Typology: Study notes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Xi ∼ N (μX , σ^2 ) and Yj ∼ N (μY , σ^2 ).
The pooled estimator of σ is
S^2 p = (n − 1)S X^2 + (m − 1)S Y^2 n + m − 2
The test statistic for testing
H 0 : μX = μY vs. H 1 : μX 6 = μY
X¯ − Y¯ − (μX − μY ) Sp
√ 1 /n + 1/m
∼ tn+m− 2.
Reject H 0 if |T | > tα/ 2 ,n+m− 2. Example. A study was conducted to compare the weights of cats and dogs. Weights of cats: 20, 21, 35, 13, 21, 10. Weights of dogs: 31, 10, 20, 40. Assume normality and equal variance for both cats and dogs. Is there any difference between the weights of cats and dogs?
x<-c(20,21,35,13,21,10) y<-c(31,10,20,40) Sp<-sqrt((5var(x)+3var(y))/8) [1] 10. t=(mean(x)-mean(y))/(Sp*sqrt(1/5+1/3)) t [1] -0. qt(0.05,8) [1] -1.
var(x) [1] 75.
var(y) [1] 170. var.test(x,y)
F test to compare two variances
... p-value = 0. alternative hypothesis: true ratio of variance is not equal to 1 95 percent confidence interv 0.02967475 3. sample estimates: ratio of variances
The Welch-Satterthwaite t test is an alternative to the two sample t-test with equal variance, and is used when the assumption that the two populations have equal variances seems unreasonable. The prob- lem with this method is that it is asymptotically a t distribution.
t.test(x,y,alternative="two.sided", conf.level=0.9) Welch Two Sample t-test data:x and y t = -0.7073,df = 4. p-value = 0.5124 alternative hypothesis: true difference in means is not equal to 0 90 percent confidence interval: -20.361647 9.
Review problems. Compute a CI for μX − μY in the previous Example. Example 9.