x <- seq(25, 55, length=500)
y <- dnorm(x, mean = 40, sd = 1.25)
plot(x,y, main = "The Normal Distribution of the Life in Hours of Batteries", col = "green",type="l")
\[๐=1.25 hours \\ n = 10 batteries \\ \overline {x} = 40.5 hours \\ ๐ผ= 0.05 \]
In this question, we are asked to know whether the battery life exceeds 40 hours. Based on the given in the problem, we know that the life in hours of a battery is approximately normally distributed with a standard deviation of ๐=1.25 hours.
First we must specify the null and alternative hypothesis. The null hypothesis (Ho) is said to be a statement of no effect, relationship, or difference between groups or factors. On the other hand, the alternative hypothesis (H1) is the statement that signifies that there is an effect or difference [1].
With this definition, we can say that the null hypothesis is when ฮผ is less than or equal to 40 since this states that there is no difference. In other words, it says that the battery life cannot exceed 40 hours. We are actually trying to disprove this null hypothesis. Given this, our alternative hypothesis is that ฮผ is greater than 40.
\[H_o: \mu โค 40 \\ H_1: \mu > 40\]
Now that we have our null and alternative hypothesis, we must now determine the test statistic value. The formula we should use is the z-test formula:
\[Z = \frac{\overline {x} -\mu}{๐/โn}\]
Inputting our values,
\[ Z = \frac{40.5 -40}{1.25/โ10} = 1.265 \]
Now, we have to calculate our p-value. We know that this is a right-tailed test.
\[ P(Z>1.265)= 1-P(Z<1.265) \\ = 1-0.897 \\ =0.1029\]
We can then see that the test statistic we have solved for is greater than our critical value.
\[1.265 > 0.1029\]
Final answer: We now have evidence to fail to reject the null hypothesis. We can conclude that there is no enough evidence to support the claims that the battery life exceeds 40 hours.
We know that our alternative hypothesis from Part A is a right tailed test since the hypothesis contains a greater than (>) symbol. \[ P(Z>1.265)= 1-P(Z<1.265) \\ = 1-0.897 \\ =0.1029\]
Final answer: The p-value for the test in part A is 0.1029.
We will use this formula to find the ๐ฝ-error:
\[\beta = P (Z < Z_\alpha- \frac{(x -\mu) \sqrt{n}}{๐})\]
We know that Z๐ผ= 1.645. Inputting our values:
\[\beta = P (Z < 1.645- \frac{(42-40) \sqrt{10}}{1.25}) \\ = P( Z < 1.645 - 5.059644256 ) \\ = P ( Z < -3.414790256) โ 0.000326\]
Final answer: The value of the ๐ฝ-error if the true mean life is 42 hours is 0.000326.
We know that this is a type II error and our goal is to make sure that it does not exceed 0.10 if the true mean is 44 hours.
We will be using this formula to get the sample size:
\[ n = \frac{(Z_\alpha + Z_\beta)^2 \sigma^2}{(x - \mu)^2}\]
Since we want ฮฒ to be less than 1,
\[ Z_(1-0.1) โ 1.282 \] Inputting these values,
\[ n = \frac{(1.645 + 1.282)^2 1.25^2}{(44 - 40)^2} \\ n = 0.8366532227 โ 1 \]
Final answer: The sample size required to ensure that ๐ฝ does not exceed 0.10 if the true mean is 44 hours is 1.
We will be using this formula:
\[ \overline{x} \pm \frac{Z_a \sigma}{\sqrt {n}} \] When we input the values,
\[ 40.5 + \frac{(1.645) (1.25)}{\sqrt {10}} \\ = 41.15024334 โ 41.15\]
Our confidence interval will be
\[ \\ (-\infty , 41.15) \]
Final answer: 40.5 is within the confidence interval. Therefore, we do not have enough evidence to reject the null hypothesis.
[1] โHypothesis Testing,โ NEDARC. [Online]. Available: https://www.nedarc.org/statisticalhelp/advancedstatisticaltopics/hypothesisTesting.html.
[2] N. Tierney, โRMarkdown for Scientists,โ 11 Math, 09-Sep-2020. [Online]. Available: https://rmd4sci.njtierney.com/math.
[3] R. Pruim, Mathematics in R Markdown, 19-Oct-2016. [Online]. Available: https://rpruim.github.io/s341/S19/from-class/MathinRmd.html.