252solngr2-072 10/23/07 ECO 252 Second Graded Assignment R. E. Bove

advertisement
252solngr2-072 10/23/07
ECO 252 Second Graded Assignment
R. E. Bove
Name:
Class days and time:
Student Number:
Please include class and student number on what you hand in! Papers should be stapled. Your
writeup should state clearly what you did and concluded.
1. Which of the following could be null hypotheses? Which could be an alternate hypothesis? Which could
be neither? Why? If some of these are valid null hypotheses, state the alternate. If some of these are valid
alternative hypotheses, state the null. Label H 0 and H 1 clearly. (i) p  1.2, (ii) p  .3
(iii)   0.35, (iv)   3 (v) x  1.22 , (vi)   3 (vii)   0.45, (viii) s  0.45, (ix)   25 , (x)
  1005 .37 .
Problem 2: A Federal agency is checking weights of an ‘8 ounce’ container of a product. A random sample
of 13 bottles is taken. Results are below.
7.81
7.92
7.94
8.00
7.95
7.91
7.98
8.05
8.17
7.80
7.80
7.80
7.90
Personalize the data as follows: change the last digit of the weights of the last three bottles to the
last three digits of your student number. Example: Ima Badrisk has the student number 123456; so the last
three numbers become {7.84, 7.85, 7.96}.
Compute the sample standard deviation using the computational formula. (Even better copy it from
Grass 1!). Test the hypothesis that the mean is below 8 ounces. Assume that the confidence level is
90%.
a) State your null and alternative hypotheses.
b) Find critical values for the sample mean and test the hypothesis. Show your reject region on a
diagram
c) Find a one-sided confidence interval for the sample mean and test the hypothesis. Show your
results on a diagram.
d) Use a test ratio for a test of the sample mean. Show your reject region on a diagram
e) Find a p-value for the null hypothesis and use the p-value to test the hypothesis.
Problem 3: Continue with your results from Problem 2.
a) Will we reject the null hypothesis in problem 2 at a significance level of (i) .001? (ii) .01? (iii)
.10? Using the p-value explain why.
b) Use the mean that you found in Problem 2, a known population standard deviation of 0.20 and
test the hypothesis that the mean is 8 using a 95% confidence level and a critical value or values
for the sample mean. (You cannot test the validity of a hypothesis that you haven’t stated!)
c) Find an approximate p-value for the statement.
d) Will we reject the hypothesis in 3b at a significance level of (i) .001? (ii) .01? (iii) .10? Using
the p-value explain why.
Note that none of the problems beyond this point involve sample means.
Problem 4: (Kazmier) A university placement director asserts that at least 50% of seniors had found jobs
by April 1. A random sample of 50 seniors is polled and 15  a  of these students indicate that they have
jobs. Personalize the sample results by using the last digit of your student number as a . Test the truth of the
director's claim using a 90% confidence level.
a) State your null and alternative hypotheses.
b) Find a test ratio for a test of the proportion.
c) Find a p-value for this ratio and use it to test the hypothesis at a 1% significance level.
Extra Credit Problem 5:
252solngr2-072 10/23/07
a) Finish problem 4 by finding an appropriate confidence interval for the proportion and showing
whether it contradicts the null hypothesis. Use a 90% confidence level.
b) Assume that the sample size is 10 and 2 have jobs. Repeat the test at the 90% confidence level
without using the Normal distribution.
c) Use the data in problem 1 to test the hypothesis   0.20.
d) Using your data in Problem 1, test the hypothesis that the median is below 7.95 ounces.
e) Use Minitab to check your answer to problem 4. Do this three ways.
First: Enter Minitab. Use the Editor pull-down menu to enable commands. Then enter the
commands below.
Pone 50 15+ x ;
(Replace 15+x with the number you used.)
Test 0.50;
Alter -1;
(Makes H1 ‘less than.’)
useZ.
(Uses normal approx. to binomial)
Second: Use the Stat pull-down menu. Choose ‘Basic Stat’ and then ‘1 proportion.’
Check ‘summarized data’ and enter your n and 50+ x . Press Options. Set ‘test proportion’ as
0.50, alternative hypothesis as ‘less than’ and check ‘Normal distribution.’ Go.
Third: Use the pull-down menu again. But before you start put 10  x yeses and 50  x noes in
column 1. Uncheck ‘summarized data’ and let Minitab know that the data are in column 1 (C1).
Other options are unchanged.
(Fourth: repeat your third try, but uncheck ‘Normal distribution.’ Can you explain why the p-value
goes up?)
252solngr2-072 10/23/07
ECO 252 Second Graded Assignment Solution
Problem 1: Which of the following could be null hypotheses? Which could be an alternate hypothesis?
Which could be neither? Why? If some of these are valid null hypotheses, state the alternate. If some of
these are valid alternative hypotheses, state the null. Label H 0 and H 1 clearly. (i) p  1.2, (ii) p  .3
(iii)   0.35, (iv)   3 (v) x  1.22 , (vi)   3 (vii)   0.45, (viii) s  0.45, (ix)   25 , (x)
  1005 .37 .
