Transcript Document

381
Hypothesis Testing
(Decisions on Means)
QSCI 381 – Lecture 27
(Larson and Farber, Sect 7.2)
Using p-values to Make Decisions
(Recap-I)
381


To use a p-value (the probability of obtaining a test
statistic as extreme or more extreme than that
actually obtained, given that the null hypothesis is
true) to draw a conclusion in a hypothesis test,
compare the p-value to :
 If p  , then reject H0.
 If p > , then fail to reject H0.
Therefore, if p=0.0761 what conclusions do you draw
for =0.1, 0.05 and 0.01?
Using p-values to Make Decisions
(Recap-II)
381

After determining the test statistic:




p = Area in left tail for a left-tailed test.
p = Area in right tail for a right-tailed test.
p = 2 x area in tail of the test statistic for a twotailed test.
For a right-tailed test (i.e. the population
parameter  some value), the test statistic is
2.31. What is the p-value to use? Would you
reject the hypothesis for =0.01 or 0.05?
Z-test for a Mean
381


The
is a statistical test for a
population mean. The test statistic is the
sample mean x and the standardized
test statistic is:
Notes:


x  x 
z

x
/ n
The z-test can be used when the population is normal
and  is known, or for any population when the
sample size n is at least 30.
When n  30, you can use the sample standard
deviation s in place of .
Overview – Large sample sizes-I
381
1.
2.
3.
State the claim mathematically and verbally. Identify
the null and alternative hypotheses.
H0 = ?;
Ha = ?
Specify the level of significance.
=?
Determine the standardized test statistic:
x 
z
/ n
4.
If n  30, use s.
Find the area that corresponds to z.
381
Overview – Large sample sizes-II


Find the P-value:
 For a left-tailed test, p = (area in left tail).
 For a right-tailed test, p = (area in right tail).
 For a two-tailed test, p = 2*(area in the tail of test statistic).
Make decision whether or not to reject H0.



Reject H0 if the p-value  .
Fail to reject H0 if the p-value > .
Interpret the results.
Worked Example-I
381

The mean output from an age reader in
a lab is known to be 30 otoliths per day.
A new age reader joins the team and
reads 795 otoliths (standard deviation
10 per day) in his first 30 days. Is the
performance of the new age reader
sufficiently poor that he should be
fired?
Worked Example-II
381
1.
2.
3.
H0 is   30; Ha < 30.
We had better use =0.01 – we don’t
want to fire this person incorrectly!
Calculate the test statistic:
z
4.
(795 / 30)  30
 1.92
10 / 30
The area corresponding to this value
of z is 0.027 (=NORMDIST(1.92,0,1,TRUE) in EXCEL)
Worked Example-III
381
6.
This is a left-tailed test.
The p-value is greater than 0.01 so we don’t reject
the null hypothesis.
7.
Notes:
5.
1.
2.
Had we assumed =0.05 we may have fired our new age
reader!
We could have calculated the area more directly using the
EXCEL statement:
=NORMDIST(795/30,30,10/SQRT(30),TRUE)
Another Example
381

It is known that students taking MATH
481 sleep on average 3 hours per night.
Some changes are made to Windows
and we sample sleep time for 60
students and find it to be 3.3 hours
(standard deviation 1 hour). Has the
new version of Windows changed the
amount of sleep – use =0.05.
Rejection Regions and Critical Values-I
381

A
(or critical region) of
the sampling distribution is the range of
values for which the null hypothesis is
not probable. If a test statistic falls in
this region, the null hypothesis is
rejected. A
z0 separates
the rejection region from the nonrejection region.
Rejection Regions and Critical Values-II
381
Specify the level of significance.
Decide whether the test is left-tailed, righttailed or two-tailed.
Find the critical value, z0:
1.
2.
3.
1.
2.
3.
Left-tailed, find the z-score that corresponds to
an area of .
Right tailed, find the z-score that corresponds to
an area of 1-.
Two-tailed, find the z-scores that correspond to
areas of ½ and 1-½.
381
Rejection Regions and Critical Values-III
Reject H0
z0
do not
reject
do not
reject
0
0
Left-tailed test
Right-tailed test
do not
reject
Reject H0
-z0
0
Two-tailed test
Reject H0
z0
Reject H0
z0
Calculate the standardized test statistic
and compare it with the rejection region.
Worked Example again
381




This was a left-tailed test.
The test statistic was -1.92
The critical value is -2.33.
We do not reject the null hypothesis.
=0.01
2.33
0
Left-tailed test
=0.05
1.64
0
Left-tailed test
Another example
381

The target escapement for salmon
rivers in a given watershed is 2,000,000
fish per river per annum. You believe
that the actual escapement differs from
this so you sample 40 rivers. You find
the escapement to be 2,200,000 (s.d.
500,000). You are likely to be an expert
witness in a hearing so choose your
level of significance carefully.