You have the right probabilities for each weight range (to two decimal places, anyway,) but you are not combining them in the right way. It doesn't make sense to average them (e.g. if I have a $99.999\%$ chance of not winning the lottery this week and a $0.001\%$ chance of winning the lottery next week, that doesn't mean that I have a $50\%$ chance of winning the lottery on exactly one of the two weeks.)
To get the probability that the event $A$ happens and an independent event $B$ also happens, you multiply the probabilities: $P(A \mathbin{\&} B) = P(A)P(B)$.
So the probability that, out of your eight mice, the first four mice are in the $80$–$100$ gram range, the next two mice have mass $>100$ grams, and the last two mice have mass $<80$ grams, is given by
\begin{align*}\tag{$\ast$}(.34)^4 (.50)^2 (.16)^2.\end{align*}
However, this is not yet the answer to your question. You don't care about the order of the mice; any order is okay. So you have to consider other possibilities, such as the possibility that the first mouse is in the $80$–$100$ gram range, the next two mice have mass $>100$ grams, the two after that have mass $<80$ grams, and the final three again have mass in the $80$–$100$ gram range, giving you the term
\begin{align*}\tag{$\ast\ast$}(.34)(.50)^2 (.16)^2(.34)^3.\end{align*}
There are many different possible orders, corresponding to mutually exclusive events, so to get the total probability that one of them happens you have to add them up: $(\ast) + (\ast\ast) + \cdots$. Fortunately this is not as much work as it seems like, because the order doesn't matter for multiplication. We just have to figure out how many copies of the term $(\ast)$ to add up.
In other words, we have to figure out how many ways to arrange eight mice in a line, where four are in a certain weight range (call it "A"), two are in a second weight range B, and two are in a third weight range C, and we don't distinguish between different mice in the same weight range. So we can think of this as counting the number of words like AAAABBCC, ABBCCAAA, etc. The number of such words is given by
$$N = \frac{8!}{4!\,2! \,2!}.$$
This is because the $8!$ counts the number of ways to arrange 8 letters, and we divide by $4!$, $2!$, and $2!$ because we don't care how the four A's are arranged among themselves, and similarly for the two B's and the two C's. Now to get the final answer we multiply this number $N$ by the probability $(\ast)$.
I don't see how it is possible to calculate a sample standard deviation from the information that is provided in the question, so either:
- there is additional information not stated in the question
- the provided solution is incorrect
- you have misunderstood the provided solution.
The way I would answer the question is as follows. For a sample of $n = 40$ randomly selected drinks, the observed mean volume is $\bar x = 236$ milliliters, which is $4$ milliliters less than the hypothesized mean $\mu = 240$ milliliters. The standard error of the sample mean is $$\sigma_{\bar x} = \frac{\sigma}{\sqrt{n}} = \frac{15}{\sqrt{40}} \approx 2.37171,$$ hence the permissible margin of error is $2\sigma_{\bar x} \approx 4.74342$ milliliters. Since $4$ milliliters does not exceed this margin of error, the machine is not adjusted: $$|\bar x - \mu| \le 2\sigma_{\bar x}.$$
My suspicion is that you have mistaken $\sigma_{\bar x}$ as the sample standard deviation. This would be incorrect because you are given that $\sigma = 15$ milliliters, consequently the sampling distribution of the sample mean for $n = 40$ is approximately normally distributed with mean $\mu$ and standard deviation $\sigma_{\bar x}$. The latter is not a sample standard deviation because it is not a statistic estimated from the sample: it is a value inherited from the known standard deviation of individual drink volumes.
That said, your approach is not materially different because in both cases, an asymptotically normal distribution is assumed for the sampling distribution. You are calculating a $z$-score for the sampling distribution and comparing it against the critical value $2$. In other words, my solution is working on the scale of milliliters; your solution is working on the scale of $z$-scores, which is measured in standard deviations and is unitless.
Best Answer
Many comments, some confusion, maybe no resolution:
Seems to me this is a left-sided, 1-sample t test of $H_0: \mu=40$ against $H_1: \mu < 40$ based on sample mean and standard deviation $\bar X =38, S = 5.8,$ respectively, for $n=64$ random observations from a normal sample. Output from a recent release of Minitab, which accepts summarized data:
I will leave it to you to show how to obtain the $T$ statistic (following @Henry's Comments) and to show that you reject $H_0$ at the 5% level (or even the 1% level).
It is easy to see that $\bar X = 38 < 40.$ You have evidence that it is significantly less than 40, in a statistical sense.
Note: DF$=64-1=63$ for the $T$-statistic. P-value from R statistical software, where
pt
is the CDF of a t-distribution: