Anda di halaman 1dari 7

AMS572.

01

Practice Midterm Exam #1

Fall, 2009

Name: __________________________ ID: ____________ Signature: _____________


Instruction: This is a close book exam. Anyone who cheats in the exam shall receive a grade of F.
Please provide complete solutions for full credit. The exam goes from 3:50-5:10pm. Good luck!
1. (for all students in class) To determine whether glaucoma affects the corneal thickness,
measurements were made in 8 people affected by glaucoma in one eye but not in the other. The
corneal thickness (in microns) were as follows:
Person
Eye affected
Eye not affected

1
488
484

2
478
478

3
480
492

4
426
444

5
440
436

6
410
398

7
458
464

8
460
476

(a) According to the data, can you conclude, at the significance level of 0.10, that the corneal

thickness is not equal for affected versus unaffected eyes?


(b) Calculate a 90% confidence interval for the mean difference in thickness.
(c) Please write the entire SAS code to check the assumptions necessary in (a) and to
perform the test asked for in (a).
Solution: (a) Using d 4 and s d 10.744 , the test statistic is
t

d 0
sd

40
10.744

1.053

Since t t 81, 0.05 1.895 , do not reject H 0 at 0.10 , and conclude that the
average corneal thicknesses are unaffected by glaucoma.
(b) A 90% CI for 1 2 is given by
d t n 1,

sd

n 4 1.895 10.744

8 [ 11.198,3.198]

(c) The SAS code is as follows.


Data eyes;
Input bad good @@;
Diff=bad-good;
Datalines;
488 484 478 478 480 492 426 444 440 436 410 398 458 464 460 476
;
Run;
Proc univariate data = eyes normal;
Var diff;
Run;

2A (for AMS PhD students). Suppose we have two independent random samples from
2
2
two normal populations: X 1 , X 2 , , X n1 ~ N 1 , , and Y1 , Y2 , , Yn2 ~ N 2 , .
Please derive the pooled-variance t-test using the pivotal quantity method. Please make
sure that you include the following key steps.

(a) Please derive the distribution of X Y

(b) Please derive the distribution of n1 1 S12 n2 1 S 22 / 2


(c) Please derive the distribution of the pooled-variance t statistic (the pivotal
quantity).
(d) Please derive the rejection region for a 2-sided test at the significance level of .
(e) Please illustrate using the pdf plot how to calculate the p-value for a 2-sided test.
Solution:
(Please refer to your lecture notes for the entire derivation.) Here is a
simple outline of the derivation.
(a) We start with the point estimator for the parameter of interest 1 2 : X Y .

Its distribution is N 1 2 , 2 1 / n1 1 / n 2 using the mgf for N , 2 which


is M t exp t 2 t 2 / 2 , and the independence properties of the random
X Y 1 2 ~ N 0,1
samples. From this we have Z
. Unfortunately, Z can
1 / n1 1 / n 2
not serve as the pivotal quantity because is unknown.
(b) We next look for a way to get rid of the unknown following a similar approach
in the construction of the Students t-statistic. We found that
W n1 1 S12 n2 1 S 22 / 2 ~ n21 n2 2 using the mgf for k2 which is

2t

M t

k/2

, and the independence properties of the random samples.

(c) Then we found, from the theorem of sampling from the normal population, and
the independence properties of the random samples, that Z and W are
independent, and therefore, by the definition of the t-distribution, we have
X Y 1 2 ~ t
obtained our pivotal quantity: T
n n 2 , where

S p2

n1 1 S12 n2 1 S 22
n1 n 2 2

S p 1 / n1 1 / n 2

is the pooled sample variance.

(d) The rejection region is derived from P T c , thus c t n n 2, / 2


(e) The p-value is twice the tail area bounded by the test statistic
X Y 10 20
T0
. I will not show the pdf plot here although you should.
S p 1 / n1 1 / n2
1

2B (for all except-AMS PhD students) . Let X1, X2, , Xn be a random sample from a
normal population N(, 2). Furthermore, the population variance 2 is known.
(1). For a 2-sided test of H0: = 0 versus Ha: 0, at the significance level , please
derive the one-sample z-test using the pivotal quantity method. (* Please include the
derivation of the pivotal quantity, the proof of its distribution, and the derivation of the
rejection region for full credit.)
(2) Please derive the 100(1-)% confidence interval for using the pivotal quantity
method.

Solution: [1] Since this is inference on one population mean, we start with its point
estimator the sample mean, X . The distribution of X is N , 2 / n . The distribution
of X is not entirely known because is unknown. By taking the linear transformation
Z

X
, however, we can see that Z is a function of the sample statistics and the
/ n

unknown parameter of interest () only. Furthermore the distribution of Z is completely


known: Z ~ N 0,1 . Thus Z is a pivotal quantity for the inference on .
[2] The following is the proof of the distribution of Z using the moment generating
function method. (Dear students, please notice that I have revised the following
derivation. The original derivation missed the expectation operations! I have modified
our lecture notes # accordingly as well. My sincere appologies for the typos here and
elsewhere. Wei)
tX
t
t X

tZ
/ n
/ n / n
MZ t E e E e
e
E e

n
t
t
t
n

i1 X i
et* i1 X i
/ n
e / n E e n

e
E

t
/ n

t
/ n
t

in1 E et X i e

n t *

in1 e

t*

2 t*

* 2