Solution: Remember the following:
α) Only numbers like , p,  2 ,  and (the population mean, proportion, variance,
standard deviation and median) that are parameters of the population can be in a
hypothesis; x , p, s 2 , s and x.50 (the sample mean, proportion, variance, standard deviation
and median) are statistics computed from sample data and cannot be in a hypothesis because
a hypothesis is a statement about a population;
β) The null hypothesis must contain an equality;
γ) p must be between zero and one;
δ) A variance or standard deviation cannot be negative.
(i) p  1.2 could not be H 0 or H 1 since it contains an unreasonable value for a parameter.
(ii) p  .3 could not be H 0 or H 1 because p is a sample statistic, not a parameter.
(iii)   0.35 can be H 0 since it contains a parameter and an equality. H 1 would be   0.35 .
(iv)   3 can be H 0 since it contains a parameter and an equality. H 1 would be   3 .
(v) x  1.22 could not be H 0 or H 1 because x is a sample statistic, not a parameter.
(vi)   3 could not be H 0 or H 1 since it contains an unreasonable value for a parameter.
(vii)   0.45 can be H1 since it contains a parameter and an inequality. H 0 would be   0.45 .
(viii) s  0.45 could not be H 0 or H 1 because s is a sample statistic, not a parameter.
(ix)   25 can be H1 since it contains a parameter and an inequality. H 0 would be   25 .
(x)   1005 .37 can be H 0 since it contains a parameter and an equality. H 1 would be   1005 .37 .
Learn to make  and call it ‘mu.’ It’s not a ‘u’ and you are too young to be unable
to adjust to using a Greek letter!
Problem 2: A Federal agency is checking weights of an ‘8 ounce’ container of a product. A random sample
of 13 bottles is taken. Results are below.
7.81
7.92
7.94
8.00
7.95
7.91
7.98
8.05
8.17
7.80
7.80
7.80
7.90
Personalize the data as follows: change the last digit of the weights of the last three bottles to the
last three digits of your student number. Example: Ima Badrisk has the student number 123456; so the last
three numbers become {7.84, 7.85, 7.96}.
Compute the sample standard deviation using the computational formula. (Even better copy it from
Grass 1!). Test the hypothesis that the mean is below 8 ounces. Assume that the confidence level is
90%.
Solution: (Copied from 252solngr1-072) Two data sets for computations of the variance are shown here.
They will be referred to as solution 1 and solution 2. The first represents a student number of 000000 and
the second 999999.
252solngr2-072 10/23/07
1
2
3
4
5
6
7
8
9
10
11
12
13
x12
x1
index
x 22
x2
7.81 60.9961
7.92 62.7264
7.94 63.0436
8.00 64.0000
7.95 63.2025
7.91 62.5681
7.98 63.6804
8.05 64.8025
8.17 66.7489
7.80 60.8400
7.80 60.8400
7.80 60.8400
7.90 62.4100
103.03 816.6985
7.81 60.9961
7.92 62.7264
7.94 63.0436
8.00 64.0000
7.95 63.2025
7.91 62.5681
7.98 63.6804
8.05 64.8025
8.17 66.7489
7.80 60.8400
7.89 62.2521
7.89 62.2521
7.99 63.8401
103.30 820.9528
Computation of Sample Variances using the computational formula.
x
n1  n 2  13 ,
1
The means are x1 
s12 
x
2
1
 nx12
