An account on server A is more expensive than an account on server B. However, server A is faster. To see whether it's optimal to go with the faster but more expensive server, a manager needs to know how much faster it is . A certain computer algorithm is executed 20 times on server A and 30 times on server B with the following results

Nico Patterson

Nico Patterson

Answered question

2022-11-10

Statistics and confidence - intervals
An account on server A is more expensive than an account on server B. However, server A is faster. To see whether it's optimal to go with the faster but more expensive server, a manager needs to know how much faster it is . A certain computer algorithm is executed 20 times on server A and 30 times on server B with the following results,
S e r v e r A S e r v e r   B Sample means 6.7 min 7.5 min Sample std. dev. 0.6 min 1.2 min
A 95% confidence interval for the difference μ 1 μ 2 between the mean execution times on server A and server B is [-1.4,-0.2] . Is there a significant difference between the two servers?
(a) Use the confidence interval above to conduct a two-sided test at the 1% level of significance.
(b) Compute a p-value of the two-sided test in (a).
(c) Is server A really faster? How strong is the evidence? Formulate the suitable hypothesis and alternative and compute the corresponding p-value.

Answer & Explanation

Houston Ochoa

Houston Ochoa

Beginner2022-11-11Added 19 answers

Step 1
a) X 1 ¯ = 6.7 , s 1 = 0.6 , n 1 = 20
X 2 ¯ = 7.5 , s 2 = 1.2 , n 2 = 30
H 0 : μ 1 = μ 2 , μ 1 μ 2 = 0 H A : μ 1 μ 2
df (degrees of freedom) = 45
t(critical values)= ± 2.686
T(test statistic)= X 1 ¯ X 2 ¯ s t d ( x 1 ¯ X 2 ¯ )
std = V ( X 1 ¯ X 2 ¯ ) = V ( X 1 ¯ ) V ( X 2 ¯ ) = 0.6 2 20 + 1.2 2 30 = 0.018 + 0.048 = 0.66 = 0.256
X 1 ¯ X 2 ¯ = 0.8
T = 0.8 0.256 = 3.112
T = 3.112 is not in the acceptance range of -2.686 and 2.686 so we reject the null hypothesis
b) p v a l u e = P ( T > 3.112 ) + P ( T < 3.112 ) = 2 0.001 = 0.002
0.002 < 0.01 therefore the results show that there is a highly significant difference between the two servers.
c) H 0 : μ 1 = μ 2
H A : μ 1 < μ 2 , μ 1 μ 2 < 0
T = 3.112, α = 0.01, t α = 2.4
p v a l u e = P ( T < 3.112 ) = 1 ( 1 v a l u e O f ( t α ) ) = 1 ( 1 0.001 ) = 1 0.999 = 0.001
0.001 < 0.01 therefore there is highly significant evidence and we reject H 0
Conclusions: From a), b) and c) we can say that there is highly significant evidence that there is a difference between the two servers and that server A is faster than server B.
Demarion Ortega

Demarion Ortega

Beginner2022-11-12Added 2 answers

Step 1
Setup: Assume that both samples
Server A: x 11 , , x 1 n 1 , Server B: x 21 , , x 2 n 2 .
are i.i.d. observations coming from a normal distribution with unknown mean and variance. Here n 1 = 20 and n 2 = 30. This can in short be formulated as x i j are realizations from independent random variables X i j and
X i j N ( μ i , σ i 2 ) , j = 1 , , n i , i = 1 , 2.
Let X ¯ 1 and X ¯ 2 denote the sample means, i.e.
X ¯ i = 1 n i j = 1 n i X i j N ( μ i , σ i 2 n i ) , i = 1 , 2.
Then X ¯ i is estimating the true mean μ i , and the difference of means μ 1 μ 2 is of course estimated by X ¯ 1 X ¯ 2 .
Step 2
Assumption of Equal Variances: We furthermore assume that the variance in the two groups are equal, i.e. σ 1 2 = σ 2 2 and we denote the common variance by just σ 2 . If S i 2 denotes the sample variance of the ith sample, i.e.
S i 2 = 1 n i 1 j = 1 n i ( X i j X ¯ i ) 2 , i = 1 , 2 ,then S 2 = ( n 1 1 ) S 1 2 + ( n 2 1 ) S 2 2 n 1 + n 2 2
is the estimator of the common variance σ 2 . Now one can show that
(1) T = ( X ¯ 1 X ¯ 2 ) ( μ 1 μ 2 ) S 2 ( 1 n 1 + 1 n 2 ) t ( f )
where f = n 1 + n 2 2. Knowing that T follows a t-distribution with f degrees of freedom is exactly what we need in order to find confidence intervals and perform tests.
99% confidence interval: A 99% confidence interval is obtained by manipulating (1) and we obtain that
99 % = P ( X ¯ 1 X ¯ 2 C t 0.995 ( f ) lower bound μ 1 μ 2 X ¯ 1 X ¯ 2 + C t 0.995 ( f ) upper bound )
where t 0.995 ( f ) is the 99.5% fractile of a t-distribution with f degrees of freedom and
C = S 2 ( 1 n 1 + 1 n 2 ) .
Step 3
Hypothesis testing: We wish to test the statistical hypothesis that the two means are equal meaning that Server A and Server B are equally fast. The hypothesis is written as
H : μ 1 = μ 2
and is of course equivalent to testing that μ 1 μ 2 = 0. Under the hypothesis, (1) becomes
(2) T = X ¯ 1 X ¯ 2 S 2 ( 1 n 1 + 1 n 2 ) t ( f )
and as numerically large values are critical for the hypothesis we obtain the p-value
p = 2 ( 1 F t ( f ) ( | T | ) ) ,
where F t ( f ) ( ) denotes the CDF of a t-distribution with f degress of freedom. We accept H if p > 0.01 and reject it if p < 0.01. Checking whether p > 0.01 actually corresponds to checking whether X ¯ 1 X ¯ 2 is in the 99% confidence interval or not.
Model Checking: This answer is based on some crucial assumption which, of course, have to be checked. That this is indeed two i.i.d. samples from normal distributions should of course be checked. Futhermore, the assumption of equal variances should be checked. This can be checked by performing an F-test.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in College Statistics

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?