t
/ n

t
/ n

n
2

n 2

e2
Therefore Z ~ N 0,1 .
[3] Next we derive the one-sample z-test and its rejection region.
For a 2-sided test of H0: = 0 versus Ha: 0, the test statistic is the pivotal quantity
X 0
at = 0, that is, Z 0
. Intuitively, we would reject H0 in favor of Ha if Z 0 c .
/ n
The problem is how to determine c. By the definition of the significance level, we have

Preject _ H0 | H0 P Z0 c | H0 2PZ0 c | H0

Thus / 2 P Z 0 c | H 0 and subsequently we have c Z / 2


That is, at the significance level , we reject H0 in favor of Ha if

Z 0 Z / 2

3 (for all). A new method of making concrete blocks has been proposed. To test whether
or not the new method increases the compressive strength, five sample blocks are

made by each method. The compressive strengths in 10 pounds per square inch are
listed here:
New Method 15 14 13 15 16
Old Method 13 15 13 12 14
(a). Please construct a 95 % percent confidence interval for the mean difference between
the compressive strengths by two methods.
(b). At the significance level .05, can you conclude that the new method increases the
compressive strength?
(c). What assumptions do you need for the inference in parts (a) and (b)?
(d). Please write up the entire SAS program necessary to answer questions raised in (a),
(b) and (c). Please include the data step as well as tests for testing for various
assumptions.
Solution:

Inference on two population means. Two small and independent samples.

New method: X 1 14.6, s1 1.14, n1 5.


Old method: X 2 13.4, s2 1.14, n2 5.
Under the normality assumption, we test if the two population variances are equal
H 0 : 12 22 vs H a : 12 22 .
Test statistic is
s2
F0 12 1 , F4,4,0.025 9.60 and F5,5,.0975 1/ F5,5,.025 1/ 9.60 0.1042 .
s2
Since F0 is between 0.1042 and 9.60, we cannot reject H0 . Therefore it is reasonable
2
2
to assume that 1 2 .
(a) 95% C. I. for difference is
X 1 X 2 t8,0.025 s p

1
1

14.6 13.4 2.306 * 1.14 2 / 5


n
n2

(n1 1) s12 (n2 1) s22


4 1.142 4 1.14
2

1.14
n1 n2 2
55 2
Therefore 95% C.I. is [-0.46, 2.86].
(b) Using t-test with hypotheses H 0 : 1 2 v.s. H a : 1 2 ,
X X 2 0 14.6 13.4
t0 1

1.664 t8,0.05 1.860.


s p n11 n12
1.14 15 15
where s p

Thus, we cannot reject H0. There isn't enough evidence to conclude that the new
method increases the strength.
(c) (1) Both populations are normally distributed

2
2
(2) 1 2

(d) /*Problem #4B*/


data four;
input method strength;
datalines;
1 15
1 14
1 13
1 15
1 16
2 13
2 15
2 13
2 12
2 14
;
run;
proc univariate data=four normal;
class method;
var strength;
title 'Check for normality';
run;
proc ttest data=four;
class method;
var strength;
title 'Independent samples t-test';
run;
proc npar1way data=four wilcoxon;
class method;
var strength;
title 'Nonparametric test for two-mean comparisons';
run;

4. (for all students in class). John Pauzke, president of Cereals Unlimited, Inc., wants to
be very certain that the mean weight of packages satisfies the package label weight of
16 ounces. The packages are filled by a machine that is set to fill each package to a
specified weight. However, the machine has random variability measured by 2. John
would like to have strong evidence that the mean package weight is above 16 ounces.
George Williams, quality control manager, advises him to examine a random sample of
25 packages of cereal. From his past experience, George knew that the weight of the
cereal packages follows a normal distribution with standard deviation 0.4 ounce. At the
significance level =.05,
(1) What is the decision rule (rejection region) in terms of the sample mean x ? Please
derive the general formula using the concept of Type I error rate.
(2) What is the power of the test when =16.2 ounces? Please derive the general formula
for power calculation first.

(3) What is the sample size necessary to ensure a power of 80% when =16.2 ounces?
Please derive the general formula for sample size calculation based on the Type I and II
error rates first.
Solution:
(1)
H 0 : 16

H a : 16

0.4, n 25, 0.05 . X ~ N ( , ) .


n
2

Z0

X 0
X 16

.
/ n 0.4 / 25

P( Z 0 C | H 0 )

X 16
0.4
z X 16
z0.05
5
0.4 / 25

Hence, the rejection region is X 16

0.4
1.645 16.1316 .
5

(2)
H 0 : 16 0

H a : 16.2 a 16
Power P (reject H 0 | H a )
P ( Z 0 z0.05 | 16.2)
X 0
z0.05 | 16.2)
/ n
P ( X 16.1316 | 16.2)
P(

X 16.2 16.1316 16.2

| 16.2)
0.4 / 5
0.4 / 5
P( Z 0.855)
0.805
P(

(3)
H 0 : 16 0

H a : 16.2 a 16
power 0.8 0.2. 0.4, 0.05 .

( z z ) 2 2
( a 0 ) 2

(1.645 0.845) 2 0.42 6.20010.16

(16.2 16) 2
0.22

0.992016
24.8 25
0.04

Hence, about 25 packages of cereal should be sampled to achieve a power of 80% when
=16.2 ounces.

Anda mungkin juga menyukai