7.hypothesis Test
7.hypothesis Test
1
Is it statistically significant?
2
Data must be interpreted in order to add meaning.
3
Outline
4
Hypothesis
observation.
5
Hypothesis
For example:
A new medicine you think might work.
A way of teaching I think might be better.
A possible location of new species.
A fairer way to administer standardized tests.
6
What is a Hypothesis Statement?
write a statement.
7
What is a Hypothesis Statement?
For example:
8
What is a Hypothesis Statement?
A hypothesis statement should:
9
Example
One place where you can consistently see the general idea
of hypothesis testing in action is in criminal trials.
10
Example
11
Example
The two hypotheses are called the null hypothesis and the
other the alternative or research hypothesis. The usual
notation is:
pronounce
d
H “nought”
12
Example
14
Example
In statistics, the data are evidence.
Did you notice the use of the phrase "behave as if" in the
previous discussion? We "behave as if" the defendant is
guilty; we do not "prove" that the defendant is guilty.
And, we "behave as if" the defendant is innocent; we do
not "prove" that the defendant is innocent.
15
Example
This is a very important distinction! We make our
decision based on evidence not on 100% guaranteed
proof. Again:
If we reject the null hypothesis, we do not prove that the
alternative hypothesis is true.
If we do not reject the null hypothesis, we do not prove
that the null hypothesis is true.
We merely state that there is enough evidence to behave
one way or the other. This is always true in statistics!
Because of this, whatever the decision, there is always a
chance that we made an error.
16
Errors in Hypothesis Testing
There are two possible errors.
Let's review the two types of errors that can be made in
criminal trials:
Type II Error
Type I Error
17
Errors in Hypothesis Testing
In statistics:
18
Errors in Hypothesis Testing
A Type I error occurs when we reject a true null hypothesis
(i.e. Reject H0 when it is TRUE)
H0 T F
Reject I
Reject II
In other words, you can’t have and β both real small for any
small sample size. You may have to take a much larger sample
size, or in the court example, you need much more evidence.
20
Errors in Hypothesis Testing
The critical concepts are the following:
1. There are two hypotheses, the null and the alternative hypotheses.
2. The procedure begins with the assumption that the null hypothesis is
true.
3. The goal is to determine whether there is enough evidence to infer
that the alternative hypothesis is true, or the null is not likely to be
true.
4. There are two possible decisions:
Conclude that there is enough evidence to support the alternative
hypothesis. Reject the null.
Conclude that there is not enough evidence to support the
alternative hypothesis. Fail to reject the null.
21
Making a decision
22
Making a decision
In statistics, there are three ways to determine whether the
evidence is likely or unlikely given the initial assumption.
Let’s see.
23
Statistical Example
Consider mean demand for computers during assembly lead
time. Rather than estimate the mean demand, our operations
manager wants to know whether the mean is different from
350 units. In other words, someone is claiming that the mean
time is 350 units and we want to check this claim out to see
if it appears reasonable. We can rephrase this request into a
test of the hypothesis:
H0: = 350
Thus, our research hypothesis becomes:
H1: ≠ 350
Suppose that the standard deviation [σ]was assumed to be
75, the sample size [n] was 25, and the sample mean [ ]
was calculated to be 370.16
24
Statistical Example
For example, if we’re trying to decide whether the mean is
not equal to 350, a large value of (say, 600) would provide
enough evidence.
25
Statistical Example
The testing procedure begins with the assumption that the
null hypothesis is true.
27
Three ways to determine this: First way
1. Unstandardized test statistic: Is in the guts of the
sampling distribution? Depends on what you define as
the “guts” of the sampling distribution.
28
1. Unstandardized Test Statistic Approach
29
Three ways to determine this: Second
way
2. Standardized test statistic: Since we defined the “guts” of
the sampling distribution to be the center 95% [ = 0.05],
If the Z-Score for the sample mean is greater than
1.96, we know that will be in the reject region on the right
side or
If the Z-Score for the sample mean is less than -1.96,
we know that will be in the reject region on the left side.
31
Three ways to determine this: Third way
3. The p-value approach (which is generally used with a computer and
statistical software): Increase the “Rejection Region” until it
“captures” the sample mean.
The smaller the p-value, the stronger the evidence that you should
reject the null hypothesis.
32
Three ways to determine this: Third way
Graphically, the p value is the area in the tail of a probability
distribution.
33
Three ways to determine this: Third way
When you perform a statistical test a p-value helps you
determine the significance of your results in relation to the
null hypothesis.
34
Three ways to determine this: Third way
How do you know if a p-value is statistically significant?
35
Three ways to determine this: Third way
A p-value higher than 0.05 (> 0.05) is not statistically significant
and indicates strong evidence for the null hypothesis. This means
we retain the null hypothesis and reject the alternative hypothesis.
You should note that you cannot accept the null hypothesis, we
can only reject the null or fail to reject it.
A statistically significant result cannot prove that a research
hypothesis is correct (as this implies 100% certainty).
Instead, we may state our results “provide support for” or “give
evidence for” our research hypothesis (as there is still a slight
probability that the results occurred by chance and the null
hypothesis was correct – e.g. less than 5%).
36
Three ways to determine this: Third way
37
3. p-value approach
38
Statistical Conclusions:
Unstandardized Test Statistic:
Since LCV (320.6) < (370.16) < UCV (379.4), we
reject the null hypothesis at a 5% level of significance.
P-value:
Since p-value (0.1802) > 0.05 [], we fail to reject the
hull hypothesis at a 5% level of significance.
39
Statistical Inference
Population
(parameters, e.g., and )
Sample
Example
We have a medicine that is being manufactured and each pill is supposed to have 14
milligrams of the active ingredient. What are our null and alternative hypotheses?
42
null hypotheses
43
Components of a Formal Hypothesis
Test
44
One- and Two-Tail Tests…
45
One- and Two-Tail Tests…
46
One- and Two-Tail Tests…
48
Select a Level of Significance α
Designated a (alpha)
Typical values are 0.01, 0.05, 0.10
Type I Error:
Rejecting the null hypothesis when it is actually true
(α).
49
Types of errors
50
Table of error conditions
51
Risk management
52
Probability of a Type II Error –
A Type II error occurs when a false null hypothesis is not
rejected or “you accept the null when it is not true” but don’t
say it this way if a statistician is around.
In practice, this is by far the most serious error you can make
in most cases, especially in the “quality field”.
53
Judging the Test…
A statistical test of hypothesis is effectively defined by the
significance level ( ) and the sample size (n), both of
which are selected by the statistics practitioner.
54
Judging the Test…
The power of a test is defined as 1– .
It represents the probability of rejecting the null hypothesis when it is
false and the true mean is something other than the null value for the
mean.
55
Probability you ship pills whose mean amount of medication is 7 mg approximately
67%
56
Select the test statistic
Test statistic: A value, determined from sample information,
used to determine whether or not to reject the null
hypothesis.
Examples: z, t, F, 2
X X 0
z t
/ n s/ n
57
Formulate the decision rule
Critical value: The dividing point between the region where
the null hypothesis is rejected and the region where it is not
rejected.
(Alternative hypothesis:
H1: μ > μ 0 ),
0 .05 Level of Significance
0 1.65
C ritical value
58
Formulate the decision rule
The alternate hypothesis, H1, states a direction (μ > μ0 or μ <
μ0 )
Sampling Distribution
of the Statistic z, a
Right-Tailed Test R e g io n o f
D o not
(Alternative hypothesis: reject
re je ctio n
H1: μ > μ0 ), 0.05 [P robability = .95] [P ro b a b ility= .0 5 ]
Level of Significance
0 1.65
C ritical value 59
Formulate the decision rule
No direction is specified in the alternate hypothesis H1.
(μ ≠μ0 )
Regions of Rejection for a
Two-Tailed Test, .05
Level of Significance
R e g io n o f R e g io n o f
D o not
re je ctio n re je ctio n
reject
[P ro b a b ility= .0 2 5 ] [P ro b a b ility= .0 2 5 ]
[P robability = .95]
- 1.96 0 1.96
C ritical value C ritical value
60
Example: Normal Body Temperature
What is normal body temperature? Is it
actually 37.6oC (on average)?
State the null and alternative hypotheses
H0: = 37.6oC
Ha: 37.6oC
61
Example: Normal Body Temperature
Data: random sample of n = 18 normal body temps
62
Example: Normal Body Temperature
Data: random sample of n = 18 normal body temps
Variable n Mean SD SE t P
Temperature 18 37.22 0.68 0.161 2.38 0.029
66
67