n 1
x


 103.03 ,
x
1
n

x
2
1
 816 .6985 ,
x
2
 103.30 and
103 .03
 7.92538 and x 2 
13
x
2

n
x
2
2
 820 .9528 .
103 .30
 7.94615
13
816 .6985  137.92538 2 0.146123

 0.0121769 s1  0.0121769  0.1103
12
12
820 .9528  137.94615 2 0.115108

 0.00959231 s 2  0.00959231  0.09794
12
n 1
12
Computation of Standard Errors
s 22
s x1 
s1
s x2 
s2
2
2
 nx 22


s12
0.0121769

 0.000936685  0.03060
n
13

s 22
0.00959231

 0.00073787  0.02716
n
13
n
n
Finding t
The significance level is given as 90%. n1  n 2  13
12
12
 1.356
1    .90 ,   .10 ,  2  .05 , t n1  t .05
 1.782 , tn 1  t .10
{ttable}
2
a) State your null and alternative hypotheses.
Solution: The question asks us to test the hypothesis that the mean is below 8 ounces. This is   8 and
H 0 :   8
must be an alternate hypothesis because it contains no equality. Our hypotheses are 
.
H 1 :   8
b) Find critical values for the sample mean and test the hypothesis. Show your reject region on a
diagram.
Solution: The general formula for a critical value for the sample mean when the population standard
deviation is unknown is x cv   0  t n1 s x {Table 3}. But our alternate hypothesis is H 1 :   8 , so that
2
we want one critical value for the sample mean that is below (to the left of) 8. The formula becomes
x    t n1 s . From 252solngr1-072 x  7.92538, and x  7.94615, s  0.03060 ,
cv
0

x
1
s x2  0.02716 , n1  n 2  13 , 1    .90 ,   .10 and
2

x1
n 1  t 12  1.356 , so,
2  .05 . We just found t 
.10
in the first version, reject the null hypothesis if x1 is below x cv1   0  tn 1 s x1  8  1.356 0.03060 
 7.9585 . x1  7.92538 is below this, so reject the null hypothesis.
252solngr2-072 10/23/07
In the second version, reject the null hypothesis if x 2 is below x cv 2   0  tn 1 s x2  8  1.356 0.02716 
 7.9632 . x 2  7.94615 is below this, so reject the null hypothesis.
c) Find a one-sided confidence interval for the sample mean and test the hypothesis. Show your
results on a diagram.
Solution: The alternative hypothesis has the form H 1 :   8 . The two sided formula for a confidence
interval reads   x  t s x , which becomes, if we use the direction of the alternative hypothesis,
2
  x  t s x . For version 1 the interval is   7.92538 7  1.356 0.03060   7.9669
For version 2 we have   7.94615 1.356 0.02716   7.9830 . Both of these contradict the null hypothesis
H 0 :   8 , so we reject the null hypothesis. On a diagram shade the areas below 7.9669 and below 7.9669
and show that 8 does not fall into both these areas.
d) Use a test ratio for a test of the sample mean. Show your reject region on a diagram
x  0
Solution: Find t 
and, if we are not to reject the hypothesis in a left-sided test, show that this ratio
sx
is above -1.356, since the ‘reject’ region is the area under an approximately Normal curve (with a center at
7.925387  8
7.94615  8
 2.4383 and t 2 
 1.9827 are both below zero) that is below -1.356 . t1 
0.03060
0.02716
1.356, so reject the null hypothesis.
e) Find a p-value for the null hypothesis and use the p-value to test the hypothesis. Note – the
words ‘using the Normal table’ were a mistake !!!!
Solution: We have 12 degrees of freedom and the t-table for 12 degrees of freedom is below. {ttable}
df .45 .40 .35 .30 .25 .20 .15 .10 .05 .025 .01 .005 .001
12 0.128 0.259 0.395 0.539 0.695 0.873 1.083 1.356 1.782 2.179 2.681 3.055 3.930
12 
12
12 
12
 2.179 and t .01
 1.782 and t .025
 2.179.
