\magnification=\magstep1
\centerline{Mathematics 376 -- Probability and Statistics II}
\centerline{Solutions -- Problem Set 3}
\centerline{February 13, 2004}
\bigskip
\noindent
7.48/ a) $Y = $ number of lawyers in sample is binomial
with $p = 1/410$.  So 
$$P(Y \ge 1) = 1 - P(Y = 0) = 1 - (409/410)^{1500} = .9743$$
Note we could also approximate this using the normal approximation
to the binomial distribution.  With ``continuity correction'' we
replace 1 by .5 
$$\eqalign{P(Y \ge .5) &= 
P\left({Y/1500 - 1/410\over \sqrt{(1/410)(409/410)(1/1500)}}
\ge {.5/1500 - 1/410\over \sqrt{(1/410)(409/410)(1/1500)}}\right)\cr
&\doteq P(Z \ge -1.6528) = .9505\cr}$$
(reasonably close to the exact value).
\bigskip
\noindent
b)  Again using the ``continuity correction'' to replace 30 by 30.5
$$\eqalign{P(Y \ge 30) 
&\doteq P\left({Y/1500 - 1/64\over \sqrt{(1/64)(63/64)(1/1500)}}
\ge {30.5/1500 - 1/64\over \sqrt{(1/64)(63/64)(1/1500)}}\right)\cr
&= P(Z \ge 1.47) = .0708\cr}$$
\bigskip
\noindent
c)  Yes, part b says the chance of getting 30 or more lawyers in 
a sample of $n = 1500$ is very small ($7\%$), so with a sample
of size $n = 1000$, the chances are even smaller.  In fact, 
with $p = 1/64$, the expected number of lawyers in a sample
of size $1000$ is $E(Y) = np = 1000/64 = 15.625$, and the 
standard deviation is $\sigma = \sqrt{npq} = \sqrt{1000(1/64)(63/64)} = 3.922$.
The value $Y = 30$ is approximately $3.67$ standard deviations above
the mean, so very unlikely.
\bigskip
\noindent
7.49/ We take the true population fraction favoring the 
bond issue as $p = .2$.  Then for $Y$ the number of people in 
the sample who favor the bond issue, we want 
$$\eqalign{P(|Y/64 - .2| \le .06) &= P(-.06 \le Y/64 - .2 \le .06)\cr
&= P\left({-.06\over \sqrt{(.2)(.8)/64}} \le  {Y/64 - .2 \over \sqrt{(.2)(.8)/64}}
\le {.06\over \sqrt{(.2)(.8)/64}}\right)\cr
&= P(-1.2 \le Z \le 1.2) = .7698}$$
from the standard normal table.
\bigskip
\noindent
7.50/ a)  The variance of $Y/n$ is $V(Y/n) = npq/n^2 = pq/n = (p - p^2)/n$.
Call this function $f(p)$ ($n$ is fixed but arbitrary).  Then 
to maximize $f(p)$ we find $f'(p) = (1 - 2p)/n = 0$ if and only 
if $p=1/2$.  This is a maximum by the 2nd derivative test.
\bigskip
\noindent
b)  We want to determine $n$ that guarantees
$P(|Y/n - p| \le .1) = .95$ (at least).  This is equivalent to 
$$P\left({-.1\over \sqrt{pq/n}} \le {Y/n - p\over \sqrt{pq/n}} \le {.1\over \sqrt{pq/n}}\right) = .95$$
Note that we do not know a value for $p$ here.  However, part a says that
the variance is {\it maximized} when $p = 1/2$.  Hence the interval here 
is {\it minimized} when $p = 1/2$ (since we're dividing by the square
root of the variance).  If we substitute $p = 1/2$, then 
from the standard normal table, we want 
$${.1\over \sqrt{pq/n}} = 2\sqrt{n} (.1) = 1.96$$
to get probability $.95$.  Hence $n = 4(19.5)^2 = 96.04$, so take $n = 97$.
\bigskip
\noindent
7.51/The idea is the same as 50 part b.  Use the value $p = 1/2$
because it maximizes the variance:
$$P(|Y/n - p| \le .15) = .98$$
when $2\sqrt{n}(.15) = 2.33$ (standard normal table), so $n = 61$.
\bigskip
\noindent
7.57/ a) The probability that a car turns right is $p = 1/3$.  
Let $Y$ be the number of cars that turn right.  With continuity
correction 
$$P(Y \le 150) \doteq 
P\left({Y/500 - 1/3\over \sqrt{(1/3)(2/3)(1/500)}} \le 
{150.5/500 - 1/3\over \sqrt{(1/3)(2/3)(1/500)}}\right)$$
This is approximately $P(Z \le -1.53) = P(Z \ge 1.53) = .0630$.
\bigskip\noindent
b)  Now let $Y$ be the number that turn (either left or right).
This makes $p= 1/3 + 1/3 = 2/3$.  
$$P(Y \ge 350) \doteq 
P\left({Y/500 - 2/3\over \sqrt{(2/3)(1/3)(1/500)}} \ge 
{349.5/500 - 2/3\over \sqrt{(2/3)(1/3)(1/500)}}\right)$$
This is approximately $P(Z \ge 1.53) = .0630$ also.
\bigskip
\noindent
7.58/ a) $E(Y_1/n_1 - Y_2/n_2) = (1/n_1)E(Y_1) - (1/n_2)E(Y_2) = p_1 - p_2$.
\bigskip
\noindent
b)  By independence, 
$$V(Y_1/n_1 - Y_2/n_2) = (1/n_1^2)V(Y_1) + (1/n_2^2)V(Y_2) = p_1q_1/n_1 + p_2q_2/n_2$$
\bigskip\noindent
8.2/a) We have since $\widehat{\theta_1}$ and $ \widehat{\theta_2}$
are unbiased estimators for $\theta$,
$$E(\widehat{\theta_3}) = E(a\widehat{\theta_1} + (1-a)\widehat{\theta_2})
=a\theta + (1-a)\theta = \theta$$
\bigskip
\noindent
b) By independence, we have 
 $$V(\widehat{\theta_3}) = V(a\widehat{\theta_1} + (1-a)\widehat{\theta_2})
