Download AMS312 Spring 2008

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Transcript
AMS312 Spring 2008
Practice Midterm #2 & Solution
1. (Extra Credit) Let X and Y be random variables with joint pdf
f X ,Y  x, y  
1
2 X  Y

1
exp 
2
2
1

2
1 



 x  
X



X
2

 x  X
  2  

 X
 y  Y

  Y
  y  Y
  
  Y
   x   ,    y   . Then X and Y are said to have the bivariate
normal distribution. The joint moment generating function for X and Y is

1

M t1 , t 2   exp t1 X  t 2 Y  t12 X2  2 t1t 2 X  Y  t 22 Y2
2

 .

(a) Find the marginal pdf’s of X and Y;
(b) Prove that X and Y are independent if and only if ρ = 0. (Here ρ is
indeed, the correlation coefficient between X and Y.)
(c) Find the distribution of  X  Y  .
Solution:
(a) M (t1,0)=exp (Xt1+1/2X2t12) X ~ N (X, X2)
M (0,t2)= exp (Yt2+1/2Y2t22) Y ~ N (Y, Y2)
(b) If ρ = 0, then M (t1, t2) = exp [Xt1+Yt2+1/2(X2t12 +Y2t22)]=M(t1,0)·M(0,t2)
Therefore X and Y are independent.
If X and Y are independent, then M (t1, t2) = M(t1,0)·M(0,t2)
= exp [Xt1+Yt2+1/2(X2t12 +Y2t22)] Therefore ρ = 0.
Note: It is interesting to note that for two random variables with bivariate normal
distribution, they are independent if and only if they are uncorrelated.
(c) MX+Y(t) = et(X+Y)=etX+tY
Recall that M (t1, t2) = et1 X  t 2Y , therefore we can obtain MX+Y(t) by setting t1=t2=t
in M (t1, t2). That is,
MX+Y(t) = M (t,t)=exp[Xt+Yt+1/2(X2t2 +2ρXYt2+Y2t2)]
= exp [(X+Y)t+1/2(X2 +2ρXY+Y2)·t2]
Hence X+Y ~ N (X+Y, 2=X2 +2ρXY+Y2)
2. A liquor store owner is willing to cash personal checks for amounts up to $50,
but she has become wary of customers who wear sunglasses. Fifty percent of
checks written by persons wearing sunglasses bounce. In contrast, 98% of the
checks written by persons not wearing sunglasses clear the bank. She
estimates that 10% of her customers wear sunglasses. If the bank returns a
check and marks it “insufficient funds”, what is the probability it was written
by someone wearing sunglasses?
Solution:
P (bounce | sunglasses) = 0.50
P (bounce | no sunglasses) = 1-0.98 = 0.02
P (sunglasses) = 0.10
P (no sunglasses) = 0.90
Therefore P (sunglasses |bounce)=
1



2
 
 ,
 
P (bounce | sunglasses )  P( sunglasses )
P (bounce | sunglasses )  P( sunglasses )  P(bounce | no sunglasses )  P(no sunglasses )
(0.5)  (0.1)
0.05
50


 0.735
=
(0.5)  (0.1)  (0.02)  (0.9) 0.05  0.018 68
3. Suppose a random sample of size n is drawn from a normal population with
mean μ and variance σ2, both parameters unknown. Please
(a) Find the maximum likelihood estimators of μ and σ2.
(b) Find the method of moment estimators of μ and σ2.
Solution:
n
 ( xi  )
1 e 2 2
2
n
(a) L(  ,  )   f ( xi ;  ,  )   (
2
2
i 1
2 
i 1
n
)
n
( x   )2
( x   )2
Ln L=    ln( 2 )  2i  2      ln( 2 )  12 ln  2  2i  2 

 i 1 

i 1 
n
 ln L
2( x  )
x 
  ( i 2 (1))   i 2 
2


i 1
i 1
n
n
xi n

i1
2
n
 ln L
(x
(x
  ( 12 )  i 4     i
2
2

2




 i 1 

i 1 
n
n
  )2
  )2  2
2 4
 ( xi   )2 n 2
  i1

2 4
n
xi

i1
 ln L
0  

n
x
(1)
n
( xi   )2

i1
 ln L
(2)
 0  2 
n
2

From (1) and (2), we could get that the MLE estimators of  and  2 are:
n
  x, 2 
( xi  x )2

i1
n
(b) Since the sample is drawn from a normal population with mean μ and variance
σ2, E(X)= μ and Var(X)= σ2.
n
xi 2

i1
From the method of moment, we have E(X)= x and E(X2)= n , therefore we
could get that the method of moment estimator of μ andσ2 are:
n
  x , 2 
xi 2

i1
n
n
 2 
xi 2

i1
n
n
2
x 
xi 2 n x

i1
n
n
2

( xi 2  x

i1
n
2
n
)

( xi  x )2

