Download Section 9.1 - USC Upstate: Faculty

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Probability wikipedia , lookup

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Transcript
Section 9.1
Introduction to Statistical Tests
Hypothesis testing is used to make decisions
concerning the value of a parameter.
9.1 / 1
Null Hypothesis: H0
• Is a working hypothesis about the population
parameter in question
• The value specified in the null hypothesis is
often:
• a historical value
• a claim
• a production specification
9.1 / 2
Alternate Hypothesis: H1
• Is any hypothesis that differs from the null
hypothesis
• An alternate hypothesis is constructed in such
a way that it is the one to be accepted when
the null hypothesis must be rejected.
9.1 / 3
Example
A manufacturer claims that their light bulbs burn for an
average of 1000 hours. We have reason to believe that the
bulbs do not last that long. Determine the null and
alternate hypotheses.
The null hypothesis (the claim) is that the true average
life is 1000 hours.
H0: μ = 1000
If we reject the manufacturer’s claim, we must accept
the alternate hypothesis that the light bulbs do not
last as long as 1000 hours. H1: μ < 1000
9.1 / 4
Types of Statistical Tests
• Left-tailed: H1 states that the parameter is less than
the value claimed in H0.
• Right-tailed: H1 states that the parameter is greater
than the value claimed in H0.
• Two-tailed: H1 states that the parameter is different
from (  ) the value claimed in H0.
9.1 / 5
Given the Null Hypothesis
H0:  = k
If you believe that  is less than k,
Use the left-tailed test: H1:  < k
If you believe that  is more than k,
Use the right-tailed test: H1:  > k
If you believe that  is different from k,
Use the two-tailed test: H1:   k
General Procedure for Hypothesis
Testing
• Formulate the null and alternate hypotheses.
• Take a simple random sample.
• Compute a test statistic corresponding to the
parameter in H0.
• Assess the compatibility of the test statistic
with H0.
9.1 / 7
Hypothesis Testing
about the Mean of a Normal Distribution with
a Known Standard Deviation 
x-
test statistic  z 
/ n
x  mean of simple random sample
  value stated in H 0
n  sample size
8
Example
Statistical Testing Preview
Page 364
9
P-value of a Statistical Test
• Assuming H0 is true, the probability that the test
statistic (computed from sample data) will take on
values as extreme as or more than the observed test
statistic is called the P-value of the test
• The smaller the P-value computed from sample data,
the stronger the evidence against H0.
9.1 / 10
P-values for Testing a Mean
Using the Standard Normal Distribution
Use the
standardiz ed sample test statistic
x-
 zx 
/ n
9.1 / 11
P-value for a Left-tailed Test
• P-value = probability of getting a test statistic
less than z x
9.1 / 12
P-value for a Right-tailed Test
• P-value = probability of getting a test statistic
greater than z x
9.1 / 13
P-value for a Two-tailed Test
• P-value = probability of getting a test statistic
lower than z x or higher than z x
9.1 / 14
Types of Errors in Hypothesis Testing
Type I Error
rejecting a null hypothesis which is, in fact, true
Type II Error
not rejecting a null hypothesis which is, in fact, false
Type I and Type II Errors
9.1 / 15
Types of Errors
For tests of hypotheses to be well constructed, they must
be designed to minimize possible errors of decision.
(Usually we don’t know if an error has been made, and
therefore, we can talk only about the probability of
making an error.)
Usually, for a given size, an attempt to reduce the
probability of one type of error results in an increase in
the probability of the other type of error.
In practical applications, one type of error may be more
serious than the other. In such case, careful attention is
given to the more serious error. If we increase the sample
sizes, it is possible to reduce both types of errors, but
increasing the sample size may not be possible.
9.1 / 16
Types of Errors
Good statistical practice requires that we announce in
advance how much evidence against H 0 will be
required to reject H 0 .
The probability with which we are willing to risk a
H
type of I error is called the level of significance of a
test. (Reject a true H 0)
The level of significance is denoted by the Greek letter
a (pronounced “alpha”).
0
9.1 / 17
Level of Significance, Alpha (a)
the probability of rejecting a true hypothesis
Alpha = a is the probability of a type I error
Type II Error
Beta = β = probability of a type II error (failing to
reject a false hypothesis)
In hypothesis testing α and β values should be
chosen as small as possible.
Usually α is chosen first.
9.1 / 18
Power of the Test = 1 – β
Is the probability of rejecting H0 when it is in fact
false = 1 – b.
The power of the test increases as the level of
significance (a) increases.
Using a larger value of alpha increases the
power of the test but also increases the
probability of rejecting a true hypothesis.
9.1 / 19
Probabilities Associated
with a Statistical Test
9.1 / 20
Example
Hypotheses and Types of Errors
A fast food restaurant indicated that the average age of
its job applicants is fifteen years. We suspect that
the true age is lower than 15.
We wish to test the claim with a level of significance
of a = 0.01.
Determine the Null and Alternate hypotheses and
describe Type I and Type II errors.
9.1 / 21
… average age of its job applicants is fifteen years.
We suspect that the true age is lower than 15.
a = 0.01
H0: m = 15
H1: m < 15
A type I error would occur if we rejected the claim that
the mean age was 15, when in fact the mean age was
15 (or higher). The probability of committing such an
error is as much as 1%.
A type II error would occur if we failed to reject the
claim that the mean age was 15, when in fact the mean
age was lower than 15. The probability of committing
such an error is called beta.
9.1 / 22
Concluding a Hypothesis Test Using the P-value and Level of
Significance α
• If P-value < α reject the null hypothesis and
say that the data are statistically significant
at the level α.
• If P-value > α, do not reject the null
hypothesis.
9.1 / 23
Basic Components of a Statistical Test
1. Null hypothesis, alternate hypothesis and
level of significance
2. Test statistic and sampling distribution
3. P-value
4. Test conclusion
5. Interpretation of the test results
9.1 / 24
1. Null Hypothesis, Alternate Hypothesis
and Level of Significance
If the sample data evidence against H0 is strong
enough, we reject H0 and adopt H1.
The level of significance, α, is the probability of
rejecting H0 when it is in fact true.
2. Test Statistic and Sampling
Distribution
Mathematical tools to measure compatibility of
sample data and the null hypothesis
9.1 / 25
3. P-value
The probability of obtaining a test statistic from the
sampling distribution that is as extreme as or more
extreme than the sample test statistic computed
from the data under the assumption that H0 is true
4. Test Conclusion
If P-value < α reject the null hypothesis and say that
the data are statistically significant at the level α.
If P-value > α, do not reject the null hypothesis.
5. Interpretation of Test Results
Give a simple explanation of conclusion in the context
of the application.
9.1 / 26
Example
Guided exercise 3 page 370
9.1 / 27
Reject or ...
• When the sample evidence is not strong enough to
justify rejection of the null hypothesis, we fail to reject
the null hypothesis.
• Use of the term “accept the null hypothesis” should be
avoided.
• When the null hypothesis cannot be rejected, a
confidence interval is frequently used to give a range of
possible values for the parameter.
9.1 / 28
Fail to Reject H0
• There is not enough evidence to reject H0.
The null hypothesis is retained but not proved.
9.1 / 29
Reject H0
• There is enough evidence to reject H0.
Choose the alternate hypothesis with the
understanding that it has not been proven.
9.1 / 30