Solve this problem using the seven-step procedure.
1. Parameter of Interest: The parameters of interest are the mean mileage for the two brands of gasoline, say μA and μB, and we are interested in determining whether μA - μB = 0.
2. Null hypothesis: H0: μA = μB
3. Alternative hypothesis: H1: μB > μA
4. Test Statistic: The test statistic is
t0* = ( (x̄1 - x̄2 - 0) / √(s1^2/n1 + s2^2/n2) )
5. Reject H0 if:
Using P-value:
Reject H0: μA = μB if the P-value is less than 0.05.
Using fixed significance level:
Compute the degrees of freedom, v.
#v
mB=20.2; mA=19.6; sB=0.6; sA=0.4; nB=16; nA=16
v<- ( (sB^2/nB + sA^2/nA)^2 )/( (sB^2/nB)^2/(nB-1) + (sA^2/nA)^2/(nA-1) )
v
## [1] 26.13402
Compute the critical value.
#critical value
qt(p=.05, df=v, lower.tail = FALSE)
## [1] 1.705295
Using α = 0.05 and a fixed significance level test, we would reject H0: μA = μB if t0* > 1.705295.
6. Computations:
#t0*
t.test.fromSummaryStats <- function(mu,n,s)
{
-diff(mu) / sqrt( sum( s^2/n ) )
}
mu <- c(20.2,19.6)
n <- c(16,16)
s <- c(.6,.4)
t.test.fromSummaryStats(mu,n,s)
## [1] 3.328201
t0* = 3.328201
#p-value
pt(3.328201, v, lower.tail=FALSE)
## [1] 0.001302689
P-value: P = 0.001302689
7. Conclusion:
Using P-value:
Since the p-value, 0.001302689, is less than 0.05, we reject H0: μA = μB at the 0.05 level of significance.
Using fixed significance level:
Since t0* = 3.328201 > 1.705295, we reject H0: μA = μB at the 0.05 level of significance.
Practical Interpretation:
There is strong evidence to conclude that the mileage of B is significantly better than that of A.