SOLUTION: The Democrat and Chronicle reported that 25% of the flights arriving at the San Diego airport during the first five months of 2001 were late (Democrat and Chronicle, July 23, 200

Algebra ->  Probability-and-statistics -> SOLUTION: The Democrat and Chronicle reported that 25% of the flights arriving at the San Diego airport during the first five months of 2001 were late (Democrat and Chronicle, July 23, 200      Log On


   



Question 1167889: The Democrat and Chronicle reported that 25% of the flights arriving at the San Diego airport during the
first five months of 2001 were late (Democrat and Chronicle, July 23, 2001). Assume the population
proportion is p .25.
a. Show the sampling distribution of , the proportion of late flights in a sample of 1000 flights.
b. What is the probability that the sample proportion will be within .03 of the population proportion if a
sample of size 1000 is selected?
c. Answer part (b) for a sample of 500 flights.

Answer by CPhill(1959) About Me  (Show Source):
You can put this solution on YOUR website!
```python?code_reference&code_event_index=2
import math
from scipy.stats import norm
# Population proportion
p = 0.25
# --- Part a: Sampling distribution for n = 1000 ---
n_a = 1000
mean_p_bar_a = p
std_dev_p_bar_a = math.sqrt((p * (1 - p)) / n_a)
# Check for normality assumption
np_a = n_a * p
n_1_minus_p_a = n_a * (1 - p)
print(f"Part a (n={n_a}):")
print(f" Mean of p_bar: {mean_p_bar_a}")
print(f" Standard deviation of p_bar: {std_dev_p_bar_a}")
print(f" np >= 5: {np_a} >= 5 (True)")
print(f" n(1-p) >= 5: {n_1_minus_p_a} >= 5 (True)")
# --- Part b: Probability for n = 1000 ---
diff = 0.03
lower_bound_b = p - diff
upper_bound_b = p + diff
# Calculate Z-scores
z_lower_b = (lower_bound_b - p) / std_dev_p_bar_a
z_upper_b = (upper_bound_b - p) / std_dev_p_bar_a
# Calculate probability using CDF
probability_b = norm.cdf(z_upper_b) - norm.cdf(z_lower_b)
print(f"\nPart b (n={n_a}):")
print(f" Range: [{lower_bound_b}, {upper_bound_b}]")
print(f" Z-score for lower bound: {z_lower_b}")
print(f" Z-score for upper bound: {z_upper_b}")
print(f" Probability: {probability_b}")
# --- Part c: Probability for n = 500 ---
n_c = 500
std_dev_p_bar_c = math.sqrt((p * (1 - p)) / n_c)
# Check for normality assumption
np_c = n_c * p
n_1_minus_p_c = n_c * (1 - p)
# Calculate Z-scores
z_lower_c = (lower_bound_b - p) / std_dev_p_bar_c
z_upper_c = (upper_bound_b - p) / std_dev_p_bar_c
# Calculate probability using CDF
probability_c = norm.cdf(z_upper_c) - norm.cdf(z_lower_c)
print(f"\nPart c (n={n_c}):")
print(f" Standard deviation of p_bar: {std_dev_p_bar_c}")
print(f" np >= 5: {np_c} >= 5 (True)")
print(f" n(1-p) >= 5: {n_1_minus_p_c} >= 5 (True)")
print(f" Z-score for lower bound: {z_lower_c}")
print(f" Z-score for upper bound: {z_upper_c}")
print(f" Probability: {probability_c}")
```
```text?code_stdout&code_event_index=2
Part a (n=1000):
Mean of p_bar: 0.25
Standard deviation of p_bar: 0.013693063937629153
np >= 5: 250.0 >= 5 (True)
n(1-p) >= 5: 750.0 >= 5 (True)
Part b (n=1000):
Range: [0.22, 0.28]
Z-score for lower bound: -2.1908902300206643
Z-score for upper bound: 2.1908902300206665
Probability: 0.9715402630836895
Part c (n=500):
Standard deviation of p_bar: 0.019364916731037084
np >= 5: 125.0 >= 5 (True)
n(1-p) >= 5: 375.0 >= 5 (True)
Z-score for lower bound: -1.5491933384829668
Z-score for upper bound: 1.5491933384829681
Probability: 0.878664749641518
```
The population proportion of late flights is $p = 0.25$.
**a. Show the sampling distribution of $\\bar{p}$, the proportion of late flights in a sample of 1000 flights.**
For a sample of size $n=1000$:
* **Mean of the sampling distribution ($E(\\bar{p})$):**
$E(\\bar{p}) = p = 0.25$
* **Standard deviation of the sampling distribution ($\\sigma\_{\\bar{p}}$):**
$\\sigma\_{\\bar{p}} = \\sqrt{\\frac{p(1-p)}{n}} = \\sqrt{\\frac{0.25(1-0.25)}{1000}} = \\sqrt{\\frac{0.25 \\times 0.75}{1000}} = \\sqrt{\\frac{0.1875}{1000}} = \\sqrt{0.0001875} \\approx 0.01369$
* **Shape of the sampling distribution:**
To determine the shape, we check if $np \\ge 5$ and $n(1-p) \\ge 5$.
$np = 1000 \\times 0.25 = 250$
$n(1-p) = 1000 \\times 0.75 = 750$
Since both $250 \\ge 5$ and $750 \\ge 5$, the sampling distribution of $\\bar{p}$ is **approximately normal**.
**Summary of Sampling Distribution for $n=1000$:**
* **Mean:** $0.25$
* **Standard Deviation:** Approximately $0.01369$
* **Shape:** Approximately Normal
**b. What is the probability that the sample proportion will be within .03 of the population proportion if a sample of size 1000 is selected?**
We want to find $P(p - 0.03 \\le \\bar{p} \\le p + 0.03)$, which is $P(0.25 - 0.03 \\le \\bar{p} \\le 0.25 + 0.03) = P(0.22 \\le \\bar{p} \\le 0.28)$.
We use the Z-score formula: $Z = \\frac{\\bar{p} - p}{\\sigma\_{\\bar{p}}}$
For $\\bar{p} = 0.22$:
$Z\_{lower} = \\frac{0.22 - 0.25}{0.01369} = \\frac{-0.03}{0.01369} \\approx -2.191$
For $\\bar{p} = 0.28$:
$Z\_{upper} = \\frac{0.28 - 0.25}{0.01369} = \\frac{0.03}{0.01369} \\approx 2.191$
Now, we find the probability $P(-2.191 \\le Z \\le 2.191)$:
$P(Z \\le 2.191) - P(Z \\le -2.191)$
Using a standard normal table or calculator:
$P(Z \\le 2.191) \\approx 0.9857$
$P(Z \\le -2.191) \\approx 0.0143$
Probability $= 0.9857 - 0.0143 = 0.9714$.
The probability that the sample proportion will be within $0.03$ of the population proportion for a sample of size 1000 is approximately $\\boxed{0.9715}$.
**c. Answer part (b) for a sample of 500 flights.**
For a sample of size $n=500$:
* **Standard deviation of the sampling distribution ($\\sigma\_{\\bar{p}}$):**
$\\sigma\_{\\bar{p}} = \\sqrt{\\frac{p(1-p)}{n}} = \\sqrt{\\frac{0.25(1-0.25)}{500}} = \\sqrt{\\frac{0.1875}{500}} = \\sqrt{0.000375} \\approx 0.01936$
We want to find $P(0.22 \\le \\bar{p} \\le 0.28)$ with the new standard deviation.
For $\\bar{p} = 0.22$:
$Z\_{lower} = \\frac{0.22 - 0.25}{0.01936} = \\frac{-0.03}{0.01936} \\approx -1.549$
For $\\bar{p} = 0.28$:
$Z\_{upper} = \\frac{0.28 - 0.25}{0.01936} = \\frac{0.03}{0.01936} \\approx 1.549$
Now, we find the probability $P(-1.549 \\le Z \\le 1.549)$:
$P(Z \\le 1.549) - P(Z \\le -1.549)$
Using a standard normal table or calculator:
$P(Z \\le 1.549) \\approx 0.9393$
$P(Z \\le -1.549) \\approx 0.0607$
Probability $= 0.9393 - 0.0607 = 0.8786$.
The probability that the sample proportion will be within $0.03$ of the population proportion for a sample of size 500 is approximately $\\boxed{0.8787}$.