Homework 5

Table of Contents

Problem 1

Out of 10001000 welds that have been made on a tower, it is suspected that 15%15\% are defective. To estimate pp, the proportion of defective welds, how many welds must be inspected to have approximately 95%95\% confidence that the maximum error of the estimate of pp is 0.040.04?

Solution.

Since we have a strong prior belief about the true proportion, we may use p^=0.15\widehat{p} = 0.15 in the confidence interval. The confidence interval in question is

p^±zα2p^(1p^)n=p^±1.9600.15(10.15)nstandard error.\widehat{p} \pm z_{\frac{\alpha}{2}} \sqrt{\frac{\widehat{p}\p{1-\widehat{p}}}{n}} = \widehat{p} \pm \underbrace{1.960 \sqrt{\frac{0.15\p{1-0.15}}{n}}}_{\text{standard error}}.

For the standard error of the estimate to be at most 0.040.04, we need to solve

1.9600.15(10.15)n0.04    n(1.9600.04)20.15(10.15)=306.1275.\begin{gathered} 1.960 \sqrt{\frac{0.15\p{1-0.15}}{n}} \leq 0.04 \\ \implies n \geq \p{\frac{1.960}{0.04}}^2 \cdot 0.15\p{1 - 0.15} = 306.1275. \end{gathered}

Thus, the smallest nn that works is

n=307.\boxed{n = 307}.

Problem 2

If X\mean{X} and Y\mean{Y} are the respective means of two independent random samples of the same size nn, find nn if we want xy±4\mean{x} - \mean{y} \pm 4 to be an approximate 90%90\% confidence interval for μXμY\mu_X - \mu_Y. Assume that the standard deviations are known to be σX=15\sigma_X = 15 and σY=25\sigma_Y = 25.

Solution.

The confidence interval will be

xy±zα2σX2n+σY2n=xy±1.645152n+252n.\mean{x} - \mean{y} \pm z_{\frac{\alpha}{2}} \sqrt{\frac{\sigma_X^2}{n} + \frac{\sigma_Y^2}{n}} = \mean{x} - \mean{y} \pm 1.645 \sqrt{\frac{15^2}{n} + \frac{25^2}{n}}.

For xy±4\mean{x} - \mean{y} \pm 4 to be an approximate 90%90\% confidence interval, we need the standard error to be at most 44, so we get

1.645152n+252n4    n(1.6454)2850=143.757578125n=144\begin{gathered} 1.645 \sqrt{\frac{15^2}{n} + \frac{25^2}{n}} \leq 4 \\ \implies n \geq \p{\frac{1.645}{4}}^2 \cdot 850 = 143.757578125 \\ \boxed{n = 144} \end{gathered}

Problem 3

A manufacturer sells a light bulb that has a mean life of 14501450 hours with a standard deviation of 33.733.7 hours. A new manufacturing process is being tested, and there is interest in knowing the mean life of the new bulbs. How large a sample is required so that [x5,x+5]\br{\mean{x} - 5, \mean{x} + 5} is a 95%95\% confidence interval for μ\mu? You may assume that the change in the standard deviation is minimal.

Solution.

Since the change in the standard deviation is minimal, we can use σ=33.7\sigma = 33.7 in the confidence interval and use a normal distribution. Like before, we need the standard error to be at most 55:

z0.025σn5    n(1.9605)21135.69=174.51466816,z_{0.025} \frac{\sigma}{\sqrt{n}} \leq 5 \implies n \geq \p{\frac{1.960}{5}}^2 \cdot 1135.69 = 174.51466816,

so we use

n=175.\boxed{n = 175}.

Problem 4

For a public opinion poll for a close presidential election, let pp denote the proportion of voters who favor candidate AA. How large a sample should be taken if we want the maximum error of the estimate of pp to be equal to

  1. 0.030.03 with approximate 95%95\% confidence?
  2. 0.020.02 with approximate 95%95\% confidence?
Solution.

We have no information or guess on the true parameter pp, so use the upper bound p(1p)14p\p{1 - p} \leq \frac{1}{4}. We can bound

z0.025p(1p)n1.96014n.z_{0.025} \sqrt{\frac{p\p{1 - p}}{n}} \leq 1.960 \sqrt{\frac{1}{4n}}.

To have the maximum error be less than some given ε>0\varepsilon > 0, we need

1.96014nεn(1.960ε)214.\begin{aligned} 1.960\sqrt{\frac{1}{4n}} \leq \varepsilon \\ n \geq \p{\frac{1.960}{\varepsilon}}^2 \cdot \frac{1}{4}. \end{aligned}
  1. In this case, ε=0.03\varepsilon = 0.03, which gives

    n1067.11111111    n=1068.n \geq 1067.11111111 \implies \boxed{n = 1068}.
  2. Similarly, ε=0.02\varepsilon = 0.02, so

    n2401    n=2401.n \geq 2401 \implies \boxed{n = 2401}.

Problem 5

For n=12n = 12 year-20072007 model sedans whose horse-power is between 290290 and 390390, the following measurements give the time in seconds for the car to go from 00 to 60 mph60~\mathrm{mph}:

6.06.35.06.05.75.96.85.55.44.85.45.8\begin{array}{rrrrrrrrrrrr} 6.0 & 6.3 & 5.0 & 6.0 & 5.7 & 5.9 & 6.8 & 5.5 & 5.4 & 4.8 & 5.4 & 5.8 \end{array}
  1. Find a 96.14%96.14\% confidence interval for the median, mm.
  2. The interval (y1,y7)\p{y_1, y_7} could serve as a confidence interval for π0.3\pi_{0.3}. Find it and give its confidence level.
Solution.

First, we need to sort the data to get the sample order statistics y1,,y12y_1, \ldots, y_{12}:

4.85.05.45.45.55.75.85.96.06.06.36.8y1y2y3y4y5y6y7y8y9y10y11y12\begin{array}{rrrrrrrrrrrr} 4.8 & 5.0 & 5.4 & 5.4 & 5.5 & 5.7 & 5.8 & 5.9 & 6.0 & 6.0 & 6.3 & 6.8 \\\hline y_1 & y_2 & y_3 & y_4 & y_5 & y_6 & y_7 & y_8 & y_9 & y_{10} & y_{11} & y_{12} \end{array}
  1. From the textbook (or just from brute force), we know (i,j)=(3,10)\p{i, j} = \p{3, 10} works.

    (y3,y10)=(5.4,6.0)\p{y_3, y_{10}} = \boxed{\p{5.4, 6.0}}
  2. The interval is

    (y1,y7)=(4.8,5.8).\p{y_1, y_7} = \boxed{\p{4.8, 5.8}}.

    The confidence level is the probability the interval (Y1,Y7)\p{Y_1, Y_7} contains π0.3\pi_{0.3}:

    P(Y1<π0.3<Y7)=k=16(12k)(0.3)k(0.7)12k=94.76%\P\p{Y_1 < \pi_{0.3} < Y_7} = \sum_{k=1}^6 \binom{12}{k} \p{0.3}^k \p{0.7}^{12-k} = \boxed{94.76\%}