Is my work correct? (Easy problem, confidence intervals)

59 Views Asked by At

The r.v. $X$ represents the time taken by a computer in company $1$ in order to perform a certain job, and $Y$ represents the same thing but for company $2$. A sample of $n_X = 12$ computers are taken from company $1$, and we obtain: $\bar x = 65$, $s_X ^2 = 279$. A sample of $n_Y = 8$ computers are taken from company $2$ and we get $\bar y = 48$, $s_Y ^2 = 224$.

I am required to find a $.95$ confidence interval for the difference between the means of the two populations.

What I did:

Because $\bar x > \bar y$ let's find the C.I for the difference $\mu_X - \mu_Y$. To do this, we note that:

The variances are unknown, and $n_X + n_Y - 2 = 18 \le 30$ is small. Then, we must consider:

$$T = \frac{(\bar X - \bar Y) - (\mu_X - \mu_Y)}{\hat \sigma \sqrt{\frac1{n_X} + \frac1{n_Y}}}$$

Where:

$$\hat \sigma^2 = \frac{n_X S_X ^2 + n_Y S_Y ^2}{n_X + n_Y -2}$$

$T$ has a t-student distribution with degrees of freedom $\nu = n_X + n_Y - 2 = 18$.

$$- t \le T \le t \iff - t \le \frac{(\bar X - \bar Y) - (\mu_X - \mu_Y)}{\hat \sigma \sqrt{\frac1{n_X} + \frac1{n_Y}}} \le t \iff ... \iff \\ (\bar X - \bar Y) - t \hat \sigma \sqrt{\frac1{n_X} + \frac1{n_Y}} \le \mu_X - \mu_Y \le (\bar X - \bar Y) + t \hat \sigma \sqrt{\frac1{n_X} + \frac1{n_Y}}$$

Now we find $t$ from the table, and replace all the known values to get:

C.I $= \left[ 0.457, 33.542 \right]$

I don't care about the part with calculations, but my question is:

Is my work correct?

The next part of the question is asking to find whether we can say the company $1$ has faster computers than company $2$ at a risk $.05$. I know how to do this by testing the hypothesis $\mu_X = \mu_Y$ against $\mu_X > \mu_Y$. But is there a way to do it that makes use of the first part?

1

There are 1 best solutions below

6
On BEST ANSWER

Your formulas seem correct except that the pooled variance estimate should be

$$\hat \sigma^2 = \frac{(n_X-1) S_X ^2 + (n_Y-1) S_Y ^2}{n_X + n_Y -2}.$$

I put your summarized data into Minitab software, with the results below. Without doing the computations myself, it seems to me you are doing the computations correctly. You should re-do them with the corrected formula to see if your 95% CI matches theirs.

 MTB > TwoT 12 65 16.70 8 48 14.97;
 SUBC>   Pooled.

 Two-Sample T-Test and CI 

 Sample   N  Mean  StDev  SE Mean
 1       12  65.0   16.7      4.8
 2        8  48.0   15.0      5.3

 Difference = mu (1) - mu (2)
 Estimate for difference:  17.00
 95% CI for difference:  (1.61, 32.39)
 T-Test of difference = 0 (vs not =): 
    T-Value = 2.32  P-Value = 0.032  DF = 18
 Both use Pooled StDev = 16.0494

If you were testing $H_0: \mu_X = \mu_Y$ against the two-sided alternative $H_a: \mu_X \ne \mu_Y$, then you could conclude directly from the 95% CI that $H_0$ is rejected, because the CI does not contain $0.$

However, because you are testing against a one-sided alternative, I think it is best for you to do the test. (The test shown in the Minitab printout is for the two-sided test. The test statistic (T-value in Minitab), and degrees of freedom will be the same, but the P-value will not be the same.

[Truthfully, you could show that rejecting in the two-sided test implies rejecting in the one-sided test, and in a round about way could logically use the CI as a substitute for the one-sided test, but that may be one logical step too far if you're just starting hypothesis testing.]