Mathematics 376 – Probability and Statistics 2 Solutions for Midterm Examination 2 April 22, 2010

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

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

A) (10) Determine the method of moments estimator for θ using the Y_{i}.

Solution: For a random variable with this density,

E(Y) = ∫_{0}^{1} y · \frac{1}{θ}y^{1/θ−1} dy

= \frac{1}{θ} ∫_{0}^{1} y^{\frac{1}{θ}} dy

= \frac{\frac{1}{θ}}{\frac{1}{θ} + 1}y^{\frac{1}{θ} +1}|_{0}^{1}

= \frac{1}{θ + 1}.

Then by the method of moments, we set

\overline{Y} = \frac{1}{θ + 1}

and solve for theta to get the estimator:

θ\overline{Y} + \overline{Y} = 1 ⇒ θ̂_{MM} = \frac{1 − \overline{Y}}{\overline{Y}} .

B) (15) Determine the maximum likelihood estimator for θ using the Y_{i}.

Solution: We have

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

so

ln(L) = −n ln(θ) + (\frac{1}{θ} − 1) ln(y_{1} ⋯ y_{n}).

This is a case where ln(L) does have a critical point (exactly one):

\frac{d}{dθ} ln(L) = \frac{−n}{θ} − \frac{1}{θ^{2}} ln(y_{1} ⋯ y_{n}) = 0

when θ equals:

θ̂_{ML} = \frac{− ln(Y_{1} ⋯ Y_{n})}{n}.

It can be checked without too much difficulty that this is a local maximum. For instance, by the Second Derivative Test,

\frac{d^{2}}{dθ^{2}} ln(L) = \frac{n}{θ^{2}} + \frac{2}{θ^{3}} ln(y_{1} ⋯ y_{n})

Substituting θ = \frac{− ln(y_{1}···y_{n})}{n} gives the second derivative value:

\frac{n^{3}}{ln(y_{1} ⋯ y_{n})^{2}} − \frac{2n^{3}}{ln(y_{1} ⋯ y_{n})^{2}} < 0.

Therefore, this is a local maximum.

II. A shop manufactures O-rings for the Space Shuttle booster rockets for NASA. Let d be the proportion of defectives in the shop’s output. A random sample of size n = 70 O-rings produced 6 defectives. A) (15) 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: Since n = 70 > 30, a large-sample test is appropriate. The test statistic is

z = \frac{6/70 − .1}{\sqrt{\frac{(.1)(.9)}{70}}} = −.3984.

For a two-tail test at level α = .02, we would have

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

Since z is not in the rejection region, we cannot reject H_{0}. The p-value of the test would be about 2 × .3446 = .6892 from the standard normal table. This is much too large to reject H_{0}.

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

Solution: The Type II error probability is the probability of not rejecting H_{0} when it is not true. This corresponds to having \frac{Y}{70} in the complement of the rejection region so:

(1)  .1 − 2.33\sqrt{\frac{(.1)(.9)}{70}} ≤ \frac{Y}{70} ≤ .1 + 2.33\sqrt{\frac{(.1)(.9)}{70}}.

If the true value of d is .03, then this probability can be estimated using the fact that

\frac{\frac{Y}{70} − .03}{\sqrt{\frac{(.03)(.97)}{70}}}

is approximately standard normal, so the probability that \frac{Y}{70} is in the range from (1) is

P (\frac{.07 − 2.33\sqrt{\frac{(.1)(.9)}{70}}}{\sqrt{\frac{(.03)(.97)}{70}}} < Z < \frac{.07 + 2.33\sqrt{\frac{(.1)(.9)}{70}}}{\sqrt{\frac{(.03)(.97)}{70}}} )

This is

P (−.66 < Z < 7.53) ≐ P (Z ≤ +.66) = 1 − .2546 = .7454.

This value of β would be clearly unacceptable in general for a reliable test. A larger sample size is indicated!

III. Consider the following measurements of the heat-producing capacity of the natural gas produced by two fields of gas wells (in calories per cubic meter):

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

Let μ_{i} (i = 1, 2) be the population mean heat-producing capacity of the natural gas from field i. A) (10) What assumptions do you need to make in order to use the appropriate test of

H_{0} : μ_{1} = μ_{2} versus H_{a} : μ_{1} ≠ μ_{2}? How could you determine whether it is reasonable to assume those assumptions are satisfied?

