10.2.39 pooled t-test two-tailed
Provided below are summary statistics for independent simple random samples from two populations. Use the pooled t-test and the pooled t-interval procedure to conduct the required hypothesis test and obtain the specified confidence interval.
\(\bar x_{1} = 15, s_1=2.3, n_1=15\)
\(\bar x_{2} = 16, s_2=2.2, n_2=15\)
(a). First, what are the correct hypotheses for a two-tailed test?
Since it is a two tailed test, the correct hypothese is
\(H_0: \mu_1 =\mu_2\)
\(H_a: \mu_1 \neq \mu_2\)

Next, compute the test statistic. (Round to three decimal places as needed.)
First, we need to get the data from the question
= 15
x1 = 2.3
s1 = 15
n1 = 16
x2 = 2.2
s2 = 15 n2
This is a pooled t-test, to compute pooled sample standard deviation we use the formula \(s_p= \frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}\)
= sqrt( ( (n1-1)*s1^2 + (n2-1)*s2^2 )/ (n1+n2-2) )
sp sp
## [1] 2.250555
To get the test statistic t we use the formular \(t= \frac{\bar x_1-\bar x_2}{s_p \sqrt{1/n_1+1/n_2}}\), we run
= (x1-x2)/(sp*sqrt(1/n1+1/n2))
t t
## [1] -1.216861
Round the answer to three decimal places
round(t,3)
## [1] -1.217

Now determine the critical values. (Round to three decimal places as needed.)
We need to find degree of freedom
= n1+n2-2 deg
Since this is a two-tailed test and \(\alpha = .01\), the area to the left of a negative critical value is equal to \(\alpha/2\)
= .01
alpha = abs(qt(alpha/2,deg))
t_critical t_critical
## [1] 2.763262
Round the answer to three decimal places
round(t_critical,3)
## [1] 2.763

Since our test statistic t = -1.217 > our negative critical value \(t_{\alpha/2}\) = -2.763 and < our positive critical value \(t_{\alpha/2}\) = 2.763, out test statistic does not lie in the rejected region. So we do not have enough evidence to reject null hypothesis.

(b) The 99% confidence interval is from… to…(Round to three decimal places as needed.)
99% confidence interval means \(\alpha = .01\) so \(t_{\alpha/2}=t_{critical value}\)
To find confidence interval we use the formular \((\bar x_1 - \bar x_2) \pm t_{\alpha/2}.s_p\sqrt{1/n_1+1/n_2}\)
-x2) - t_critical*sp*sqrt(1/n1+1/n2) (x1
## [1] -3.270812
-x2) + t_critical*sp*sqrt(1/n1+1/n2) (x1
## [1] 1.270812
Round to three decimal places
round((x1-x2) - t_critical*sp*sqrt(1/n1+1/n2),3)
## [1] -3.271
round((x1-x2) + t_critical*sp*sqrt(1/n1+1/n2),3)
## [1] 1.271
We finish a lot of complicated work by using R

Hope that helps!