2.4383 falls between t .025
 2.681. 1.9827 is between t .05
So in the first version .01  p  value  .025 and in the second version .025  p  value  .05 . Since our
significance level is 10% and the p-values are below 10%, we reject the null hypothesis in both cases.
Problem 3: Continue with your results from Problem 2.
a) Will we reject the null hypothesis in problem 2 at a significance level of (i) .001? (ii) .01? (iii)
.10? Using the p-value explain why.
Solution: We found in the first case that .01  p  value  .025 and in the second case that
.025  p  value  .05 . These p-values are above .001 and .01 and below .10, so we do not reject the null
hypothesis if the significance level is .001 or .01 and we reject the null hypothesis for a significance level of
.10.
b) Use the mean that you found in Problem 2, a known population standard deviation of 0.20 and
test the hypothesis that the mean is 8 using a 95% confidence level and a critical value or values
for the sample mean. (You cannot test the validity of a hypothesis that you haven’t stated!)
H 0 :   8
0.20

Solution: We are now testing 
and we have n1  n 2  13 ,   0.20 ,  x 
13
H 1 :   8
0.20 2
13
 0.0030769  0.0555 , x1  7.92538, and x 2  7.94615,   0.20 , 1    .95 and   .05 . So
z   z .025  1.960 and the critical value is xcv   0  z.025 x  8  1.960 0.0555   8  0.1088 . So we
2
reject the null hypothesis if the sample mean is below 7.891 or above 8.109. Make a diagram and show that
neither x1  7.92538 or x 2  7.94615 fall into the ‘reject’ area.
252solngr2-072 10/23/07
c) Find an approximate p-value for the statement.
x  0
7.92538  8
 1.34 and
Solution: We are now computing the test ratio z 
. In version 1 z 
0.0555
x
p  value  2Pz  1.34   2.5  .4099   .1802 In version 2 z 
p  value  2Pz  0.97   2.5  .3340   .3320 {norm}
7.94615  8
 0.97 and
0.0555
d) Will we reject the hypothesis in 3b at a significance level of (i) .001? (ii) .01? (iii) .10? Using
the p-value explain why.
Solution: We are now comparing our p-values with .001, .01 and .10. It seems that the p-values are above
all of these significance levels so that we never reject the null hypothesis.
Note that none of the problems beyond this point involve sample means.
Problem 4: (Kazmier) A university placement director asserts that at least 50% of seniors had found jobs
by April 1. A random sample of 50 seniors is polled and 15  a  of these students indicate that they have
jobs. Personalize the sample results by using the last digit of your student number as a . Test the truth of the
director's claim using a 90% confidence level.
a) State your null and alternative hypotheses.
H 0 : p  .50
Solution: The director states that the proportion is above .50, so our hypotheses are 
.
H 1 : p  .50
b) Find a test ratio for a test of the proportion.
Solution: I will assume that a  0 , so x  15  0  15 . The observed proportion is p 
formula {Table 3} for the test ratio is z 
p  p0
p

p  p0
p0q0
n

x 15

. The
n 50
15
 .50
.30  .50
.20
50


 2.83 .
.
0707107
.005
.50 .50 
50
25
 .50
.50  .50
0
If a  10 , x  15  10  25 and z  50


 0. .
.0707107
.50 .50 
.005
50
c) Find a p-value for this ratio and use it to test the hypothesis at a 1% significance level.
Solution: This is a left-sided test since the null hypothesis can only be refuted by values of the sample
proportion that are sufficiently below .50. If a  0 , p  value  P p  .30   Pz  2.83  .5  .4977 
 .0023 . Since the p-value is below   .01 , we reject the null hypothesis.
If a  10 , p  value  P p  .50   Pz  0  .5 . Since this p-value is above   .01 , we cannot reject the
null hypothesis.
252solngr2-072 10/23/07
Extra Credit Problem 5:
a) Finish problem 4 by finding an appropriate confidence interval for the proportion and showing
whether it contradicts the null hypothesis. Use a 90% confidence level.
H : p  .50
Solution: Our hypotheses are  0
. The formula for a two- sided confidence interval is {Table 3}
H 1 : p  .50
p  p  z 2 s p  p  z 2
pq
. In view of the alternate hypothesis and using z  z.10  1.282 {ttable},
n
pq
 p  1.282