Solution: For the basic small-sample test for equality of means, we would need to assume the usual independence of the two sets of samples, that the two populations have normal distributions, and that the variances of the two normal populations are equal. You could do an F -test for equality of the two population variances. (Note that no F -table was provided with the exam(!) If you had one, then you could proceed as follows. The two sample variances are

S_{1}^{2} = .01575 and S_{2}^{2} = .01092.

So F = S_{1}^{2}/S_{2}^{2} = 1.4423. For 4 degrees of freedom in the numerator and 5 degrees of freedom in the denominator, with α = .05, F_{.025} = 7.39 and F_{.975} = 1/9.36 ≐ .011. The rejection region would consist of values F > 7.39 and 0 < F < .011. We do not reject the null hypothesis H_{0} : σ_{1}^{2} = σ_{2}^{2}.)

B) (15) Carry out the test from part A with α = .05 and state your conclusion clearly and succinctly.

Solution: We use the pooled estimator for the variance:

S_{p}^{2} = \frac{4S_{1}^{2} + 5S_{2}^{2}}{9} ≐ .0131.

Then

t = \frac{8.23 − 7.94}{\sqrt{.0131}\sqrt{1/5 + 1/6}} ≐ 4.19

For a t-distribution with 9 degrees of freedom t_{.025} = 2.262. So there is relatively strong evidence to reject H_{0} here. (The p-value is between .01 and .02.)

C) (5) Construct a two-sided 95% confidence interval for the difference of the population mean heat producing capacities μ_{1} − μ_{2}. How is this related to your answer in B?

Solution: The confidence interval can be computed using all the information developed in the previous part:

μ_{1} − μ_{2} = (8.23 − 7.94) ± (2.262)\sqrt{.0131}\sqrt{1/5 + 1/6}.

Under the null hypothesis, μ_{1} − μ_{2} = 0, so we “accept” H_{0} with sample means \overline{Y}_{1} and \overline{Y}_{2} when 0 is in the confidence interval

\overline{Y}_{1} − \overline{Y}_{2} ± (2.262)\sqrt{.0131}\sqrt{1/5 + 1/6}

and reject H_{0} otherwise.

IV. (15) Let (x_{i}, y_{i}), i = 1, …, n be a collection of data points in the plane. Using the matrix formulation, explain how to derive the normal equations for the least squares estimators for the coefficients β_{0}, β_{1}, β_{2}, β_{3} in the model Y = β_{0} + β_{1}x + β_{2}x^{2} + β_{3}x^{3} + ε fitting the data. (Note: You do not need to solve the equations.)

Solution: We have

X = ( \begin{matrix}1 & x_{1} & x_{1}^{2} & x_{1}^{3} \\ 1 & x_{2} & x_{2}^{2} & x_{2}^{3} \\ ⋮ & ⋮ & ⋮ & ⋮ \\ 1 & x_{n} & x_{n}^{2} & x_{n}^{3} \end{matrix} )

and Y = column vector of with entries y_{1}, …, y_{n}. Let β be the column vector with entries β_{0}, β_{1}, β_{2}, β_{3}. Then the normal equations are

X^{t}Xβ = X^{t}Y.

This can be written in the following form:

( \begin{matrix}n & ∑ x_{i} & ∑ x_{i}^{2} & ∑ x_{i}^{3} \\ ∑ x_{i} & ∑ x_{i}^{2} & ∑ x_{i}^{3} & ∑ x_{i}^{4} \\ ∑ x_{i}^{2} & ∑ x_{i}^{3} & ∑ x_{i}^{4} & ∑ x_{i}^{5} \\ ∑ x_{i}^{3} & ∑ x_{i}^{4} & ∑ x_{i}^{5} & ∑ x_{i}^{6} \end{matrix} ) ( \begin{matrix}β_{0} \\ β_{1} \\ β_{2} \\ β_{3} \end{matrix} ) = ( \begin{matrix}∑ y_{i} \\ ∑ x_{i}y_{i} \\ ∑ x_{i}^{2}y_{i} \\ ∑ x_{i}^{3}y_{i} \end{matrix} )

Extra Credit (10) In the situation of question I, suppose you set up a test of the hypothesis H_{0} : θ = 1 versus the alternative H_{a} : θ > 1 using Y_{1}, Y_{2} (exactly two of the samples). If you reject H_{0} when Y_{1} + Y_{2} > 1.8, what is the Type I error probability, α?

Solution: Under H_{0}, θ = 1, so Y_{1}, Y_{2} have uniform distributions on the interval [0, 1]. The samples are assumed independent, so the joint density of Y_{1} and Y_{2} is 1 on the unit square [0, 1] × [0, 1] and zero elsewhere. We make a Type I error when we reject H_{0}, but θ = 1. The probability that Y_{1} + Y_{2} > 1.8 is the area of an isosceles right triangle with legs .2, so α = (.2)(.2)/2 = .02.