SOLUTION: ) A brewery has a beer dispensing machine that dispenses beer into the company's 12 ounce bottles. The distribution for the amount of beer dispensed by the machine follows a norm

Algebra ->  Probability-and-statistics -> SOLUTION: ) A brewery has a beer dispensing machine that dispenses beer into the company's 12 ounce bottles. The distribution for the amount of beer dispensed by the machine follows a norm      Log On


   



Question 1167319: )
A brewery has a beer dispensing machine that dispenses beer into the company's 12 ounce
bottles. The distribution for the amount of beer dispensed by the machine follows a normal
distribution with a standard deviation of 0.19 ounce. The company can control the mean
amount of beer dispensed by the machine. What value of the mean should the company
use if it wants to guarantee that 98.5% of the bottles contain at least 12 ounces (the amount
on the label)? Round to the nearest thousandth.

Answer by CPhill(1987) About Me  (Show Source):
You can put this solution on YOUR website!
I need to find the mean ($\mu$) of the normal distribution such that $98.5\%$ of the bottles contain at least 12 ounces.
1. **Identify the given values:**
* Target amount ($X$): 12 ounces
* Standard Deviation ($\sigma$): 0.19 ounce
* Probability: $P(X \ge 12) = 0.985$
2. **Translate the probability to a Z-score:**
* If $P(X \ge 12) = 0.985$, then $P(X < 12) = 1 - 0.985 = 0.015$.
* I need to find the Z-score ($z$) corresponding to a cumulative area of $0.015$. Since this is less than 0.5, the Z-score will be negative.
3. **Use the Z-score formula to solve for the mean ($\mu$):**
* The Z-score formula is: $z = \frac{X - \mu}{\sigma}$
* Rearrange to solve for $\mu$: $\mu = X - z\sigma$
I will use the `scipy.stats.norm.ppf` function to find the Z-score corresponding to the cumulative probability of $0.015$.
```python?code_reference&code_event_index=2
import numpy as np
from scipy.stats import norm
# Define parameters
X = 12.0 # Target amount
sigma = 0.19 # Standard deviation
target_prob_lower = 1 - 0.985 # P(X < 12) = 1 - P(X >= 12)
# 1. Find the Z-score corresponding to the lower 1.5% tail
# The Z-score will be negative since the probability is less than 0.5
z_score = norm.ppf(target_prob_lower)
# 2. Use the Z-score formula to solve for the mean (mu)
# Z = (X - mu) / sigma => mu = X - Z * sigma
mu = X - z_score * sigma
# Print results rounded to the nearest thousandth (3 decimal places)
print(f"Target cumulative probability (P(X < 12)): {target_prob_lower}")
print(f"Required Z-score: {z_score:.4f}")
print(f"Calculated Mean (mu): {mu:.4f}")
print(f"Rounded Mean (mu): {mu:.3f}")
```
```text?code_stdout&code_event_index=2
Target cumulative probability (P(X < 12)): 0.015000000000000013
Required Z-score: -2.1701
Calculated Mean (mu): 12.4123
Rounded Mean (mu): 12.412
```
The company should set the mean amount dispensed to **12.412 ounces**.
This calculation ensures that $98.5\%$ of the bottles contain $12$ ounces or more.
### Step-by-Step Derivation
1. **Determine the Left-Tail Probability:**
The requirement is that $98.5\%$ of bottles contain **at least** 12 ounces, meaning $P(X \ge 12) = 0.985$.
This implies that $1.5\%$ of bottles contain **less than** 12 ounces:
$$P(X < 12) = 1 - 0.985 = 0.015$$
2. **Find the Critical Z-score ($z$):**
We need the Z-score corresponding to a cumulative area of $0.015$.
$$z = \text{norm.ppf}(0.015) \approx -2.170$$
This Z-score represents the cutoff point where the dispensing machine has underfilled the bottle.
3. **Calculate the Required Mean ($\mu$):**
We use the Z-score formula and solve for $\mu$:
$$z = \frac{X - \mu}{\sigma}$$
$$\mu = X - z\sigma$$
Substitute the known values ($X=12$, $z \approx -2.1701$, $\sigma=0.19$):
$$\mu = 12 - (-2.1701) \times 0.19$$
$$\mu = 12 + 0.412319$$
$$\mu \approx 12.4123$$
Rounding to the nearest thousandth (3 decimal places):
$$\mu = 12.412 \text{ ounces}$$