Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests
-
Upload
magee-berger -
Category
Documents
-
view
109 -
download
3
description
Transcript of Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests
![Page 1: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/1.jpg)
1
Week 8
Fundamentals of Hypothesis Testing: One-Sample Tests
Statistics
![Page 2: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/2.jpg)
2
Goals of this note
After completing this noe, you should be able to:
Formulate null and alternative hypotheses for applications involving a single population mean or proportion
Formulate a decision rule for testing a hypothesis
Know how to use the p-value approaches to test the null hypothesis for both mean and proportion problems
Know what Type I and Type II errors are
![Page 3: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/3.jpg)
3
What is a Hypothesis?
A hypothesis is a claim (assumption) about a population parameter:
population mean
population proportion
The average number of TV sets in U.S. homes is equal to three ( )
A marketing company claims that it receives 8% responses from its mailing. ( p=.08 )
3μ
![Page 4: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/4.jpg)
4
States the assumption to be tested
Example: The average number of TV sets in U.S. Homes is equal to three ( )
Is always about a population parameter, not about a sample statistic
The Null Hypothesis, H0
3μ:H0
3μ:H0 3X:H0
![Page 5: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/5.jpg)
5
The Null Hypothesis, H0
Begins with the assumption that the null hypothesis is true Similar to the notion of innocent until
proven guilty Refers to the status quo Always contains “=” , “≤” or “” sign May or may not be rejected
(continued)
![Page 6: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/6.jpg)
6
The Alternative Hypothesis, H1
Is the opposite of the null hypothesis e.g.: The average number of TV sets in U.S.
homes is not equal to 3 ( H1: μ ≠ 3 )
Challenges the status quo Never contains the “=” , “≤” or “” sign Is generally the hypothesis that is believed (or
needs to be supported) by the researcher
![Page 7: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/7.jpg)
7
Hypothesis Testing
We assume the null hypothesis is true If the null hypothesis is rejected we have
proven the alternate hypothesis If the null hypothesis is not rejected we have
proven nothing as the sample size may have been to small
![Page 8: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/8.jpg)
Population
Claim: thepopulationmean age is 50.(Null Hypothesis:
REJECT
Supposethe samplemean age is 20: X = 20
SampleNull Hypothesis
20 likely if μ = 50?Is
Hypothesis Testing Process
If not likely,
Now select a random sample
H0: μ = 50 )
X
![Page 9: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/9.jpg)
9
Do not reject H0 Reject H0Reject H0
There are two cutoff values (critical values), defining the regions of rejection
Sampling Distribution of
/2
0
H0: μ = 50
H1: μ 50
/2
Lower critical value
Upper critical value
50 X
X
20 Likely Sample Results
![Page 10: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/10.jpg)
10
Level of Significance,
Defines the unlikely values of the sample statistic if the null hypothesis is true Defines rejection region of the sampling distribution
Is designated by , (level of significance)
Typical values are .01, .05, or .10 Is the compliment of the confidence coefficient Is selected by the researcher before sampling
Provides the critical value of the test
![Page 11: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/11.jpg)
11
Level of Significance and the Rejection Region
H0: μ ≥ 3
H1: μ < 30
H0: μ ≤ 3
H1: μ > 3
Represents critical value
Lower tail test
Level of significance =
0Upper tail test
Two tailed test
Rejection region is shaded
/2
0
/2H0: μ = 3
H1: μ ≠ 3
![Page 12: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/12.jpg)
12
Type I Error When a true null hypothesis is rejected The probability of a Type I Error is
Called level of significance of the test Set by researcher in advance
Type II Error Failure to reject a false null hypothesis The probability of a Type II Error is β
Errors in Making Decisions
![Page 13: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/13.jpg)
13
Example
The Truth
Verdict
Innocent No error Type II Error
Guilty Type I Error
Possible Jury Trial Outcomes
Guilty Innocent
No Error
![Page 14: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/14.jpg)
14
Outcomes and Probabilities
Actual SituationDecision
Do NotReject
H0
No error (1 - )
Type II Error ( β )
RejectH0
Type I Error( )
Possible Hypothesis Test Outcomes
H0 False H0 TrueKey:
Outcome(Probability)
No Error ( 1 - β )
![Page 15: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/15.jpg)
15
Type I & II Error Relationship
Type I and Type II errors can not happen at the same time
Type I error can only occur if H0 is true
Type II error can only occur if H0 is false
If Type I error probability ( ) , then
Type II error probability ( β )
![Page 16: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/16.jpg)
16
p-Value Approach to Testing
p-value: Probability of obtaining a test statistic more extreme ( ≤ or ) than the observed sample value given H0 is
true
Also called observed level of significance
![Page 17: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/17.jpg)
17
p-Value Approach to Testing
Convert Sample Statistic (e.g. ) to Test Statistic (e.g. t statistic )
Obtain the p-value from a table or computer
Compare the p-value with
If p-value < , reject H0
If p-value , do not reject H0
X
(continued)
![Page 18: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/18.jpg)
18
8 Steps in Hypothesis Testing
1. State the null hypothesis, H0
State the alternative hypotheses, H1
2. Choose the level of significance, α
3. Choose the sample size, n
4. Determine the appropriate test statistic to use
5. Collect the data
6. Compute the p-value for the test statistic from the sample result
7. Make the statistical decision: Reject H0 if the p-value is less than alpha
8. Express the conclusion in the context of the problem
![Page 19: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/19.jpg)
19
Hypothesis Tests for the Mean
Known Unknown
Hypothesis Tests for
![Page 20: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/20.jpg)
20
Hypothesis Testing Example
Test the claim that the true mean # of TV sets in U.S. homes is equal to 3.
1. State the appropriate null and alternative hypotheses
H0: μ = 3 H1: μ ≠ 3 (This is a two tailed
test) 2. Specify the desired level of significance
Suppose that = .05 is chosen for this test 3. Choose a sample size
Suppose a sample of size n = 100 is selected
![Page 21: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/21.jpg)
21
4. Determine the appropriate Test
σ is unknown so this is a t test 5. Collect the data
Suppose the sample results are
n = 100, = 2.84 s = 0.8 6. So the test statistic is:
The p value for n=100, =.05, t=-2 is .048
2.0.08
.16
100
0.832.84
n
sμX
t
Hypothesis Testing Example(continued)
X
![Page 22: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/22.jpg)
22
7. Is the test statistic in the rejection region?
Reject H0 if p is < alpha; otherwise do not reject H0
Hypothesis Testing Example(continued)
The p-value .048 is < alpha .05, we reject the null hypothesis
![Page 23: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/23.jpg)
23
8. Express the conclusion in the context of the problem
Since The p-value .048 is < alpha .05, we have rejected the null hypothesis
Thereby proving the alternate hypothesis
Conclusion: There is sufficient evidence that the mean number of TVs in U.S. homes is not equal to 3
Hypothesis Testing Example(continued)
If we had failed to reject the null hypothesis the conclusion would have been: There is not sufficient evidence to reject the claim that the mean number of TVs in U.S. home is 3
![Page 24: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/24.jpg)
24
One Tail Tests
In many cases, the alternative hypothesis focuses on a particular direction
H0: μ ≥ 3
H1: μ < 3
H0: μ ≤ 3
H1: μ > 3
This is a lower tail test since the alternative hypothesis is focused on the lower tail below the mean of 3
This is an upper tail test since the alternative hypothesis is focused on the upper tail above the mean of 3
![Page 25: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/25.jpg)
25
Reject H0 Do not reject H0
There is only one
critical value, since
the rejection area is
in only one tail
Lower Tail Tests
-t 3
H0: μ ≥ 3
H1: μ < 3
Critical value
X
![Page 26: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/26.jpg)
26
Reject H0Do not reject H0
Upper Tail Tests
tα3
H0: μ ≤ 3
H1: μ > 3
There is only one
critical value, since
the rejection area is
in only one tail
Critical value
t
X
![Page 27: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/27.jpg)
27
Assumptions of the One-Sample t Test
The data is randomly selected
The population is normally distributed orthe sample size is over 30 and the population is not highly skewed
![Page 28: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/28.jpg)
28
Hypothesis Tests for Proportions
Involves categorical values
Two possible outcomes “Success” (possesses a certain characteristic)
“Failure” (does not possesses that characteristic)
Fraction or proportion of the population in the “success” category is denoted by p
![Page 29: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/29.jpg)
29
Proportions
Sample proportion in the success category is denoted by ps
When both np and n(1-p) are at least 5, ps can be approximated by a normal distribution with mean and standard deviation
sizesample
sampleinsuccessesofnumber
n
Xps
pμ sp n
p)p(1σ
sp
(continued)
![Page 30: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/30.jpg)
30
The sampling distribution of ps is approximately normal, so the test statistic is a Z value:
Hypothesis Tests for Proportions
n)p(p
ppZ
s
1
np 5and
n(1-p) 5
Hypothesis Tests for p
np < 5or
n(1-p) < 5
Not discussed in this chapter
![Page 31: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/31.jpg)
31
Example: Z Test for Proportion
A marketing company claims that it receives 8% responses from its mailing. To test this claim, a random sample of 500 were surveyed with 25 responses. Test at the = .05 significance level.
Check:
n p = (500)(.08) = 40
n(1-p) = (500)(.92) = 460
![Page 32: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/32.jpg)
32
Z Test for Proportion: Solution
= .05
n = 500, ps = .05p-value for -2.47 is .0134Decision:Reject H0 at = .05
H0: p = .08
H1: p
.08
Critical Values: ± 1.96
Test Statistic:
Conclusion:z0
Reject Reject
.025.025
1.96
-2.47
There is sufficient evidence to reject the company’s claim of 8% response rate.
2.47
500.08).08(1
.08.05
np)p(1
ppZ
s
-1.96
![Page 33: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/33.jpg)
33
Potential Pitfalls and Ethical Considerations
Use randomly collected data to reduce selection biases Do not use human subjects without informed consent Choose the level of significance, α, before data
collection Do not employ “data snooping” to choose between one-
tail and two-tail test, or to determine the level of significance
Do not practice “data cleansing” to hide observations that do not support a stated hypothesis
Report all pertinent findings
![Page 34: Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests](https://reader035.fdocuments.net/reader035/viewer/2022081416/5681302b550346895d95bd71/html5/thumbnails/34.jpg)
34
Summary
Addressed hypothesis testing methodology
Discussed critical value and p–value approaches to hypothesis testing
Discussed type 1 and Type2 errors
Performed two tailed t test for the mean (σ unknown)
Performed Z test for the proportion
Discussed one-tail and two-tail tests
Addressed pitfalls and ethical issues