Mathematics 376 – Probability and Statistics 2 Midterm Examination 2 – Solutions April 21, 2006

I. (20) Let Y_{1}, …, Y_{n} be independent samples from the distribution with pdf containing the unknown parameter θ:

f(y|θ) = \{ \begin{matrix}\frac{1}{θ}y^{1/θ−1} & if 0 < y < 1 \\ 0 & otherwise \end{matrix}

Determine the maximum likelihood estimator for θ using the Y_{i}.

Solution: The log-likelihood function is:

ln(L) = ln (\frac{1}{θ^{n}} (y_{1} … y_{n})^{1/θ−1})

= −n ln(θ) + (1/θ − 1) ∑_{i} ln(y_{i})

So

\begin{aligned}0 = \frac{d}{dθ} ln(L) & = \frac{−n}{θ} − \frac{1}{θ^{2}} ∑_{i} ln(y_{i}) \\ ⇒ θ̂ & = \frac{− ∑_{i} ln(y_{i})}{n} \end{aligned}

(It can be checked that this is a maximum for the likelihood by the second derivative test.)

II. A machine shop manufactures toggle levers. Let d be the proportion of defectives in the shop’s output. A random sample of size n = 150 toggle levers produced 6 defectives. A) (10) Find a 95% confidence interval for d using this information.

Solution: Since n = 150 we use the large sample formula, and z_{.05/2} = 1.96. The confidence interval is

\begin{aligned}d & = \frac{6}{150} ± 1.96\sqrt{\frac{(6/150)(144/150)}{150}} \\ & = .04 ± .03136 \end{aligned}

(Note that this interval contains only positive numbers.)

B) (10) Test the hypothesis H_{0} : d = .1 versus H_{a} : d ≠ .1 using this data. Take α = .02 (probability of Type I error). Also give the p-value of your test.

Solution: Again, since n = 150, we use a z-test. The test statistic is

z = \frac{.04 − .10}{\sqrt{\frac{(.1)(.9)}{150}}} = −2.45

The rejection region for the two-tailed test (H_{a} is d ≠ .1) is

RR = {z : |z| > z_{.01} = 2.33}

So we reject H_{0} at the α = .02 level. The p-value is p = 2(.0071) = .0142 from the standard normal table with z = 2.45.

C) (10) For the test in part B, what is β (probability of Type II error) if the true value of d is .03?

Solution: We find β as follows from T S = _{\frac{Y/n−.01}{\sqrt{\frac{(.1)(.9)}{150}}}} as above, using the fact that d is

really .03 (so Y/n is approximately normal with mean .03 and variance \frac{(.03)(.97)}{150}):

β = P (T S ∉ RR | d = .03)

= P (−2.33 < T S < 2.33 | d = .03) = P (.0429 < Y/n < .1571)

= P (\frac{.0429 − .03}{\sqrt{\frac{(.03)(.97)}{150}}} < z < \frac{.1571 + .03}{\sqrt{\frac{(.03)(.97)}{150}}} )

= P (.9281 < z < 9.144)

= P (z > .9281) − P (z > 9.144) ≐ .1762 − 0 = .1762

III. Consider the following measurements of the heat-producing capacity of the oil produced by two fields (in billions of calories per ton):

Field 1 : 8.26 8.13 8.35 8.07 8.34
Field 2 : 7.95 7.89 7.90 8.14 7.92 7.84

A) (10) Estimate the variance σ^{2} of the heat producing capacity of the oil from each field.

Solution: Use the usual unbiased estimator formula for the sample variance:

s^{2} = \frac{1}{n − 1} ∑_{i=1}^{n}(Y_{i} − \overline{Y})^{2}

This gives

s_{1}^{2} ≐ .01575 s_{2}^{2} ≐ .01092

B) (10) Test the null hypothesis H_{0} : σ_{1}^{2} = σ_{2}^{2} against the alternative H_{a} : σ_{1}^{2} ≠ σ_{2}^{2} at the α = .05 level. State your conclusion clearly and succinctly.

Solution: To test equality of variances, we use an F -test. The test statistic is f = s_{1}^{2}/s_{2}^{2} ≐ 1.44. The rejection region for a test with α = .05 is

{f < f_{.975}(4, 5)} ∪ {f > f_{.025}(4, 5)}

From the F -table we have f_{.025}(4, 5) = 7.39 and f_{.975}(4, 5) = 1/f_{.025}(5, 4) = 1/9.36 = .1068. 1.44 is not in the rejection region, so there is not enough evidence here to indicate that the variances are different.

C) (15) Construct a two-sided 95% confidence interval for the difference of the population mean heat producing capacities μ_{1} − μ_{2}.

Solution: (Under assumption variances equal) we use the pooled estimator

s_{p}^{2} = \frac{(4)(.01575) + (5)(.01092)}{9} = .01307.

Then the confidence interval is

\begin{aligned}\overline{Y_{1}} − \overline{Y_{2}} ± t_{.025}(9)\sqrt{s_{p}^{2}(1/5 + 1/6)} & = 8.23 − 7.94 ± (2.262)\sqrt{(.01307)(1/5 + 1/6)} \\ & = .29 ± .1566 \end{aligned}

IV. (15) Let (x_{i}, y_{i}), i = 1, …, n be a collection of data points. Using the matrix formulation, derive the normal equations for the least squares estimators for the coefficients β_{0}, β_{1} in the model Y = β_{0} + β_{1}x + ε fitting the data.

Solution: We have

X = ( \begin{matrix}1 & x_{1} \\ 1 & x_{2} \\ ⋮ & ⋮ \\ 1 & x_{n} \end{matrix} ) Y = ( y_{1} ; y_{2} ; ⋮ ; y_{n} )

So the normal equations are

\begin{aligned}X^{t}Xβ & = X^{t}Y \\ ( \begin{matrix}1 & 1 & ⋯ & 1 \\ x_{1} & x_{2} & ⋯ & x_{n} \end{matrix} ) ( \begin{matrix}1 & x_{1} \\ 1 & x_{2} \\ ⋮ & ⋮ \\ 1 & x_{n} \end{matrix} ) β & = ( \begin{matrix}1 & 1 & ⋯ & 1 \\ x_{1} & x_{2} & ⋯ & x_{n} \end{matrix} ) ( y_{1} ; y_{2} ; ⋮ ; y_{n} ) \\ ( \begin{matrix}n & ∑ x_{i} \\ ∑ x_{i} & ∑ x_{i}^{2} \end{matrix} ) ( \begin{matrix}β_{0} \\ β_{1} \end{matrix} ) & = ( \begin{matrix}∑ y_{i} \\ ∑ x_{i}y_{i} \end{matrix} ) \end{aligned}

Extra Credit (10) In the situation of question III part C above, suppose you had n = 50 = m measurements from each oil field instead of n_{1} = 5 and n_{2} = 6. What, if anything, would change in the method you would use? Explain.

Solution: With 50 measurements from each oil field, you could use the large sample formula. The t_{α/2} would be replaced by z_{α/2}. Moreover, for the large sample test, it is not necessary to assume that the individual variances are equal, so you do not need to use the pooled estimator for the variance:

\overline{Y_{1}} − \overline{Y_{2}} ± z_{.025}\sqrt{s_{1}^{2}/50 + s_{2}^{2}/50}