Question #120457

2. The mean life time of a sample of 400 fluorescent light bulbs produced by a company is found to be 1,570 hours with a standard deviation of 150 hours. Develop an R-code to test the hypothesis that the mean life time of bulbs is 1600 hours against the alternative hypothesis that it is greater than 1,600 hours at 1% and 5% levels of significance. Draw your conclusions with the results.

Expert's answer

xbar=1570

mu0=1600

sigma=150

n=400

z=(xbar-mu0)/(sigma/sqrt(n))

z

# We then compute the critical value at .05 significance level.

alpha=.05

z.alpha=qnorm(1-alpha)

-z.alpha

# Interpretation:

# The test statistic -4 is less than the critical value of -1.6449. Hence, at .05 significance level, we reject the claim that mean lifetime of a light bulb is above 1600 hours.

alpha=.01

z.alpha=qnorm(1-alpha)

-z.alpha

#Interpretation: The test statistic -4 is less than the critical value of -2.3263. Hence, at .01 significance level, we reject the claim that mean lifetime of a light bulb is above 1600 hours.



LATEST TUTORIALS
APPROVED BY CLIENTS