=a^2\sigma_1^2 + (1-a)^2\sigma_2^2$$
To minimize this as a function of $a$, as in 7.50a above, we differentiate
with respect to $a$ and set equal to $0$:
$$2a \sigma_1^2 - 2(1-a)\sigma_2^2 = 0 \Rightarrow a = 
{\sigma_1^2\over \sigma_1^2+\sigma_2^2}$$
This seen to be a minimum since the second derivative is 
$2(\sigma_1^2+\sigma_2^2) > 0$.
\bigskip
\noindent
8.3/ If $\widehat{\theta_1}$ and $ \widehat{\theta_1}$
are not independent, then 
$$V(\widehat{\theta_3}) = V(a\widehat{\theta_1} + (1-a)\widehat{\theta_2})
=a^2\sigma_1^2 + (1-a)^2\sigma_2^2 - 2a(1-a)c$$
where $c = Cov(\widehat{\theta_1},\widehat{\theta_2})$.  As in 2 b, 
we differentiate with respect to $a$ and set equal to zero to 
minimize:
$$2(\sigma_1^2+\sigma_2^2 - 2c) a + 2c - 2\sigma_2^2 = 0$$
so 
$$a = {\sigma_2^2 - c \over \sigma_1^2+\sigma_2^2 - 2c}$$
As before, this is a minimum by the second derivative test.
\bigskip
\noindent
8.5/  The distribution of each $Y_i$ is exponential with
parameter $\beta = \theta + 1$.  Hence $E(Y_i) = \theta$
for all $i$, and $E(\overline{Y}) = \theta+1$.
Hence $\widehat{\theta} = \overline{Y} - 1$ is an 
unbiased estimator for $\theta$ since
$E(\overline{Y} - 1) = \theta$ ``on the nose''.
\bigskip
\noindent
8.7/The mean is $\mu = 3$, so 
$$E((Y - 3)^3) = E(Y^3) - 9E(Y^2) + 81  - 27 =  E(Y^3) - 9E(Y^2) + 54$$
Hence by the given information
$$\widehat{\theta} = \widehat{\theta_3} - 9\widehat{\theta_2} + 54$$
is an unbiased estimator for the third central moment. 
$E((Y - 3)^3)$
\bigskip
\noindent
8.9/a)  $Y$ is binomial so the exact variance is $V(Y) = npq = np(1-p)$.
So it is natural, thinking of the fraction $Y/n$ as an estimator
for $p$, to use $n(Y/n)(1-Y/n)$ to estimate
$V(Y)$.  But
$$\eqalign{E(n(Y/n)(1-Y/n)) &= E(Y - Y^2/n)\cr
&=E(Y) - (1/n)E(Y^2)\cr
&=np - (1/n)(npq + n^2p^2)\cr
&=(n-1)pq\cr}$$
Since $E(n(Y/n)(1-Y/n)) \ne npq$, this is a biased estimator
for $V(Y)$.  But if we ``adjust'' to 
$$\widehat{\theta} = {n\over n-1}\cdot n(Y/n)(1 - Y/n)$$
we get $E(\widehat{\theta}) = npq = V(Y)$ ``on the nose'', so
$\widehat{\theta}$ is an unbiased estimator for $V(Y)$.
\bigskip
\noindent
8.10/a)  Let $F(y)$ be the cdf for $Y$, then
$$F(y) = \cases{0 & if $y < 0$\cr
                y^\alpha/\theta^\alpha & if $0 \le y \le \theta$\cr
                1 & if $y > \theta$\cr}$$