i1
n
4. An expert witness in a paternity suit testifies that the length (in days) of
pregnancy (that is, the time from impregnation to the delivery of the child) is
approximately normally distributed with parameter   270 and  2  100 . The
defendant in the suit is able to prove that he was out of the country during a period
that began 290 days before the birth of the child and ended 240 days before the
birth. If the defendant was, in fact, the father of the child, what is the probability
2
that the mother could have had the very long or very short pregnancy indicated by
the testimony?
Solution: let X ~ N (   270,  2  100) and Z ~ N (0, 1)
P (the woman had a very long or very short pregnancy)
290  270
240  270
 P( X  290)  P( x  240)  P( Z 
)  P( Z 
)
10
10
 P( Z  2)  P( Z  3)  .0228  .0013  .0241
5. Thanksgiving was coming up and Harvey's Turkey Farm was doing a land-office
business. Harvey sold 100 gobblers to Nedicks for their famous Turkey-dogs. Nedicks
found that 90 of Harvey's turkeys were in reality peacocks.
(a) Estimate the proportion of peacocks at Harvey's Turkey Farm and find a 95%
confidence interval for the true proportion of turkeys that Harvey owns.
(b) How large a random sample should we select from Harvey's Farm to guarantee
the length of the 95% confidence interval to be no more than 0.06? (Note: please first
derive the general formula for sample size calculation based on the length of the CI
for inference on one population proportion, large sample situation. Please give the
formula for the two cases: (i) we have an estimate of the proportion and (ii) we do not
have an estimate of the proportion to be estimated. (iii) Finally, please plug in the
numerical values and obtain the sample size for this particular problem.)
Solution:
(a) This is large sample CI for one population proportion.
We have α = 0.05, ˆ  0.1 . The 95% CI is
ˆ 1  ˆ 
0.11  0.1
= 0.1  1.96
= 0.1  0.06 or (0.04, 0.16)
ˆ  1.96
n
100
(b) This is sample size calculation for the estimation of one population proportion.
The general formula is derived as follows (also refer to your lecture notes for the
derivations of the pivotal quantity, and the CI etc.):
(i) The pivotal quantity for the inference on π is
ˆ  
Z  ˆ ˆ ~ N 0,1. The 100(1-α)% symmetrical CI for π is derived from
 1 

n
P z / 2  Z  z / 2   1   , which yields ˆ  z / 2
the CI is: L  2 * z / 2
n
z / 2 2 ˆ 1  ˆ 
ˆ 1ˆ 
n
ˆ 1ˆ 
n
. Therefore the length of
. Solving for the sample size, we have
, where E = L/2 is referred to as the maximum error.
E2
(Note: E is also directly defined as Pˆ    E   1   )
(ii) When we have no estimate of the proportion, since simple calculus shows that
2

z / 2 
ˆ 1  ˆ   1/ 4 , a conservative estimate is n 
4E 2
In the given problem, we have E = 0.03 and α = 0.05.
3
(i). ˆ  0.1 . n 
z0.025 2 ˆ 1  ˆ   385 ; (ii).
E2
n
z0.025 2
4E 2
 1068
6. Let Xi, i = 1, …, n, denote the outcome of a series of n independent trials, where Xi
n
= 1 with probability p, and Xi = 0 with probability (1- p). Let X   X i .
i 1
(a). Please derive the method of moment estimator of p.
(b). Please derive the maximum likelihood estimator of p.
(c). Please derive the 100(1-α)% large sample confidence interval for p using the
pivotal quantity method. (* Please include the derivation of the pivotal quantity, the
proof of its distribution, and the derivation of the confidence interval for full credit.)
Solution:
n
(a). The population mean is p and the sample mean is pˆ 
X
moment estimator of p is pˆ  .
n
(b). The likelihood function is:

L p; x1 , , xn   i 1 p xi 1  p 
n
1 xi
  p
xi
X
i 1
n
i

X
. Therefore the
n
1  p n x
i
The log likelihood is:
ln L p; x1 , , xn    xi  ln p  n   xi  ln 1  p 
Solving the equation:
n
d ln L p; x1 , , xn   xi n   xi 


 0 , we have pˆ 
dp
p
1 p
x
i 1
n
i

x
n
(c). The population distribution is Bernoulli (p), i.e. Xi ~ Bernoulli(p). Therefore the
population mean is p and the population variance is p(1-p). When the sample size n is
large, by the central limit theorem, we know that the sample mean follows
approximately the normal distribution with its mean being the population mean and its
variance being the population variance divided by n as follows:
n
pˆ 
X
i 1
n
i

X
 p1  p  
~ N  p,
.
n
n


Same as in 2 (a), we can show that Z 
pˆ  p
~ N 0,1 is a pivotal quantity for
p1  p 
n
the inference on p.
We can use this pivotal quantity to construct the large sample confidence interval for
p. Alternatively, we can also use the following pivotal quantity
pˆ  p
Z* 
~ N 0,1 to construct the large sample confidence interval as follows.
pˆ 1  pˆ 
n
4




*
1    P  Z   Z  Z    1    P  Z  

2
2 
2





pˆ  p
 Z 

pˆ 1  pˆ 
2

n


pˆ 1  pˆ 
pˆ 1  pˆ  

 1    P pˆ  Z 
 p  pˆ  Z 

n
n
2
2


Therefore the 100(1-α)% large sample confidence interval for p is:

pˆ 1  pˆ 
pˆ 1  pˆ  
 pˆ  Z 

ˆ
,
p

Z



n
n
2
2


5