Professional Documents
Culture Documents
1
Hypothesis testing
A statistical method that uses sample data to
evaluate a hypothesis about a population parameter.
It is intended to help researchers differentiate
between real and random patterns in the data(i.e.
Involves conducting a test of statistical significance
and quantifying the degree to which chance or
sampling variability may account for the results
observed in a particular study)
2
What is a Hypothesis?
A hypothesis is a
I claim the mean GPA of
claim (assumption) about this class is 3.5
the true value of unknown
population parameter
- Parameter may be
population mean, proportion,
correlation coefficient,...
– Must be stated
before analysis
3
Hypothesis testing
The purpose of hypothesis testing is to determine whether
enough statistical evidence exists to enable us to conclude that
a belief or hypothesis about a parameter is reasonable
Examples
Is X 20 likely if ?
Take a Sample
No, not likely!
REJECT H0
X 20
5
Steps in hypothesis testing
- Alternative hypotheses
6
State the null hypotheses
7
Null Hypothesis:
H0
8
State the alternative hypotheses
Alternate to null hypothesis
9
Alternative Hypothesis:
H1 or HA
10
Hypothesis
Example: Consider population mean
H 0 : μ = μ0 H0 : μ ≤ μ 0 H0: μ μ0
H A : μ μ0 HA : μ > μ 0 HA: μ < μ0
11
Hypothesis-Testing Common Phrases
> <
Is greater than Is less than
12
Hypothesis-Testing Common Phrases
≥ ≤
Is greater than or equal to Is less than or equal to
Is at least Is not more than
Is not less than Is at most
=
≠
Is equal to
Is not equal to
Is not different from
Is different from
Has no change from
Has changed from
Is the same as
Is not the same as
13
Example:
A. Is the mean SBP of the population is different from 120
mmHg?
14
Example:
B. Is the mean SBP of the population is less than 120 mmHg?
15
Example:
C. Is the mean SBP of the population is more than 120 mmHg?
16
2) Select a sample and collect data
3) Decide on the appropriate test statistic for
the hypothesis (Z, t, χ2, F, etc )
17
Selecting an appropriate test statistic
Population
Standard T-TEST Z OR T- TEST
deviation not
known
18
4)Select the level of significance for the
statistical test
Level of Significance () : Defines rejection
region of the sampling distribution
Called rejection region of sampling distribution
Is designated by , (level of significance)
– Typical values are .01, .05, or .10
Is selected by the researcher at the beginning
Provides the critical value(s) of the test
19
5) Determine the critical value
Find the critical value in the distribution table for each test
statistics(tabulated value ) using the α - value and the degrees of
freedom(where applicable)
The critical value separates the acceptance zone from the
rejection zone
One tailed test – area of rejection is in either the lower or
upper tail of the distribution
Two- tailed – 2 areas of rejection, one in each tail of the
distribution 20
Rejection Regions
(Two -tail test)
H0: =
HA:
21
Rejection Region
(One - tail test: Left tail test)
H0: =
H1: <
22
Rejection Region
(One - tail test: Right tail test)
H 0: =
H 1: >
23
6) Perform the calculation
Apply the formula of the test statistics to get the
calculated value
Estimate-Hypothesized Parameter
test statistic=
Standard Error
Compare the calculated value to the tabulated or the
critical value
Check which zone the calculated value falls into
24
7) Make decision and State the conclusion
There are two possible decisions:
I) Reject the null hypothesis
– Conclude that there is enough evidence to support the alternative
hypothesis
rejection region, we reject the null hypothesis
If the test statistic does not fall in the rejection region,
Reject H0
26
Rejection Regions
(Two -tail test)
Reject
H0
27
Rejection Regions
(Two -tail test)
Accept
H0
28
Rejection Region
(One - tail test: Left tail test)
Accept H0
29
Rejection Region
(One - tail test: Left tail test)
Reject H0
30
Rejection Region
(One - tail test: Right tail test)
Accept H0
31
Rejection Region
(One - tail test: Right tail test)
Reject H0
32
p-value
p-value: is the probability of obtaining a test statistic
at least as extreme ( ≤ or ) as the observed sample
value, given H0 is true
– Also called observed level of significance
– Smallest value of for which H0 can be rejected
Decision : Compare the p-value with
– If p-value ≥ α, do not reject H0
– If p-value < α, reject H0
33
Procedure for finding P-Values
34
Procedure for finding P-Values
35
The p-Value: Rules of Thumb
When the p-value is smaller than 0.01, the result is called very
significant.
When the p-value is between 0.01 and 0.05, the result is called
significant.
When the p-value is between 0.05 and 0.10, the result is considered
by some as marginally significant (and by most as not significant).
When the p-value is greater than 0.10, the result is considered not
significant.
36
The P-value
2.Type II Error
– Probability of failing to reject a false null hypothesis
– Probability of rejecting a true alternative hypothesis
– Probability of Type II Error is (Beta)
38
Decision Results
H0: Innocent
Jury Trial H0 Test
Actual Situation Actual Situation
Verdict Innocent Guilty Decision H0 True H0
False
Type II
Innocent Correct Error Accept 1–a Error
H0
(b)
Reject Type I Power
Guilty Error Correct
H0 Error (a) (1 – b)
Type I & II Errors Have an Inverse
Relationship
If you reduce the probability of one
error, the other one increases so that
everything else is unchanged.
40
Factors Affecting Type II Error
Significance level
– Increases when decreases
Population standard deviation
– Increases when increases
Sample size
– Increases when n decreases n
41
Controlling Type I and
Type II Errors
For any fixed , an increase in the sample
size n will cause a decrease in
For any fixed sample size n, a decrease in
will cause an increase in . Conversely, an
increase in will cause a decrease in .
To decrease both and , increase the
sample size.
42
Power of a statistical test
43
Summary:
Elements of a Hypothesis Test
Null Hypothesis (H0)
– A theory about the values of one or more population
parameters. The status quo.
Alternative Hypothesis (Ha)
– A theory that contradicts the null hypothesis. The theory
generally represents that which we will accept only when
sufficient evidence exists to establish its truth.
Test Statistic
– A sample statistic used to decide whether to reject the null
hypothesis. In general,
Estimate-Hypothesized Parameter
test statistic=
Standard Error
44
Summary:
Elements of a Hypothesis Test
Critical Value
– A value to which the test statistic is compared at some
particular significance level. (usually at =.01, .05, .10)
Rejection Region
– The numerical values of the test statistic for which the null
hypothesis will be rejected.
– The probability is that the rejection region will contain the
test statistic when the null hypothesis is true, leading to a
Type I error. is usually chosen to be small (.01, .05, .10) and
is the level of significance of the test. 45
Summary of One- and Two-Tail Tests
H0 : μ μ 0 H0: μ ≤ μ0
H A : μ < μ0 HA: μ > μ0
46
Summary: Rejection Regions
1. Rejection Regions (In Grey)
.5
.5
Form of Ha: 0 2 2
2-tail hypothesis
2 2
If |z|>|z/2|
0
If z< z
0
47
Summary :Type I and Type II Errors
48
Example: Two-Tail Test
49
Example Solution: Two-Tail Test
H0: m = 368
H1: m ¹ 368 Test Statistic:
s= 15
n = 25 X 372.5 368
Z 1.50
Z –test is appropriate 15
a = 0.05
n 25
Decision: Do not reject H0
Critical Value: ±1.96
at a = .05
Reject Reject
.025 .025
Conclusion: There is
No evidence that the
-1.96 0 1.96
Z true Mean is not 368
1.50
50
Example: Two-Tailed Test
Does an average box of cereal
contain 368 grams of cereal?
A random sample of 36 boxes
had a mean of 372.5 and a
standard deviation of 12
368 gm.
grams. Test at the .05 level of
significance.
Solution
Test Statistic:
• H0: = 368
• HA: 368 X 372.5 368
t* 2.25
• = 0.05 S 12
• df = 36-1=35 n 36
• Critical Value: ±2.042 0.02 < p-value < 0.05
53
Solution
H0: m £ 368
H1: m > 368 Test Statistic:
a = 0.05 X
Z 1.50
n = 25
Critical Value: 1.645 n
Reject
Z Value of
Sample Statistic
55
p -Value Solution
(p-Value = 0.0668) ³ (a = 0.05)
Do Not reject H0 .
p Value = 0.0668
Reject
a = 0.05
0 1.645
Z
1.50
Test Statistic 1.50 is in the non reject region
56
Example: One-ailed Test
61
Inference About a Population Variance
62
Inference About a Population Variance
64
Properties of Chi-Square Distribution
65
Properties of Chi-Square
Distribution - cont
Properties of the Chi-Square Chi-Square Distribution for 10
Distribution and 20 df