MATH 181B: HOMEWORK 1 SOLUTION
1. (a) Since (Y1 , .Yk ) have multinomial distribution, the probability mass function is:
P (Y1 = r1 , Y2 = r2 , ., Yk = rk ) =
n!
r
pr1 pr2 .pkk
r1 !, r2 !, ., rk ! 1 2
The sum of the probability mass function is
rA
n!
r
pr
Math 181B
Homework1 Solutions
Due April. 19
Problem 1
(a) This is a complicated Hypothesis, since NP lemma cant be used directly,
we need to nd a way to simplify it. And indeed the UMP test for
H0 : 0 , H1 : < 0
is equivalent to the UMP for simple hypothe
Math 181B Homework 5 Solution
Wackerly 10.97:
c You would reject if 2N1 + N2 the 1 quantile of Binom(2n, 0 ).
d Yes. The test eventually does not depend on the choice of a > 0 . This means that
there is one same test that is MP level for any a > 0 , which
Math 181B Homework 2 Solution
Wackerly 10.46:
Since the standard error is always a positive number, we can rewrite the inequality defining
rejecting region
0
> z
0 > z
0 < z .
The large-sample 1 lower confidence bound is the right-hand-side expression,
Math 181B Homework 6 Solution
Larsen and Marx 11.2.4:
Left: the residuals are not centered at zero.
Right: the residuals are not symmetrically distributed around zero.
Larsen and Marx 11.2.5:
This is called extrapolation. There is no way to check if the l
Math 181B Homework 7 Solution
Larsen and Marx 11.3.24:
This is a special case of Pythagorean Theorem. Let
Y1
x1
1
Y = . , x = . , 1 = .
Yn
xn
1
is the projection of Y onto the linear subspace spanned by cfw_1. Y
is the projection
in Rn . Y
of Y onto th
Math 181B Homework 4 Solution
Wackerly 10.107: Let the two samples be X1 , . . . , Xn and Y1 , . . . , Ym .
The likelihood is
m
Y
1
1
1
1
exp 2 (Xi 1 )
exp 2 (Yj 2 ) .
L(1 , 2 , ) =
2 2
2 2
j=1
i=1
2
n
Y
The log-likelihood is
n
m
X
m+n
1 X
l(1 , 2 , 2 )
Math 181B Homework 10 Solution
Larsen and Marx 12.2.7:
You should fill the table using the following order:
Source
df
Treatment 4
Error
4th
Total
5th
SS
MS
2nd
3rd
377.36
F
1st 6.40
10.60
By
F =
M ST R
,
M SE
we first get
M ST R = F M SE = 67.84.
By
M ST
Math 181B Homework 3 Solution
Wackerly 10.81:
a From the F-test theorem, you can either define
F =
and reject H0 if
S12 H0 1
F2
S22
n
o
F F21,/2 or F F12,1/2 ,
or use its reciprocal
F 1 =
and reject H0 if
S22 H0 2
F 1
S12
n
o
F 1 F12,/2 or F 1 F12,1/2 ,
Math 181B Homework 1 Sample Code
In this homework, you have to draw a power curve. For each form the alternative Ha , the
power is defined as
P (Reject H0 ) = p().
This is a function of . Once you imput a , the expression outputs a power. The power
curve
MATH 181B: HOMEWORK 3 SOLUTION
1. (a)Solution
Recall that the density for an Exponential() distribution is given by
ex
0
f (x; ) =
if x 0
.
otherwise
Since X1 , ., Xn have an exponential distribution,
1
P (Xi < 1) =
ex dx = 1 e
0
2
P (1 < Xi < 2) =
ex dx
MATH 181B: HOMEWORK 2 SOLUTION
1.
(a) We consider T under the null hypothesis
H 0 : p1 = p2 = p
In this case, we have
Ecfw_1 p2 = n1 p/n1 n2 p/n2 = 0
p
And by independence
V arcfw_1 p2 = V arp1 + V arp2 =
p
1
1
+
n1
n2
p(1 p).
Then by the Central Limit
MATH 181B: HOMEWORK 4 SOLUTION
Problem 1
Find MLE, form , and simplify LRT.
Step 1 We just need to nd X , Y , . The answer is given directly in the following, to know the details,
please imitate the solution of Problem 1.
nX + mY
X = X, Y = Y , 0 =
Math 181B
Homework 7 Solutions
Problem 1
(a) First, from lecture notes, we have:
0 = Y 1 X
n
i=1 Xi Yi
n
2
i=1 Xi
1 =
nX Y
nX
For the second model, Yi = + (Xi X) + i , we can just see Xi X
as another sequence of constants ( i.e. let Zi = Xi X). Notice