n
this becomes p  p  z  s p  p  z
pq
x 15
. If we have a  0 , p  
 .30 . So
n
n 50
.30 .70 
 .30  1.282 .0042  .30  1.282 .06481   .30  .0831 or p  .3831 . This
50
definitely contradicts H 0 : p  .50 . Make a diagram of a Normal curve with a center at p  .30 . To
represent the confidence interval shade the area below .3831, which includes p  .30 . To represent the null
hypothesis, shade the area above .50 or merely mark .50 on the graph. It should be apparent that .50 is not
in the confidence interval or that the area above .50 does not intersect the confidence interval.
p  .30  1.282
If a  10 , p 
.50 .50 
x 25


 .50 . The one-sided confidence interval is p  .50  1.282
50
n 50
.50  1.282 .005  .50  1.282 .070711   .50  .0907 or p  .5907 . Make a diagram of a Normal curve
with a center at p  .50 . To represent the confidence interval shade the area below .5907, which includes
p  .50 . To represent the null hypothesis, shade the area above .50 or merely mark .50 on the graph. It
should be apparent that .50 is in the confidence interval or that the area above .50 intersects the confidence
interval.
b) Assume that the sample size is 10 and 2 have jobs. Repeat the test at the 90% confidence level
without using the Normal distribution.
H 0 : p  .50
Solution: Our hypotheses are 
. We expect, if the null hypothesis is true that there will be 5 or
H 1 : p  .50
more students out of the 10 that have jobs. The sample is too small to use a Normal approximation to the
binomial distribution, so we must use the binomial table. To get a p-value, assume that p  .50 and find
Px  2 . The binomial table says that for n  10 and p  .50 , Px  2 = 0.05469{bin}. If our significance
level is .10, the p-value is below the significance level and we reject the null hypothesis.
c) Use the data in problem 1 to test the hypothesis   0.20.
2
H 0 :   0.20
 H 0 :   0.04
Solution: Our hypotheses are 
or 
. Remember that n1  n 2  13 ,
 H 1 :  2  0.04
H 1 :   0.20
s12  0.0121769 and s 22  0.00959231 . The test ratio
2 
n  1s 2
 02
has the chi-squared distribution
with n  1  12 degrees of freedom. Assume   .05 . We will not reject the null hypothesis if the test ratio
lies between  2n -1   212 and  2n1   212 . If we look up these two values we find {chiSq} that on
1- 2
.975

2
.025
12  21 .9201
212
 3.8157 and  .2025
the column in the chi-squared table for 16 degrees of freedom that  .975
.
We can then compute the test ratio for the first sample variance
2 
n  1s 2

2
0

12 0.0121769 

0.04
 3.6507 Since this value is not between 3.8157 and 21.9201, we can reject the null hypothesis.
252solngr2-072 10/23/07
For the second sample variance
2 
n  1s 2

2
0

12 0.00959231 
 2.8777 . This value too is not
0.04
between the two critical points on the table, so we will reject the null hypothesis.
d) Using your data in Problem 1, test the hypothesis that the median is below 7.95 ounces.
 H :  7.95
Solution: Our hypotheses are  0
.
 H 1 :  7.95
If we put our data in order, we get the table on
Row
x1
x2
the right. We have 12 values if we eliminate
1 7.80 7.80
2 7.80 7.81
7.95. If y1 is the number of items in the first
sample that are above 7.95 and y 2 is the
number in the second we have y1  4 and
y 2  5. If we check the table in the outline
{252ones}, we have the correspondences below.
Hypotheses about
A median
Hypotheses about a
proportion
If p is the
If p is the
proportion
proportion
above  0
below  0
 H 0 :   0

 H 1 :   0
 H 0 :   0

H 1 :   0
 H 0 :   0

H 1 :   0
 H 0 : p .5

 H 1 : p .5
 H 0 : p .5

 H 1 : p .5
 H 0 : p .5

 H 1 : p .5
 H 0 : p .5

 H 1 : p  .5
 H 0 : p .5

 H 1 : p  .5
 H 0 : p .5

 H 1 : p  .5
