This document is prepared automatically using the following R command.
library(interpretCI) |
An inventor has developed a new, energy-efficient lawn mower engine. He claims that the engine will run continuously for 1950 minutes on a single gallon of regular gasoline. From his stock of 2000 engines, the inventor selects a simple random sample of 9 engines for testing. The engines run for an average of 1970 minutes, with a standard deviation of 70 minutes. Test the null hypothesis that the mean run time less than 1950 minutes against the alternative hypothesis that the mean run time greater than 1950 minutes. Use a 0.05 level of significance. (Assume that run times for the population of engines are normally distributed.) |
This lesson explains how to conduct a hypothesis test of a mean, when the following conditions are met:
The sampling method is simple random sampling.
The sampling distribution is normal or nearly normal.
Generally, the sampling distribution will be approximately normally distributed if any of the following conditions apply.
The population distribution is normal.
The population distribution is symmetric, unimodal, without outliers, and the sample size is 15 or less.
The population distribution is moderately skewed, unimodal, without outliers, and the sample size is between 16 and 40.
The sample size is greater than 40, without outliers.
state the hypotheses
formulate an analysis plan
analyze sample data
interpret results.
The first step is to state the null hypothesis and an alternative hypothesis.
\[Null\ hypothesis(H_0): \mu <= 1950\] \[Alternative\ hypothesis(H_1): \mu > 1950\]
Note that these hypotheses constitute a one-tailed test. The null hypothesis will be rejected if the sample mean is too big..
For this analysis, the significance level is 95%. The test method is a one-sample t-test.
Using sample data, we compute the standard error (SE), degrees of freedom (DF), and the t statistic test statistic (t).
\[SE = \frac{s}{\sqrt{n}} = \frac{70}{\sqrt{9}} = 23.33\] \[DF=n-1=9-1=8\]
\[t = (\bar{x} - \mu) / SE = (1970 - 1950)/23.33 = 0.857\]
where s is the standard deviation of the sample, \(\bar{x}\) is the sample mean, \(\mu\) is the hypothesized population mean, and n is the sample size.
We can visualize the confidence interval of mean.
plot(x)
Since we have a one-tailed test, the P-value is the probability that the t statistic having 8 degrees of freedom is or greater than 0.86.
We use the t Distribution curve to find p value.
draw_t(DF=x$result$DF,t=x$result$t,alternative=x$result$alternative)
\[pt(0.857,8) =0.208 \]
Since the P-value (0.208) is greater than the significance level (0.05), we cannot reject the null hypothesis.
call: meanCI.default(n = 9, m = 1970, mu = 1950, s = 70, alternative = "greater")
method: One sample t-test
alternative hypothesis:
true mean is greater than 1950
Results
# A tibble: 1 × 7
m se DF lower upper t p
<chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 1970 23.333 8 1926.611 Inf 0.85714 0.2082
The contents of this document are modified from StatTrek.com. Berman H.B., “AP Statistics Tutorial”, [online] Available at: https://stattrek.com/hypothesis-test/mean.aspx?tutorial=AP URL[Accessed Data: 1/23/2022].