The life in hours of a battery is known to be approximately normally distributed with standard deviation σ = 1.25 hours. A random sample of 10 batteries has a mean life of x̄ = 40.5 hours.


A. Is there evidence to support the claim that battery life exceeds 40 hours? Use α = 0.05.

Solve this problem using the seven-step procedure.

1. Parameter of Interest: The parameter of interest is μ, the mean battery life in hours.

2. Null hypothesis, H0: H0: μ = 40 hours

3. Alternative hypothesis, H1: H1: μ > 40 hours

4. Test Statistic: The test statistic is

z0 = (x̄ - μ0) / ( σ / √n )

5. Reject H0 if:

Using P-value:

Reject H0: μ = 40 if the P-value is less than 0.05.

Using fixed significance level:

Compute the critical value at 0.05 significance level.

#critical value
qnorm(p=.05, lower.tail=FALSE)
## [1] 1.644854

Using α = 0.05 and a fixed significance level test, we would reject H0: μ = 40 if z0 > 1.644854.

6. Computations: Since x̄ = 40.5 and σ = 1.25,

#z0
z0 <- (40.5 - 40) / (1.25 / sqrt(10))
z0
## [1] 1.264911

z0 = 1.264911

#p-value
pnorm(q=z0, lower.tail=FALSE)
## [1] 0.1029516

P-value: P = 0.1029516

7. Conclusion:

Using fixed significance level:

Since the test statistic 1.264911 is less than the critical value of 1.644854, we accept Ho:μ = 40 at the 0.05 level of significance.

Using P-value:

Since the p-value, 0.1029516, is greater than 0.05, we accept H0: μ = 40 at the 0.05 level of significance.

Practical Interpretation:

We conclude that there is no strong evidence to support the claim that the battery life exceeds 40 hours. Based on a sample of 10 batteries, the mean battery life is 40 hours.


B.What is the P-value for the test in part A?

The P-value is given by

pnorm(q=z0, lower.tail=FALSE)
## [1] 0.1029516

P = 0.1029516

The p-value for the test in part A is 0.1029516.


C. What is the β-error for the text in part B if the true mean life is 42 hours?

We begin with computing the standard deviation of the mean, sem.

n = 10               # sample size 
sigma = 1.25          # population standard deviation 
sem = sigma/sqrt(n); sem   # standard error 
## [1] 0.3952847

We next compute the upper bound of sample means for which the null hypothesis μ = 40 would not be rejected.

alpha = .05; mu0 = 40               # hypothetical upper bound 
q = qnorm(alpha, mean=mu0, sd=sem, lower.tail=FALSE); q 
## [1] 40.65019

Therefore, so long as the sample mean is less than 40.65019 in a hypothesis test, the null hypothesis will not be rejected. Since we assume that the actual population mean is 42, we can compute the probability of the sample mean below 40.65019, and thus found the probability of type II error.

mu = 42           # assumed actual mean 
pnorm(q, mean=mu, sd=sem) 
## [1] 0.0003191553

β-error = 0.0003191553

The probability is 0.0003191553 that this difference from 40 hours will not be detected. That is, the probability is 0.0003191553 that the test will fail to reject the null hypothesis when the true mean life is 42 hours.

Practical Interpretation: A sample size of n = 10 results in great power = 1 - β = 1 - 0.0003191553 = 0.9996808447.


D. What sample size would be required to ensure that β does not exceed 0.10 if the true mean is 44 hours?

Note that σ = 1.25, δ = 44-40 = 4, α = 0.05, and β = 0.10.

#zα
zα <-qnorm(p=.05, lower.tail=FALSE)
zα
## [1] 1.644854
#zβ
zβ <-qnorm(p=.10, lower.tail=FALSE)
zβ
## [1] 1.281552

Since zα = 1.644854 and zβ = 1.281552, the sample size required to detect this departure from Ho: μ = 40 is

#sample size
zα = zα; zβ = zβ; σ = 1.25; δ = 4
n <- ( ( (zα + zβ)^2 * σ^2) / δ^2 )
n
## [1] 0.8363132

n = 0.8363132 ≈ 1

To achieve a much lower power of 0.90, a sample size, n = 1, would be required.


E. Explain how could you answer the question in part A by calculating an appropriate confidence bound on battery life.

Parameter of Interest: The parameter of interest is μ, the mean battery life in hours.

Null hypothesis, H0: H0: μ = 40 hours

Alternative hypothesis, H1: H1: μ > 40 hours

A 95% Confidence Interval for the Mean Battery Life (Upper-Tailed Test)

Step 1. γ = 0.95

Step 2. c = 1.644854

#c
c<-qnorm(p=.05, lower.tail=FALSE)
c
## [1] 1.644854

Step 3. x̄ = 40.5

Step 4. k = 0.6501855

#k
xbar = 40.5; σ = 1.25; n = 10
k <-(c * σ / sqrt(n))
k
## [1] 0.6501855

CONF0.95{μ ≤ 41.15019}

#upper bound
upper.bound <-(xbar + c * σ / sqrt(n))
upper.bound
## [1] 41.15019

Conclusion:

Since 40 is part of the confidence interval, we fail to reject the null hypothesis. There is no enough evidence to support the claim that battery life exceeds 40 hours.