Database Reference
In-Depth Information
the t -distribution. The following R code performs the Welch's t -test on the same set
of data analyzed in the earlier Student's t -test example.
t.test(x, y, var.equal=FALSE) # run the Welch's t-test
Welch Two Sample t-test
data: x and y
t = -1.6596, df = 15.118, p-value = 0.1176
alternative hypothesis: true difference in means is not
equal to 0
95 percent confidence interval:
-6.546629 0.812663
sample estimates:
mean of x mean of y
102.2136 105.0806
In this particular example of using Welch's t -test, the p -value is 0.1176, which is
greater than the p -value of 0.08547 observed in the Student's t -test example. In
this case, the null hypothesis would not be rejected at a 0.10 or 0.05 significance
level.
It should be noted that the degrees of freedom calculation is not as straightforward
as in the Student's t -test. In fact, the degrees of freedom calculation often results in
a non-integer value, as in this example. The degrees of freedom for Welch's t -test
is defined in Equation 3.3 .
3.3
In both the Student's and Welch's t -test examples, the R output provides 95%
confidence intervals on the difference of the means. In both examples, the
confidence intervals straddle zero. Regardless of the result of the hypothesis test,
the confidence interval provides an interval estimate of the difference of the
population means, not just a point estimate.
Search WWH ::




Custom Search