problem-8.28

problem-8.28  The assumptions are such that the t-statistic can be used to compute the small p-value. We assume that the population variances are equal.
> xbar1 =79; xbar2 = 110
> n1 = n2 = 250
> s1 = 25; s2 = 20
> sp = sqrt(( (n1-1)*s1^2 + (n2-1)*s2^2 )/(n1+n2-2))
> SE = sp * sqrt(1/n1 + 1/n2)
> T = (xbar1 - xbar2)/SE
> 2 * pt(T, df = n1+n2-2)       # T is negative, two sided
[1] 1.224e-43