Title: Hypothesis Testing
1Hypothesis Testing
2Sampling Distribution
- Over-the-counter stock selling prices
- calculate average price of all stocks listed ?
- take a sample of 25 stocks and record price
- calculate average price of the 25 stocks x-bar
- take all possible samples of size 25
- would all x-bars be equal?
- average all the possible x-bars equals ?
3Sampling Distribution
20
H0
4Sampling Distribution
It is unlikely that we would get a sample mean of
this value ...
20
H0
5Sampling Distribution
It is unlikely that we would get a sample mean of
this value ...
... if in fact this were the population mean
20
H0
6Sampling Distribution
It is unlikely that we would get a sample mean of
this value ...
... therefore, we reject the hypothesis that ?
50.
... if in fact this were the population mean
20
H0
7Null Hypothesis
- What is tested
- Always has equality sign ?, ???or ??
- Designated H0
- Example ... H0 ? ? 3
8Alternative Hypothesis
- Opposite of null hypothesis
- Always has inequality sign ?,??, or ?
- Designated H1
- Example
- H1 ? lt 3
9Decision
- Reject null hypothesis
- Retain, or, fail to reject, null hypothesis
-
- Do not use the term accept
10p-value
- Probability of obtaining a test statistic more
extreme (??or ???than actual sample value given
H0 is true - Called observed level of significance
- Smallest value of ? H0 can be rejected
- Used to make rejection decision
- If p-value ? ?, reject H0
11Level of Significance
- Defines unlikely values of sample statistic if
null hypothesis is true - Called rejection region of sampling distribution
- Designated ??(alpha)
- Typical values are .01, .05, .10
- Selected by researcher at start
12Rejection Region (one-tail test)
Sampling Distribution
Level of Confidence
1 - ?
13Rejection Region (one-tail test)
Sampling Distribution
Level of Confidence
1 - ?
Observed sample statistic
14Rejection Region (one-tail test)
Sampling Distribution
Level of Confidence
1 - ?
Observed sample statistic
15Rejection Regions (two-tailed test)
Sampling Distribution
Level of Confidence
1 - ?
16Rejection Regions (two-tailed test)
Sampling Distribution
Level of Confidence
1 - ?
Observed sample statistic
17Rejection Regions (two-tailed test)
Sampling Distribution
Level of Confidence
1 - ?
Observed sample statistic
18Rejection Regions (two-tailed test)
Sampling Distribution
Level of Confidence
1 - ?
Observed sample statistic
19Risk of Errors in Making Decision
- Type I error
- Reject true null hypothesis
- Has serious consequences
- Probability of Type I error is alpha ?
- Called level of significance
- Type II error
- Do not reject false null hypothesis
- Probability of Type II error is beta ?
20Decision Results
H0 Innocent
21Hypothesis Testing
- State H0
- State H1
- Choose ?
- Choose n
- Choose test
22Hypothesis Testing
- State H0
- State H1
- Choose ?
- Choose n
- Choose test
- Set up critical values
- Collect data
- Compute test statistic
- Make statistical decision
- Express decision
23Two-tailed z-test
- Does an average box of cereal contain 368 grams
of cereal? A random sample of 25 boxes has an
average weight 372.5 grams. The company has
specified ? to be 15 grams. Test at the .05
level.
368 gm.
24Two-tailed z-test
Test Statistic Decision Conclusion
- H0
- H1
- ? ?
- n ?
- Critical Value(s)
25Two-tailed z-test
Test Statistic Decision Conclusion
- H0 ? 368
- H1 ? ? 368
- ? ?
- n ?
- Critical Value(s)
26Two-tailed z-test
Test Statistic Decision Conclusion
- H0 ? 368
- H1 ? ? 368
- ? ? .05
- n ? 25
- Critical Value(s)
27Two-tailed z-test
Test Statistic Decision Conclusion
- H0 ? 368
- H1 ? ? 368
- ? ? .05
- n ? 25
- Critical Value(s)
28Two-tailed z-test
Test Statistic Decision Conclusion
- H0 ? 368
- H1 ? ? 368
- ? ? .05
- n ? 25
- Critical Value(s)
29Two-tailed z-test
Test Statistic Decision Conclusion
- H0 ? 368
- H1 ? ? 368
- ? ? .05
- n ? 25
- Critical Value(s)
Do not reject at ? .05
30Two-tailed z-test
Test Statistic Decision Conclusion
- H0 ? 368
- H1 ? ? 368
- ? ? .05
- n ? 25
- Critical Value(s)
Do not reject at ? .05
No evidence average is not 368
31Two-tailed z-test p-value
Z value of sample statistic
?
32Two-tailed z-test p-value
p-value is P(z ? -1.50 or z ? 1.50)
Z value of sample statistic
?
33Two-tailed z-test p-value
p-value is P(z ? -1.50 or z ? 1.50)
Z value of sample statistic
?
34Two-tailed z-test p-value
p-value is P(z ? -1.50 or z ? 1.50)
.4332
Z value of sample statistic
From Z table lookup 1.50
?
?
35Two-tailed z-test p-value
p-value is P(z ? -1.50 or z ? 1.50)
?
.5000- .4332 .0668
.4332
Z value of sample statistic
From Z table lookup 1.50
?
?
36Two-tailed z-test p-value
p-value is P(z ? -1.50 or z ? 1.50) .1336
?
.5000- .4332 .0668
.4332
Z value of sample statistic
From Z table lookup 1.50
?
?
37Two-tailed z-test p-value
1/2 p-value .0668
1/2 p-value .0668
1/2 ? .025
1/2 ? .025
38Two-tailed z-test p-value
(p-Value .1336) ?? (? .05)
Do not reject.
1/2 p-Value .0668
1/2 p-Value .0668
1/2 ? .025
1/2 ? .025
Test statistic is in Do not reject region
39Two-tailed z-test (? known) challenge
- You are a Q/C inspector. You want to find out if
a new machine is making electrical cords to
customer specification average breaking strength
of 70 lb. with ? 3.5 lb. You take a sample of
36 cords compute a sample mean of 69.7 lb. At
the .05 level, is there evidence that the machine
is not meeting the average breaking strength?
40solution template (? known)
Test Statistic Decision Conclusion
- H0
- H1
- ?
- n
- Critical Value(s)
41Two-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0
- H1
- ?
- n
- Critical Value(s)
42Two-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? 70
- H1 ? ? 70
- ?
- n
- Critical Value(s)
43Two-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? 70
- H1 ? ? 70
- ? .05
- n 36
- Critical Value(s)
44Two-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? 70
- H1 ? ? 70
- ? .05
- n 36
- Critical Value(s)
45Two-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? 70
- H1 ? ? 70
- ? .05
- n 36
- Critical Value(s)
46Two-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? 70
- H1 ? ? 70
- ? .05
- n 36
- Critical Value(s)
Do not reject at ? .05
47Two-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? 70
- H1 ? ? 70
- ? .05
- n 36
- Critical Value(s)
Do not reject at ? .05
No evidence average is not 70
48One-tailed z-test (? known)
- Assumptions
- Population is normally distributed
- If not normal, can be approximated by normal
distribution for large samples
49One-tailed z-test (? known)
- Assumptions
- Population is normally distributed
- If not normal, can be approximated by normal
distribution for large samples - Null hypothesis has ? or ? sign only
50One-tailed z-test (? known)
- Assumptions
- Population is normally distributed
- If not normal, can be approximated by normal
distribution for large samples - Null hypothesis has ? or ? sign only
- Z-test statistic
51One-tailed z-test (? known)
H0?????0 H1 ??lt 0
Must be significantly below ?
52One-tailed z-test (? known)
H0?????0 H1 ??lt 0
H0?????0 H1 ??gt 0
Must be significantly below ?
Small values satisfy H0 . Do not reject!
53One-tailed z-test (? known)
What is z given ? .025?
? .025
?
54One-tailed z-test (? known)
What Is Z given ? .025?
?
.500 - .025 .475
? .025
?
55One-tailed z-test (? known)
Standardized Normal Probability Table (Portion)
What is z given ? .025?
?
?
.500 - .025 .475
.06
? .025
?
.4750
1.9
56One-tailed z-test (? known)
Standardized Normal Probability Table (Portion)
What Is Z given ? .025?
?
?
.500 - .025 .475
.06
? .025
?
?
.4750
1.9
57One-tailed z-test (? known)
- Does an average box of cereal contain more than
368 grams of cereal? A random sample of 25 boxes
showed?X 372.5. The company has specified ? to
be 15 grams. Test at the .05 level.
368 gm.
58One-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0
- H1
- ?
- n
- Critical Value(s)
59One-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? gt 368
- ?
- n
- Critical Value(s)
60One-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? gt 368
- ? .05
- n 25
- Critical Value(s)
61One-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? gt 368
- ? .05
- n 25
- Critical Value(s)
62One-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? gt 368
- ? .05
- n 25
- Critical Value(s)
63One-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? gt 368
- ? .05
- n 25
- Critical Value(s)
Do not reject at ? .05
64One-tailed z-test (? known)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? gt 368
- ? .05
- n 25
- Critical Value(s)
Do not reject at ? .05
No evidence average is more than 368
65One-tailed z-test (? known) p-value Solution
?
Use alternative hypothesis to find direction
?
Z value of sample statistic
66One-tailed z-test (? known) p-value
?
Use alternative hypothesis to find direction
?
Z value of sample statistic
67One-tailed z-test (? known) p-value
?
Use alternative hypothesis to find direction
.4332
?
?
Z value of sample statistic
From Z table lookup 1.50
68One-tailed z-test (? known) p-value
?
?
Use alternative hypothesis to find direction
.5000- .4332 .0668
.4332
?
?
Z value of sample statistic
From Z table lookup 1.50
69One-tailed z-test (? known) p-value
p-value .0668
?
?
Use alternative hypothesis to find direction
.5000- .4332 .0668
.4332
?
?
Z value of sample statistic
From Z table lookup 1.50
70One-tailed z-test (? known) p-value
p-value .0668
? .05
71One-tailed z-test (? known) p-value
(p-value .0668) ? (? .05).
Do not reject.
p-Value .0668
? .05
Test statistic is in Fail to reject region
72p-value Challenge
- Youre an analyst for Ford. You want to find out
if the average miles per gallon of Escorts is at
least 32 mpg. Similar models have a standard
deviation of 3.8 mpg. You take a sample of 60
Escorts compute a sample mean of 30.7 mpg.
What is the value of the observed level of
significance (p-Value)?
73p-value
p-value .004 p-value lt ? (? .01)
Reject H0.
?
?
.5000- .4960 .0040
Use alternative hypothesis to find direction
.4960
Z value of sample statistic
From Z table lookup 2.645
?
?
74p-value
- Probability of obtaining a test statistic more
extreme (??or ???than actual sample value given
H0 is true - Called observed level of significance
- Smallest value of ? H0 can be rejected
- Used to make rejection decision
- If p-value ? ?, reject H0
75One-tailed t-test (? unknown)
- Does an average box of cereal contain less than
the 368 grams indicated on the package? A random
sample of 25 boxes showed?X 363.5 and s15.
Test at the .05 level.
368 gr.
76 One-tailed t-test (? unknown)
Test Statistic Decision Conclusion
- H0
- H1
- ?
- n
- Critical Value(s)
77 One-tailed t-test (? unknown)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? lt 368
- ?
- n
- Critical Value(s)
78 One-tailed t-test (? unknown)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? lt 368
- ? .05
- n 25, d.f. 24
- Critical Value(s)
79 One-tailed t-test (? unknown)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? lt 368
- ? .05
- n 25, d.f. 24
- Critical Value(s)
80 One-tailed t-test (? unknown)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? lt 368
- ? .05
- n 25, d.f. 24
- Critical Value(s)
81 One-tailed t-test (? unknown)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? lt 368
- ? .05
- n 25, d.f. 24
- Critical Value(s)
Do not reject at ? .05
82 One-tailed t-test (? unknown)
Test Statistic Decision Conclusion
- H0 ? ? 368
- H1 ? lt 368
- ? .05
- n 25, d.f. 24
- Critical Value(s)
Do not reject at ? .05
No evidence average is less than 368
83One-tailed t-test (? unknown) p-value Solution
?
Use alternative hypothesis to find direction
t value of sample statistic
?
84One-tailed t-test (? unknown) p-value
From t table lookup -1.50 for 24 d.f.
?
?
Use alternative hypothesis to find direction
P-value 0.075
t value of sample statistic
?
85 One-tailed t-test (? unknown) p-value
p-value .075
? .05
86 One-tailed t-test (? unknown) p-value
(p-value .075) ? (? .05). Do
not reject.
p-value .075
Reject
? .05
Test statistic is in Fail to reject region
87Questions?
88ANOVA
89(No Transcript)