In: Statistics and Probability
In order to compare two computer software packages, a manager has 15 individuals use each software package to perform a standard set of tasks typical of those encountered in the office. Of course, in carrying out the comparison the manager was careful to use individuals who did not have an established preference of skill with either type of software, and 15 individuals were randomly selected to use software A first while the other 15 used software B first. The time required to perform the standard set of tasks, to the nearest minute, is reported in Table 1. Test the null hypothesis that there is no difference between the mean time required to perform the standard tasks by the two software packages, using the 5% level of significance.
Table:1
Individual |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
Software A |
12 |
16 |
15 |
13 |
16 |
10 |
15 |
17 |
14 |
12 |
13 |
14 |
10 |
11 |
15 |
Software B |
10 |
17 |
18 |
16 |
19 |
12 |
17 |
15 |
17 |
14 |
17 |
11 |
18 |
15 |
13 |
(a) Do you reject the null hypothesis?
(b) What is the p-value of the test?
[Used R-Software]
Two sample t-test is appropriate in this case.
Following calculation of the test statistic can be verified using software:
R-commands and outputs:
A=c(12,16,15,13,16,10,15,17,14,12,13,14,10,11,15)
B=c(10,17,18,16,19,12,17,15,17,14,17,11,18,15,13)# t-test using direct command in
R-Software:
Null hypothesis-H0: (muA-muB)=0 [mean time difference is
zero]
Alternative hypothesis-H1: (muA-muB) not-equal-to 0 [mean time
difference is not equal to zero]
Since, we have to check in both directions i.e. difference either greater than zero or less than zero, it is two-sided test.
t.test(A,B,conf.level=0.95,var.equal=TRUE)
Two Sample t-test
data: A and B
t = -1.9116, df = 28, p-value =
0.06622
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-3.590757 0.124090
sample estimates:
mean of x mean of y
13.53333 15.26667
# t-test
n1=length(A)
n2=length(B)
Abar=mean(A)
Abar
[1] 13.53333
Bbar=mean(B)
Bbar
[1] 15.26667
s1=sd(A)
s1
[1] 2.199567
s2=sd(B)
s2
[1] 2.737743
t=(Abar-Bbar)/sqrt(s1^2/n1+s2^2/n2)
t
[1] -1.911558
###
2*pt(t,df=n1+n2-2) # p-value of the test [multiplied by
'2' as it is t-distribution and two-sided test]
[1] 0.06621746
# p-value(0.0662) is greater than alpha(0.05), we fail to Reject the null hypothesis that mean time difference is zero.
(a) No, we do not reject the null hypothesis.
(b) p-value=0.0662
Assumptions of the test can be verified as:
shapiro.test(A)
Shapiro-Wilk normality test
data: A
W = 0.9508, p-value = 0.5372
shapiro.test(B)
Shapiro-Wilk normality test
data: B
W = 0.92765, p-value = 0.2516
# Both are normally distributed.
# Normality assumption for t-test is satisfied.
# t-statistic is appropriate for testing the hypothesis.
var.test(A,B)
F test to compare two variances
data: A and B
F = 0.64549, num df = 14, denom df = 14, p-value = 0.4229
alternative hypothesis: true ratio of variances is not equal to
1
95 percent confidence interval:
0.2167098 1.9226461
sample estimates:
ratio of variances
0.6454892
# Since p-value is greater than alpha, we fail to Reject the null
hypothesis (variances of two populations [A and B] are
equal).
# Hence, equal variance assumption holds true.