3
4
5
6
7
8
9
10
11
12
13
7.80
7.81
7.90
7.91
7.92
7.94
7.95
7.98
8.00
8.05
8.17
7.89
7.89
7.91
7.92
7.94
7.95
7.98
7.99
8.00
8.05
8.17
 H : p  .5
If we let p be the proportion above 7.95, our hypotheses correspond to  0
. If we use
 H 1 : p  .5
4
5
p1 
 .25 and p 2 
 .4167 . We are doing a left-sided test, so for the first sample we have from
12
12
the binomial table (for n  12 and p  .50 ) {bin} p  value  P p1  .25   P y1  4  .19385 and, for
the second sample p  value  P p 2  .4167   P y 2  5  .38721 . If we assume a 5% significance level,
both of these p-values are above the significance level, and we cannot reject the null hypothesis in either
case.
252solngr2-072 10/23/07
e) Use Minitab to check your answer to problem 4. Do this three ways.
First: Enter Minitab. Use the Editor pull-down menu to enable commands. Then enter the
commands below.
Pone 50 15+ x ;
(Replace 15+x with the number you used.)
Test 0.50;
Alter -1;
(Makes H1 ‘less than.’)
useZ.
(Uses normal approx. to binomial)
Second: Use the Stat pull-down menu. Choose ‘Basic Stat’ and then ‘1 proportion.’
Check ‘summarized data’ and enter your n and 50+ x . Press Options. Set ‘test proportion’ as
0.50, alternative hypothesis as ‘less than’ and check ‘Normal distribution.’ Go.
Third: Use the pull-down menu again. But before you start put 10  x yeses and 50  x noes in
column 1. Uncheck ‘summarized data’ and let Minitab know that the data are in column 1 (C1).
Other options are unchanged.
(Fourth: repeat your third try, but uncheck ‘Normal distribution.’ Can you explain why the p-value
goes up?)
————— 9/27/2007 3:44:54 PM ————————————————————
Welcome to Minitab, press F1 for help.
MTB > pone 50 15;
SUBC> test 0.5;
SUBC> alter -1;
SUBC> usez.
Test and CI for One Proportion
Test of p = 0.5 vs p < 0.5
Sample
1
X
15
N
50
Sample p
0.300000
95%
Upper
Bound
0.406599
Z-Value
-2.83
P-Value
0.002
 H : p  .5
These instructions tested  0
and, since the p-value is below 10%, resulted in a rejection of
 H 1 : p  .5
the null hypothesis.
MTB > POne 50 15;
SUBC>
Confidence 90.0;
SUBC>
Alternative -1;
SUBC>
UseZ.
This was done using the pull-down menu.
I used the options to set the confidence level at 90%
The confidence level only affected the upper limit.
Test and CI for One Proportion
Test of p = 0.5 vs p < 0.5
Sample
1
X
15
N
50
Sample p
0.300000
90%
Upper
Bound
0.383054
MTB > POne c1;
SUBC>
Confidence 90.0;
SUBC>
Alternative -1;
SUBC>
UseZ.
Z-Value
-2.83
P-Value
0.002
This was done using the pull-down menu and a column
of yeses and noes. Most likely, the absence of a
continuity correction is causing an underestimate of
the p-value.
Test and CI for One Proportion: C1
Test of p = 0.5 vs p < 0.5
Event = y
Variable
C1
X
15
N
50
Sample p
0.300000
90%
Upper
Bound
0.383054
Z-Value
-2.83
P-Value
0.002
252solngr2-072 10/23/07
MTB > POne c1;
SUBC>
Confidence 90.0;
SUBC>
Alternative -1.
This was done using the pull-down menu and a column
of yeses and noes. The Binomial distribution
was used instead of the Normal.
Test and CI for One Proportion: C1
Test of p = 0.5 vs p < 0.5
Event = y
Variable
C1
X
15
N
50
Sample p
0.300000
90%
Upper
Bound
0.398176
Exact
P-Value
0.003
252solngr2-072 10/23/07
Download