Hence by our formula from class for the pdf of the sample maximum:
$$f_{(n)}(y) = n (F(y))^{n-1} f(y)$$
we get for $\widehat{\theta}:$
$$\eqalign{E(\widehat{\theta}) &= 
\int_0^\theta n\alpha \left({y^{n\alpha}\over\theta^{n\alpha}}\right)\ dy\cr
&={n\alpha\over n\alpha +1}\theta\cr}$$
\bigskip
\noindent
b) As in 9 above, we can adjust by a constant multiple
to get an unbiased estimator for $\theta$:
$$\widehat{\theta_2} = {n\alpha + 1\over n\alpha} \widehat{\theta}
= {n\alpha + 1\over n\alpha} Y_{(n)} = 
{n\alpha + 1\over n\alpha}\max(Y_1,\ldots,Y_n)$$
\bigskip
\noindent
c)  
$$\eqalign{MSE(\widehat{\theta}) &= V(\widehat{\theta}) + B(\widehat{\theta})^2\cr
&=E(\widehat{\theta}^2) - (E(\widehat{\theta}))^2 + B(\widehat{\theta})^2\cr
&=\int_0^\theta n\alpha \left({y^{n\alpha+1}\over\theta^{n\alpha}}\right)\ dy
-\left({n\alpha\over n\alpha+1}\theta\right)^2 + \left({1\over n\alpha + 1}\theta\right)^2\cr
&={2\theta^2\over (n\alpha+1)(n\alpha+2)}\cr}$$
(after a lot of algebra!)
\bigskip
\noindent
8.13/a)  Since $Y$ is binomial and $\widehat{p_2} = (Y+1)/(n+2)$,  
$$B(\widehat{p_2}) = (np+1)/(n+2) - p = {1 - 2p\over n+2}.$$
\bigskip
\noindent
b) $\widehat{p_1}$ is unbiased, so
$$MSE(\widehat{p_1}) = V(\widehat{p_1}) = pq/n$$
On the other hand after some algebra,
$$MSE(\widehat{p_2}) = {npq + (2p-1)^2\over (n+2)^2}$$
{\it Note:} The answer in the text is unfortunately incorrect
(they reversed the inequality in deriving their solution).  
The idea is you want to rewrite the inequality
$${p(1-p)\over n} < {np(1-p) + (2p-1)^2\over (n+2)^2}$$
by clearing denominators and then putting all terms on the 
same side:
$$(8n+4)p^2 - (8n+4)p + n > 0$$
This is true if and only if $p$ is smaller than the smaller
root of this quadratic equation or larger than the larger root:
$$p < {1\over 2} - {\sqrt{(8n+4)^2 - 4n(8n+4)}\over 2(8n+4)}$$
or 
$$p > {1\over 2} + {\sqrt{(8n+4)^2 - 4n(8n+4)}\over 2(8n+4)}$$
  

\bye