Class Notes
(809,509)

Canada
(493,754)

University of Waterloo
(18,194)

Statistics
(474)

STAT 231
(84)

Brad Lushman
(4)

Lecture

# Course Note W14 Soln.pdf

Unlock Document

University of Waterloo

Statistics

STAT 231

Brad Lushman

Fall

Description

APPENDIX A. ANSWERS TO
ASSORTED PROBLEMS
Chapter 1
1.1. (a) average and median a + ▯; a + b^ respectively. (b) No relation in general but if
2 P P
all i ▯ 0; then median(vi) = ^ : (c) As a rule (i ▯ ^ ) 6= 0 but (yi▯ y▯) = 0:
(d) a(y0) = n▯+y0 ! 1 as y 0 1: (e). Suppose n is odd. Then m ^ (0 ) = yn+1 if
n+1 ( 2 )
y0> y (n+1) so it does not change as0y ! 1:
2
1.2. (a) both are multiplied by jbj (c) 0s y increases to in
nity, so does the sample stan-
dard deviation s (d) Once 0 is larger than Q(:75); it has no e⁄ect on the interquartile
range as it increases.
2
1.5. (b) Female coyotes: f = 89:24; f = 42:87887
2
Male coyotes: um = 92:06; m = 44:83586
1.6. The empirical c.d.f. is constructed by
rst ordering the data (smallest to largest) to
obtain the order statistic: 0.01 0.39 0.43 0.45 0.52 0.63 0.72 0.76.85 0.88. Then the
empirical c.d.f. is in
gure 12.1
for Q1.jpg
Figure 12.1: Empricial c.d.f. for problem 1.6
231 232 APPENDIX A. ANSWERS TO ASSORTED PROBLEMS
Chapter 2
^
2.1. (a) L(▯) = ▯ e▯10▯and ▯ =4.1 (b) e▯2▯ = 0:000275
2.2.
▯ ▯
99 10 90
(a) ▯ (1 ▯ ▯)
9
▯ ▯
(b) 100 ▯ (1 ▯ ▯)90
10
In both cases if we maximize over ▯ we obtain ▯ = :10: (b) 140
2.3. (2x + x )=n
1 2
2.4. (b) 0.28
2.5. (a) If there is adequate mixing of the tagged animals, the number of tagged animals
caught in the second round is a random sample selected without replacement so follows
a hypergeometric distribution (see the stat 230 notes).
(b)
L(N + 1) (N + 1 ▯ k)(N + 1 ▯ n)
=
L(N) (N + 1 ▯ k ▯ n + y)(N + 1)
and this function reaches its maximum within an integer of kn=y:
(c) The model requires su¢ cient mixing between captures that the second stage is a
random sample. If they are herd animals this model will not
t well.
2.6. (a) The probability that a randomly selected family has k children ik ▯ = ▯ ;k =
1▯2▯
1;2;::: and ▯0= 1▯▯ Then the joint distribution of 0Y 1Y ;:::) the number of
families with k children respectively is (f ;f ;:::) is Multinomial(n;▯ ;▯ ;:::).
0 1 0 1
Therefore
▯ ▯f0Yax
n! f0 f1 n! 1 ▯ 2▯ kfk
P(Y 0 f 0Y =1f ;1::) = f !f !::: ▯1::: = f !f !::: 1 ▯ ▯ ▯ :
0 1 0 1 k=1
and the log likelihood is
▯ ▯ max
1 ▯ 2▯ X
l(▯) = f0ln + kfkln(▯)
1 ▯ ▯ k=1
X
= f 0n(1 ▯ 2▯) ▯ f 0n(1 ▯ ▯) + ln(▯)T where T = kf k
Solving l (▯) = 0 we obtain
2 2 1=2
0 ▯2f0 f0 1 (f0+ 3T) ▯ [(f0+ 3T) ▯ 8T ]
l (▯) = + + T = 0 or ▯^ =
1 ▯ 2▯ 1 ▯ ▯ ▯ 4T 233
(b) We assume that the probability that a randomly selected family has k children is
▯ ;k = 1;2;::: Suppose for simplicity there are N di⁄erent families where N is
very large. Then the number of families that have y children is N ▯(probability
a family has y children) = N▯ for y = 1;2;:::: and there is a total of yN▯
P 1
children in families of y children and a toty=1yN▯ children altogether.
Therefore the probability a randomly chosen child is in a family of y children is:
yN▯ y
= cy▯ ; y = 1;2;:::
P1 y
yN▯
y=1
P
Note that ▯ = 1 : Therefore taking derivatives
y=0 1▯▯
X1 X1
y▯y▯1 = 1 and y▯ = ▯
(1 ▯ ▯) (1 ▯ ▯)2
y=1 y=1
2
Therefore c = (1 ▯ ▯) =▯:
(c) ^ = 0:195; Pr(X = 0) = 0:758
(d) ^ = 0:5
P P
2.7. (a) ▯ = yi= i
2.8. (a)
Z 1
1 ▯y=▯ ▯C=▯
P(Y > C;▯) = ▯ e dy = e :
C
(b) For the th piece that failed at time y < C; the contribution to the likelihood is
1 ▯yi=▯
▯e : For those pieces that survive past time C; the contribution is the probability
of this event, P(Y > C;▯) = e▯: Therefore the likelihood is the product of these
!
Yk ▯ ▯ n▯k
L(▯) = 1e▯yi=▯ eC=▯
▯
i=1
k
1 X C
l(▯) = ▯k ln(▯) ▯ yi▯ (n ▯ k)
▯ i=1 ▯
P
and solving l(▯) = 0 we obtain the maximum likelihood estima[e,iyi+ (n ▯ k)C]:
k^
(c) When k = 0 and if C > 0 the maximum likelihood estimator is 1: In this
case there are no failures in the time interval [0;C] and this is more likely to happen
as the expected value of the exponential ▯ gets larger and larger. 234 APPENDIX A. ANSWERS TO ASSORTED PROBLEMS
2.9. The likelihood function is
Yn [▯(x )]
L(▯;▯) = i e▯▯(xi)
yi!
i=1
and, ignoring the terms i ! which do not contain the parameters, the log-likelihood is
Xn h i
(▯+▯xi)
l(▯;▯) = yi(▯ + ▯xi) ▯ e
i=1
To maximize we set the derivatives equal to zero and solve
n
@ X h (▯+▯x )
l(▯;▯) = yi▯ e i = 0
@▯ i=1
n
@ X h (▯+▯x )i
l(▯;▯) = xi yi▯ e i = 0
@▯ i=1
For a given set of data we can solve this system of equations numerically but not
explicitly.
2.10. (a) If they are independent P(S and H) = P(S)P(H) = ▯▯: The others are similar.
(b) The Multinomial probability function evaluated at the observed values is
100! 20 15 22 43
L(▯;▯) = (▯▯) (▯(1 ▯ ▯)) ((1 ▯ ▯)▯) ((1 ▯ ▯)(1 ▯ ▯))
20!15!22!43!
and the log likelihood
l(▯;▯) = 35ln(▯) + 65ln(1 ▯ ▯) + 42ln(▯) + 58ln(1 ▯ ▯)
setting the derivatives to zero gives the maximum likelihood estimates,
@ 35 65 35
l(▯;▯) = 0 gives ▯ = 0 or ^ =
@▯ ▯ 1 ▯ ▯ 100
@ 42
l(▯;▯) = 0 gives ▯ =
@▯ 100
▯ ▯ ▯ ▯
^ ^ ^ ^
(c) The expected frequencies are 1^▯;100▯^ 1 ▯ ▯ ;100(1 ▯ ▯^)▯;100(1 ▯ ▯^) 1 ▯ ▯
respectively or
▯ ▯
35(42) 35(58) 65(42) 65(58)
100 ; 100 ; 100 ; 100 = (14:7;20:3;27:3;37:7)
which can be compared with 20;15;22;43. The di⁄erences are of the order of 5 or so.
This is not too far (measured for example in terms of Binomial (100;0:2) standard
deviations from the theoretical frequencies so the model may
t. 235
Normal QQ Plot
150
100
Sample Quantiles
50
0
2 1 0 1 2
Theoretical Quantiles
Figure 12.2: Question 2.11: Normal QQ plot for X
Normal QQ Plot
5
4
3
2
Sample Quantiles
1
0
2 1 0 1 2
Theoretical Quantiles
Figure 12.3: Question 2.11: Normal QQ plot for Y=log(X) 236 APPENDIX A. ANSWERS TO ASSORTED PROBLEMS
2.11. The qqplots are as in Figures 12.2 and 12.3: Note that the qqplot for Y = log(X) is
far more linear indicating that Y = log(X) is much closer to the normal distribution.
2.12. The joint p.d.f. of the observation1 y2;y ;:n:is given by
▯ ▯▯ ▯ ▯ ▯
2y 1 2 2y2 2 2yn 2
f(y 1▯)f(y 2▯):::f(yn;▯) = e▯y1=▯ e▯y2=▯ ::: e▯y n▯
▯ ▯ ▯
n P
2 ▯ ▯ i=1i
= n(y1 2:::n )e
▯
and the log likelihood
Xn
n 1 2
l(▯) = ln(2 (1 2 ::ny )) ▯ nln(▯) ▯ yi
▯ i=1
n 1 P n
Maximizing this over ▯ results from solving the equation l (▯) = 0▯or 2 + i=1yi=
▯
0 and the solution of this is the maximum likelihood estimate:
Xn
▯ = 1 y2
n i
i=1
2.14. (a) The frequency histogram appears in Figure 12.4 and it appears to be approxi-
mately normally distributed.
histogram
53:jpg
Figure 12.4: Question 2.14 (a): Frequency Histogram for Osteoporosis data
(b) The sample mean ▯ = 159:77 and the sample standard deviation s = 6:03
for this data. The number of observations in the interval (y▯ ▯ s;▯ + s) =
(153:75;165:80) was 244 or 69.5% and actual number of observations in the
interval ▯▯2s;y ▯+2s) = (147:72;171:83) was 334 or 95.2%, very close to what
one would expect if the data were normally distributed with these parameters. 237
(c) The interquartile range for the data on elderly women is IQR = q(:75)▯q(:25) =
2
164 ▯ 156 = 8 . It is easy to see from the normal tables that if Y is a N(▯;▯ )
random variable then P(▯ ▯ 0:675▯ < Y < ▯ + 0:675▯) = 0:5: It follows that
for the normal distribution the interquartile range is IQR = 2(0:675▯) = 1:35▯:
Notice that for this data IQR = 1:33s so this relationship is almost exact.
(d) The
ve-number summary for this data is given by y (1) q(:25); q(:5); q(:75);
y = 142; 156; 160; 164; 178
(n)
(e) The boxplot for this data appears in
gure 12.5 and it resembles that for the
normal with approximately equal quantiles and symmetry.
boxplot
54:jpg
Figure 12.5: Question 2.14 (e): Boxplot for Osteoporosis data
(f) The qqplot for this data (see Figure 12.6) is approximately linear indicating that
the data is approximately normally distributed. The only apparent departure
is the "steplike" behaviour of the plot, due to the rounding of the data to the
nearest cm.
Chapter 4
4.1. (a) ^ = 1:744, ^ = 0:0664(M) ^ = 1:618,^ = 0:0636 (F)
(b) 1.659 and 1.829 (M) 1.536 and 1.670 (F)
(c) .098 (M) and .0004 (F)
(d) 11/50=.073 (M) 0(F)
▯ X+4Y ▯ 1 ▯ ▯ 1 ▯ 1 ▯0:25▯
4.2. (c) V are) = V ar 5 = 25 V ar(X) + 16V ar(Y ) = 25 10 + 16 10 = 0:02.
Ther▯fore ▯e= 0:14▯4 ▯ ▯ ▯
V ar X+Y = 1 V ar(X) + V ar(Y ) = 1 1 + 0:25 = 0:03125. Therefore ▯ =
2 4 4 10 10
0:1768 238 APPENDIX A. ANSWERS TO ASSORTED PROBLEMS
qqplot
5:jpg
5
Figure 12.6: Question 2.14 (f): Normal qq plot for Osteoporosis data
▯ ▯
4.3. (b) P(▯0:03 ▯ P ▯p ▯ 0:03) = P(0:37n ▯ Y ▯ 0:43n) = P p▯0:03n▯ Z ▯ p0:03n =
0:24n 0:24n
0:95
0:03n
Since Z ▯ N(0;1); p0:24n = 1:96: Therefore n = 1024
k
4.4. (a) The probability a group tests negative is p = (1 ▯ ▯) . The probability that x
out of n groups test negative is
▯ ▯
n x n▯x
p (1 ▯ p) x = 0;1;:::;n
x
^ 1=k ^
(b) ▯ = 1 ▯ (x=n) (c) ▯ = 0:0116; interval approximately [0:0056; 0:0207]:
P ar t (a)
1.0
0.8
0.6
R(al0.4)
0.2
P ar t (b)
0.0
0.0 0.2 0.4 0.6 0.8 1.0
alpha
Figure 12.7: Question 4.5: Relative Likelihood Function for 5(a) and (b) with likelihood
interval of 10% 239
4.5. (a) Looking at Figure 12.7, we can see that R(▯)=0.1 correspond to ▯ between 0.5
to 0.6. Using uniroot function in R:
> uniroot(function(x)((((1+x)/4)^32*((1-x)/2)^18)/L-0.1),lower=0.5,upper=0.6),
where L in the code is L(b)
we will get 0.548. Notice that 0 ▯ ▯ ▯ :548 (see Figure 12.7)
17 33
4.6 L(▯) = c▯ (1 ▯ ▯) ▯ b = 0:34 Similar in 5(a), using uniroot function on the likeli-
hood function, we will get the likelihood interval [0:209; 0:490]
>uniroot(function(x) x^17*(1-x)^33/L - 0.1 , lower = 0, upper= 0.3), where
L in the code is L(b)
>uniroot(function(x) x^17*(1-x)^33/L - 0.1 , lower = 0.4, upper= 0.6), where
L in the code is L(b)
P P
(a) ▯ = 1 x = 20 (b) ▯ = 1 x = 11:67. See Figure 12.8
n i n i
1.0 B A
0.8
0.6
R(T0.4a)
0.2
0.0
5 10 15 20 25 30
theta
Figure 12.8: Question 4.6: Relative Likelihood for Company A and Company B
(c) Note that in the following, the likelihood interval is found by solving ▯(▯) = ▯2ln(R(▯)) ▯
3:841
3:841 or R(▯) ▯ exp(▯ 2 ) = 0:1465
For Company A (the curve on the right hand side of the graph): ▯(▯) = 2 ▯ [(▯12▯ + b
240log(▯))▯(▯12▯ +240log(▯))] Therefore the likelihood interval is : [16:2171; 24:3299]
For Company B (the curve on the left hand side of the graph): ▯(▯) = 2 ▯ [(▯12▯ + b
b
140log(▯)) ▯ (▯12▯ + 140log(▯))] Therefore the likelihood interval is : [9:8394; 13:7072]
4.7. (a)
n
Yn ▯▯ P ti ▯ P ▯ Qn
L(▯) = 1 ▯3n t2e i=1 = c▯3n exp ▯▯ t where c = 1 t2
2n i i 2n i
i=1 i=1 i=1 240 APPENDIX A. ANSWERS TO ASSORTED PROBLEMS
P P
(b) l(▯) = 3nlog▯ ▯▯ t dl= 3n ▯ t Setting this equal to 0 and solving, we
P i d▯ ▯ i
get ▯ = ▯ = 3n= i
1.0
0.8
0.6
R(T0.4a)
0.2
0.0
0.00 0.05 0.10 0.15 0.20
Theta
Figure 12.9: Relative Likelihood for Q4.7(c)
(c) ▯ = 0:06024; Solving R(▯) ▯ 0:1 using uniroot function in R, will obtain the
likelihood interval of [0:0450; 0:0785] which is an approximate 96:8% con
dence
interval for ▯. Similarly a 15% likelihood interval or approximate 95% con
dence
interval for ▯ is [0:0463; 0:0768]
R ▯ t e▯▯t 1R 3 ▯(▯t) 1R1 3 ▯x
(d) E[T] = 2 dt = 2 (▯t) e dt = 2▯ x e dx (By letting x = ▯t)
0 0 0
1 1 3
▯ 2▯▯(4) = ▯ 2▯3! = ▯ and a 95% approximate con
dence interval for ▯ is
3 ; 3 = [39:1; 64:8].
0:0463 0:0768
3R0 3
(e) p(▯) = P(T ▯ 50) = ▯ t e▯t dt = ▯ f ▯2500e▯50▯▯ 120e▯50▯+ 2 (▯ e ▯50▯+ )g
2 0 2 ▯ ▯ ▯ ▯ ▯
2 ▯50▯
by doing integration by parts twice = 1 ▯ (1250▯ + 50▯ + 1)e
Con
dence intervals are [0:408; 0:738] (using model) and [0:287; 0:794] (using
Binomial). The Binomial model involves fewer assumptions but gives a less
precise (wider) interval.
(Note: the
rst con
dence interval can be obtained directly from the con
dence
interval for ▯ in part (c).) 241
4.8. (a)
1 1
R 1 k▯1 ▯ y 1 R y k▯1 ▯ y
k y2 e 2 dy = k ( ) 2 e 2dy
02 ▯( )k 2▯( 2 0 2
2
1 R k▯1 ▯x y
= k x2 e dx by letting x =
▯( 2 0 2
1 k
= k ▯( ) = 1
▯( 2 2
(b)
R 1 k y
M(t) = E[e Y t] = y2▯1 e 2e dy
0 2 k
2 ▯( 2 )
1 R k 1
= y 2▯1e▯( 2t)ydy
k k
2 ▯( 2 0
1
1 R 2▯1 ▯x 1
= k k 1 k x e dx by letting x = ( ▯ t)y
2 ▯( 2)(2▯ t) 2 0 2
k 1 k ▯1
= (2 (2 ▯ t) )
2
▯2
= (1 ▯ 2t)
Therefore
0 k ▯ ▯1
M (0) = E[Y ] = ▯ (1 ▯ 2t) 2 (▯2)j t=0= k
2
00 k k k
M (0) = E[Y ] = ▯ (▯( + 1))(1 ▯ 2t) 22 (▯2 ▯ ▯2)j t=0
2 2
2
= k + 2k V ar(Y )
= k + 2k ▯ k = 2k
(c) See Figure 12.10.
Pn
▯ ▯ xi
4.9. (a) L(▯) = ( 1) e i=1 . Solving the derivative of log(L(▯)) = 0, we obtain
n ▯
b 1 P ^
▯ = n xiand ▯ = 380 days; Solving for ▯(▯) ▯ 2:706, obtain 90% con
dence
i=1
interval as [285:5; 521:3]
▯1m
(b) P(X ▯ m) = 1 ▯ e ▯ = 0:5 => m = ▯▯ ln(0:5) = ▯ ln2 and con
dence
intervalis [197:9; 361:3] by using the con
dence interval of ▯ obtained in (a). 242 APPENDIX A. ANSWERS TO ASSORTED PROBLEMS
11 11k=5
0.15 11 11
1 11
11 11
1 11
1 11 11 11
0.10 11 1111 1111
1 1 11 1111
f(y) 1 11 111 111
11 11 11 111
1 11 11 111=10 1111
0.05 1 11 111 1111 11111
1 11 111 11 111
11 11 1111 11111 11111
1 111 k=25 111 111 111111
11111111111111111111111111111 1111111111111111
0.00
0 5 10 15 20
y
Figure 12.10: Question 4.8 (c). The pdf of Chi-squared Distribution with k=5,10,25
4.10. (a) Using the cumulative distribution function of the Exponential distribution F(x) =
▯x=▯
1 ▯ e ; we have
2X y▯
P(Y ▯ y) = P( ▯ y) = P(X ▯ ) = 1 ▯ e▯y▯=(2▯) = 1 ▯ e▯y=2 :
▯ 2
d 1 ▯ 2
Taking derivative dy on both sides gives the probability density function as ▯ which
can be easily veri
ed as the pdf of a ▯ (2) distribution.
(b) Another way of doing this is by using MGF (try do it using the hint on your own)
Pn
2 X
i=1 i Qn 2t
M (t) = E[e Ut] = E[e ▯ t] = E[e ▯ Xi] since the values of X are i.i.d.
U i
i=1
Q 0 ▯1
= (1 ▯ ▯t )
i=1
0 2t ▯n 2
(by letting t = ▯ ) = (1 ▯ 2t) which can be easily veri
ed as the MGF of ▯ (2n)
(c)
0 n 1
P
B 2 X i C
P(43:19 ▯ W ▯ 79:08) = P B 43:19 ▯ i=1 ▯ 79:08 C
@ ▯ A
0 n n 1
P P
B 2 X i 2 X iC
B i=1 i=1 C
= P @ 79:08 ▯ ▯ ▯ 43:19 A = 0:9 243
n
P
and by substituting x i 11400, we obtain [288:3; 527:9].
i=1
4.11. (a) If X is the number who support this information, X is a Binomial (n;p) distri-
bution. Then, q▯p approximately follows a Normal Distribution for large n. Then
▯2
n q
0:7(0:3)
con
dence intervalis 0:7 ▯ 1:96 => [0:637; 0:764]
200
4.12 The 99% con
dence intervals are, for males: 1:744▯2:58▯ p:0644 and for Females:1:618▯
150
0p0636
2:58 ▯ 150 :
4.13 This question is similar to 4.11(a). The disetribution is Binomial(n;p) and the 99%
CI based on a normal approximation is given by:
s
r
^(1 ▯ ^) 26 26 (28794)
^▯ 2:58 or ▯ 2:58 29000 29000
n 29000 29000
4.17. (a) Graph of a t-distribution with 1 degree of freedom (k = 1) and the graph of a
t-distribution with 5 degrees of freedom(k = 5) appear in Figure 12.11:
0 .4
0.35 k=5
0 .3
0.25
0 .2
pdf
0.15
0 .1
0.05
k=1
0
6 4 2 0 2 4 6
x
Figure 12.11: Question 4.14 (a): Graph of Student t pdf with k = 1 and k = 5 degrees of
freedom
(b) X follow t-distribution with 15 degree of freedom (d) P(▯a ▯ x ▯ a) = 0:98.
Tail probability = 0:01 From t-distribution table,a = 2:602 (e) P(x ▯ b) = 0:95:
From t-distribution table, b = ▯1:753 244 APPENDIX A. ANSWERS TO ASSORTED PROBLEMS
4.18. (a) The parameter ▯ is the mean weight gain of the rats fed the special diet in the
study population which consists of the rats at the R.A.T. laboratory.
The parameter ▯ is the standard deviation of the weight gains of the rats fed
the special diet in the study population.
(b) The maximum likelihood estimate of ▯ ^ = ▯ = 734:4=12 = 61:2.
▯ 12 ▯1=2
1 P 2 ▯162:12=2
The maximum likelihood estimate of ▯^ = ▯12 (i ▯ ▯) = 12 =
i=1
3:68.
(c)
Y ▯ ▯
T = p has a t distribution with 11 degrees of freedom.
S= 12
1 P2▯ ▯2
W = 2 Yi▯ Y▯ has a Chi-squared distribution with 11 degrees of freedom.
▯ i=1
(d) From the t tables P (T ▯ 2:20) = 0:975 so P (▯2:20 ▯ T ▯ 2:20) = 0:95 and
a = 2:20:
Since
▯ ~ ▯ ▯ ▯ ▯ p p ▯
0:95 = P ▯2:20 ▯ p ▯ 2:20 = P ▯ ~ ▯ 2:20S= 12 ▯ ▯ ▯~ + 2:20S= 12
~= 12
a 95% C.I. interval for ▯ is
h p p i
▯▯ 2:20s= 12; ▯+ 2:20s= 12 :
▯ ▯
P2 1=2 ▯ 1=2
For these data s = 1 (yi▯ ▯)2 = 162:12 = 3:84: The 95% C.I.
11i=1 11
interval for ▯ is
h i h i
p p p p
▯▯ 2:20s= 12; ▯+ 2:20s= 12 = 61:2 ▯ 2:20(3:84)= 12; 61:2 + 2:20(3:84)= 12
= [58:76; 63:64]:
(e) From the Chi-squared tables P (W ▯ 4:57) = 0:05 = P (W ▯ 19:68) so 0:90 =
P (4:57 ▯ W ▯ 19:68): Thus b = 4:57 and c = 19:68.
Since
▯ ▯
1 P2 ▯ ▯2
0:90 = P 4:57 ▯ Yi▯ Y ▯ 19:68
▯ 2i=1
▯ 12 12 ▯
= P 1 P ▯Y ▯ Y▯▯2▯ ▯ ▯ 1 P Y ▯ Y▯▯2 ;
19:68 i 4:57 i
i=1 i=1
a 90% C.I. for ▯ is
▯ ▯
1 P2 1 P2
(yi▯ ▯) ; (yi▯ ▯)2 :
19:68 i=1 4:57i=1 245
For these data the 90% C.I. for ▯ is
▯ ▯
162:12 162:12
; = [8:24; 35:48]:
19:68 4:57
4.19. (a) The likelihood function is
n ▯ n ▯ ▯ n ▯
Q yi ▯yi=▯ Q ▯2n 1 P
L(▯) = ▯2e = yi ▯ exp ▯ ▯ yi ; ▯ > 0:
i=1 i=1 i=1
The log likelihood function is
▯ ▯
Qn 1 Pn
l (▯) = log yi ▯ 2nlog▯ ▯ yi; ▯ > 0
i=1 ▯ i=1
and
P
yi▯ 2n▯
0 2n 1 P i=1
l (▯) = ▯ + 2 yi= 2 ; ▯ > 0:
▯ i=1 ▯
0
Now l (▯) = 0 if n
1 P 1
▯ =2n yi= 2 ▯:
i=1
(Note a First Derivative Test could be used to con
rm that l (▯) has an absolute
maximum at ▯ = y▯=2.) The maximum likelihood estimate of ▯ is
^
▯ = ▯=2:
(b) ▯ ▯
▯ ▯ 1 P 1 Pn 1 P 1
E Y▯ = E Yi = E (Yi) = 2▯ = (2n▯) = 2▯
ni=1 n i=1 n i=1 n
and
▯ ▯ 2
▯▯▯ 1Pn 1 Pn 1 Pn 2 1 ▯ 2▯ 2▯
V ar Y = V ar Yi = 2 V ar iY ) =2 2▯ = 2 2n▯ = :
ni=1 n i=1 n i=1 n n
(c) Since 1 2Y ;:::nY are independent and identically distributed random variables
then by the Central Limit Theorem
Y ▯ 2▯
p has approximately a N(0;1) distribution.
▯ 2=n
If Z v N(0;1)
P (▯1:96 ▯ Z ▯ 1:96) = 0:95:
Therefore
!
Y ▯ 2▯
P ▯1:96 ▯ p ▯ 1:96 t 0:95:
▯ 2=n 246 APPENDIX A. ANSWERS TO ASSORTED PROBLEMS
(d)
!
Y ▯ 2▯ ▯ p p ▯
0:95 t P ▯1:96 ▯ p ▯ 1:96 = P Y ▯ 1:96▯ 2=n ▯ 2▯ ▯ Y + 1:96▯ 2=n
▯ 2=n
▯ p p ▯
= P Y =2 ▯ 0:98▯ 2=n ▯ ▯ ▯ Y =2 + 0:98▯2=n :
An approximate 95% C.I. for ▯ is
h p p i
▯ ▯ 0:98▯ 2=n; ▯ + 0:98▯ 2=n
^
where ▯ = ▯=2.
^
(e) For these data the maximum likelihood estimate of ▯=2 = 88:92=(2 ▯ 18) =
2:47:
The approximate 95% C.I. for ▯ is
" r r #
2 2
2:47 ▯ 0:98(2:47) ; 2:47 + 0:98(2:47) = [1:66; 3:28]:
18 18
Chapter 5
5.1. P(D ▯ 15) = P(Y ▯ 10 ▯ 15) = P(Y ▯ 25) = 0:000047: There is extremely strong
evidence against 0 : ▯ = 10:
5.2 (a) Assume Y is Binomial(n;▯) and H : ▯ =: (b) n = 20: We can use D = jY ▯4j:
0 5
Then p ▯ value = P(Y = 0;▯ = 5) + P(Y ▯ 8;▯ = 5) = 0:032 so there is evidence
against the model or 0 : (c) n = 100; D = jY ▯ 20j; and the observed value is
d = j32 ▯ 20j: Then the p ▯ value = P(Y ▯ 32;▯ = ) + P(Y ▯ 8;▯ = ) = 0:006 so
5 1 5
there is strong evidence against the model or aga0nst H5: ▯ =
5.3 A test statistic that could be used will be to test the mean of the generated sample.
It should be closed to 0:5 if it is U(0,1)
5.4 (a) likelihood ratio statistic gives ▯ = 0:0885 and p ▯ value = 0:76. There is no
evidence against the hypothesi0 H : ▯ = 100:
5.5 (a) Since this question is very complicated to do manually, here is the R code for it:
> data = c(70,75,63,59,81,92,75,100,63,58)
> L = dmultinom(data,prob=data)
b
> L1 = dmultinom(data,prob=rep(1,10)) #This is L(▯)
> lambda = 2*(log(L)-log(L1))
> SL = 1-pchisq(lambda,9)
▯ = 23:605; p ▯ value = 0:005
6
(b) p ▯ value = 1 ▯ (0:995) = 0:03 247
5.6. ▯ = (0:18;0:5;0:32) by maximizing the likelihood
L(▯) = ▯1▯ 20 32 subject to ▯1+ ▯ 2 ▯ =31
Under the model of the null hypothesis, the maximum likelihood estimate of the
parameter ▯ is b = 0:43 is obtained by maximizing
▯ ▯18 50 ▯ ▯32
L(▯0(▯)) = ▯ 2 (2▯(1 ▯ ▯)) (1 ▯ ▯)2
▯ ▯
Therefore the likelihood ratio statistic has observed value ▯ = 2ln L(▯) = 0:04
L(▯o^))
and p▯value = P(U > 0:04) t 0:84 where U has a Chi-squared(1) degrees of freedom.
Note that there are essentially two parameters in the full model and one in the model
under H 0o the di⁄erence is 1. There is no evidence against the model H :0
Pn P
5.7. a) b = Y ; b = 1 (Yi▯ Y ); b = ▯ ; ▯ b = 1 (Y i ▯ )
ni=1 0 0 0 ni=1 0
2
▯ = nlog b2 the other two terms will cancel o⁄ by substituting inb and ▯b .
b 0
b)
P Pn
1 (Y i ▯ ) (Yi▯ Y ) + n(Y ▯ ▯ ) 2
b0 n i=1 0 i=1 0
2 = n = n
b 1 P P
n (Yi▯ Y ) (Yi▯ Y )
i=1 i=1
so that
n(Y ▯ ▯ )02 T2
▯ = 2nlog(1 + n ) = 2nlog(1 + )
P n ▯ 1
(Yi▯ Y )
i=1
b 27 18 41 29 31 b 146
5.8. ▯ = ( 10125;5580;16050;8435;14200) by usual maximum likelihood method, ▯ =0 54390
by solving maximum likelihood with constraint ▯ = 3:73 and p ▯ value = P(W ▯
3:73) = 0:44 where W~▯ 2 . There is no evidence that the rates are not equal.
(4)
5.10. (a) ▯ = 44:405;s = 5:734; df=19 so solve
q▯ ▯
▯2:09 ▯ 2 ▯ 2:09
20
gives the con
dence interval for ▯, [43:28;45:53] (b) The con
dence intervalfor ▯ is
[1:82;3:50].
Chapter 6
6.1. Assume

More
Less
Related notes for STAT 231