document.write( "Question 1165346: The manager of a computer retails store is concerned that his suppliers have been giving him laptop computers with lower than average quality. His research shows that replacement times for the model laptop of concern are normally distributed with a mean of 4.2 years and a standard deviation of 0.6 years. He then randomly selects records on 38 laptops sold in the past and finds that the mean replacement time is 3.9 years.\r
\n" ); document.write( "\n" ); document.write( "Assuming that the laptop replacement times have a mean of 4.2 years and a standard deviation of 0.6 years, find the probability that 38 randomly selected laptops will have a mean replacement time of 3.9 years or less.\r
\n" ); document.write( "\n" ); document.write( "P(M < 3.9 years) =\r
\n" ); document.write( "\n" ); document.write( "Enter your answer as a number accurate to 4 decimal places. NOTE: Answers obtained using exact z-scores or z-scores rounded to 3 decimal places are accepted.\r
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #853100 by CPhill(2189)\"\" \"About 
You can put this solution on YOUR website!
```python?code_reference&code_event_index=2
\n" ); document.write( "import numpy as np
\n" ); document.write( "from scipy.stats import norm\r
\n" ); document.write( "\n" ); document.write( "# Population parameters
\n" ); document.write( "mu = 4.2
\n" ); document.write( "sigma = 0.6
\n" ); document.write( "n = 38\r
\n" ); document.write( "\n" ); document.write( "# Sample mean of interest
\n" ); document.write( "x_bar = 3.9\r
\n" ); document.write( "\n" ); document.write( "# 1. Calculate the standard error of the mean (sigma_x_bar)
\n" ); document.write( "sigma_x_bar = sigma / np.sqrt(n)\r
\n" ); document.write( "\n" ); document.write( "# 2. Calculate the Z-score
\n" ); document.write( "Z = (x_bar - mu) / sigma_x_bar\r
\n" ); document.write( "\n" ); document.write( "# 3. Calculate the probability P(M <= 3.9) using the cumulative distribution function (CDF)
\n" ); document.write( "probability = norm.cdf(Z)\r
\n" ); document.write( "\n" ); document.write( "print(f\"Standard Error (sigma_x_bar): {sigma_x_bar}\")
\n" ); document.write( "print(f\"Z-score: {Z}\")
\n" ); document.write( "print(f\"Probability P(M <= 3.9): {probability}\")\r
\n" ); document.write( "\n" ); document.write( "```\r
\n" ); document.write( "\n" ); document.write( "```text?code_stdout&code_event_index=2
\n" ); document.write( "Standard Error (sigma_x_bar): 0.09733285267845752
\n" ); document.write( "Z-score: -3.082207001484491
\n" ); document.write( "Probability P(M <= 3.9): 0.0010273594880658952\r
\n" ); document.write( "\n" ); document.write( "```\r
\n" ); document.write( "\n" ); document.write( "The problem asks for the probability that the mean replacement time ($\bar{X}$) of 38 randomly selected laptops is $3.9$ years or less, given the population mean ($\mu$) is $4.2$ years and the population standard deviation ($\sigma$) is $0.6$ years.\r
\n" ); document.write( "\n" ); document.write( "Since the sample size ($n=38$) is large enough ($n > 30$), we can use the Central Limit Theorem (CLT).\r
\n" ); document.write( "\n" ); document.write( "### 1\. Calculate the Standard Error ($\sigma_{\bar{x}}$)\r
\n" ); document.write( "\n" ); document.write( "The standard deviation of the sample means is the standard error:
\n" ); document.write( "$$\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}} = \frac{0.6}{\sqrt{38}}$$
\n" ); document.write( "$$\sigma_{\bar{x}} \approx 0.09733$$\r
\n" ); document.write( "\n" ); document.write( "### 2\. Calculate the Z-score\r
\n" ); document.write( "\n" ); document.write( "The $Z$-score measures how many standard errors the sample mean is from the population mean:
\n" ); document.write( "$$Z = \frac{\bar{x} - \mu}{\sigma_{\bar{x}}} = \frac{3.9 - 4.2}{0.09733}$$
\n" ); document.write( "$$Z = \frac{-0.3}{0.09733} \approx -3.0822$$\r
\n" ); document.write( "\n" ); document.write( "### 3\. Find the Probability $P(\bar{X} \le 3.9)$\r
\n" ); document.write( "\n" ); document.write( "We look up the area to the left of $Z \approx -3.0822$ in the standard normal table.\r
\n" ); document.write( "\n" ); document.write( "$$P(Z \le -3.0822) \approx 0.001027$$\r
\n" ); document.write( "\n" ); document.write( "Rounding the answer to 4 decimal places:\r
\n" ); document.write( "\n" ); document.write( "$$P(\bar{X} \le 3.9 \text{ years}) = \mathbf{0.0010}$$
\n" ); document.write( "
\n" );