document.write( "Question 1162247: 1. A business owner has designed a pay scale for his employees that follow this distribution, f(x) = (20-x)/50, 10 <= x <= 20. The mean hourly rate at this business is $13.33. If an auditor randomly selects 20 employees from the company, how likely is she to observe an AVERAGE hourly rate above $15.\r
\n" );
document.write( "
\n" );
document.write( "\n" );
document.write( "2. The variable x comes from the mgf, M(t) = 1/(1-nt)^alpha, where n = 2, alpha = 11.5. Find the probability that x is between 14.848 and 32.007. \n" );
document.write( "
Algebra.Com's Answer #854409 by CPhill(2264) You can put this solution on YOUR website! ```python?code_reference&code_event_index=1 \n" ); document.write( "import numpy as np \n" ); document.write( "import scipy.stats as stats\r \n" ); document.write( "\n" ); document.write( "# Problem 1: Sampling distribution of the mean \n" ); document.write( "# f(x) = (20-x)/50, 10 <= x <= 20 \n" ); document.write( "# E[X] = 13.33 (given) \n" ); document.write( "# Var(X) = E[X^2] - (E[X])^2 \n" ); document.write( "# E[X^2] = Integral from 10 to 20 of x^2 * (20-x)/50 dx \n" ); document.write( "# E[X^2] = 1/50 * [20*x^3/3 - x^4/4] from 10 to 20\r \n" ); document.write( "\n" ); document.write( "e_x2 = (1/50) * ((20 * 20**3 / 3 - 20**4 / 4) - (20 * 10**3 / 3 - 10**4 / 4)) \n" ); document.write( "mu = 13.333333333 \n" ); document.write( "var_x = e_x2 - mu**2 \n" ); document.write( "std_x = np.sqrt(var_x)\r \n" ); document.write( "\n" ); document.write( "# CLT parameters \n" ); document.write( "n_samp = 20 \n" ); document.write( "mu_xbar = mu \n" ); document.write( "std_xbar = std_x / np.sqrt(n_samp)\r \n" ); document.write( "\n" ); document.write( "# P(X_bar > 15) \n" ); document.write( "prob_1 = 1 - stats.norm.cdf(15, loc=mu_xbar, scale=std_xbar)\r \n" ); document.write( "\n" ); document.write( "# Problem 2: MGF M(t) = (1 - nt)^-alpha \n" ); document.write( "# This is the MGF of a Gamma distribution with parameters: \n" ); document.write( "# shape (k) = alpha, scale (theta) = n \n" ); document.write( "# Note: Some definitions of Gamma MGF use (1 - beta*t)^-alpha \n" ); document.write( "alpha_val = 11.5 \n" ); document.write( "n_val = 2.0\r \n" ); document.write( "\n" ); document.write( "# P(14.848 < X < 32.007) \n" ); document.write( "prob_2 = stats.gamma.cdf(32.007, a=alpha_val, scale=n_val) - stats.gamma.cdf(14.848, a=alpha_val, scale=n_val)\r \n" ); document.write( "\n" ); document.write( "print(f\"{mu=}, {var_x=}, {std_x=}\") \n" ); document.write( "print(f\"{std_xbar=}\") \n" ); document.write( "print(f\"{prob_1=}\") \n" ); document.write( "print(f\"{prob_2=}\")\r \n" ); document.write( "\n" ); document.write( "``` \n" ); document.write( "```text?code_stdout&code_event_index=1 \n" ); document.write( "mu=13.333333333, var_x=5.555555564444461, std_x=2.35702260584078 \n" ); document.write( "std_xbar=0.5270462771163676 \n" ); document.write( "prob_1=0.0007827011341015044 \n" ); document.write( "prob_2=0.800000547869999\r \n" ); document.write( "\n" ); document.write( "``` \n" ); document.write( "### 1. Sampling Distribution of the Pay Scale \n" ); document.write( "To find the probability that the average hourly rate of 20 employees is above $15, we use the **Central Limit Theorem (CLT)**.\r \n" ); document.write( "\n" ); document.write( "**Step 1: Find the Variance of the Population** \n" ); document.write( "We are given the PDF $f(x) = \frac{20-x}{50}$ for $10 \leq x \leq 20$ and the mean $\mu = 13.33$. We need the variance $\sigma^2$: \n" ); document.write( "$$\sigma^2 = E[X^2] - (E[X])^2$$ \n" ); document.write( "$$E[X^2] = \int_{10}^{20} x^2 \left(\frac{20-x}{50}\right) dx = \frac{1}{50} \left[ \frac{20x^3}{3} - \frac{x^4}{4} \right]_{10}^{20} \approx 183.33$$ \n" ); document.write( "$$\sigma^2 = 183.33 - (13.33)^2 \approx 5.56 \implies \sigma \approx 2.36$$\r \n" ); document.write( "\n" ); document.write( "**Step 2: Parameters for the Sample Mean ($\bar{x}$)** \n" ); document.write( "* **Mean of $\bar{x}$:** $\mu_{\bar{x}} = 13.33$ \n" ); document.write( "* **Standard Error:** $\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}} = \frac{2.36}{\sqrt{20}} \approx 0.527$\r \n" ); document.write( "\n" ); document.write( "**Step 3: Calculate the Z-score and Probability** \n" ); document.write( "$$z = \frac{15 - 13.33}{0.527} \approx 3.17$$ \n" ); document.write( "Using the standard normal table, $P(Z > 3.17) \approx 0.00078$.\r \n" ); document.write( "\n" ); document.write( "**Conclusion:** It is highly unlikely (**0.078%**) that the average rate would be above $15.\r \n" ); document.write( "\n" ); document.write( "---\r \n" ); document.write( "\n" ); document.write( "### 2. Probability from the Moment Generating Function (MGF) \n" ); document.write( "The MGF $M(t) = \frac{1}{(1-nt)^\alpha}$ is the characteristic form of a **Gamma Distribution** where: \n" ); document.write( "* **Shape ($\alpha$):** 11.5 \n" ); document.write( "* **Scale ($\theta$ or $n$):** 2\r \n" ); document.write( "\n" ); document.write( "*(Note: This is also equivalent to a Chi-Squared distribution if $\alpha$ were an integer/half-integer and $n=2$, but here we treat it as a Gamma distribution.)*\r \n" ); document.write( "\n" ); document.write( "**The Calculation:** \n" ); document.write( "We need $P(14.848 < X < 32.007)$ for $X \sim \text{Gamma}(\text{shape}=11.5, \text{scale}=2)$. \n" ); document.write( "Using the Gamma Cumulative Distribution Function (CDF): \n" ); document.write( "* $P(X \leq 32.007) \approx 0.9000$ \n" ); document.write( "* $P(X \leq 14.848) \approx 0.1000$\r \n" ); document.write( "\n" ); document.write( "$$P(14.848 < X < 32.007) = 0.9000 - 0.1000 = 0.8000$$\r \n" ); document.write( "\n" ); document.write( "**Conclusion:** The probability is **0.8000** (or **80%**). \n" ); document.write( " |