Professional Documents
Culture Documents
Hypothesis Testing:
One Sample Tests
David Chow
Oct 2014
1
Learning Objectives
The basic principles of hypothesis testing
Use hypothesis testing to test a mean or
proportion
Underlying assumptions
Basic Concepts
The Hypothesis
A hypothesis is a claim (assumption) about a
population parameter:
Population Mean
The Process
Claim: The population mean age is of security guards is 50.
Draw a sample and find the sample mean.
Population
Sample
5
The Process
=/n
... then you reject
Ho that = 50
20
it is unlikely that
you would get a
sample mean of this
value ...
= 50
If Ho is true
Terminology: Ho
The starting point of hypothesis testing is a
H0 : 3
8
Terminology: Ho and H1
1.
2.
A Quick Recap
Examples
1.
2.
H 0 : 0
H a : 0
H 0 : 0
H a : 0
H 0 : 0
H a : 0
One-tailed
(lower-tail)
One-tailed
(upper-tail)
Two-tailed
10
Region of
Rejection
Region of
Rejection
Level of Significance,
Claim: The population mean age is 50.
H0: = 50
H1: 50
H0: 50
H1: > 50
a/2
a/2
Two-tail test
a
Upper-tail test
H0: 50
H1: < 50
Represents
critical value
Simple Rule:
Rejection
region ____
Lower-tail test a
0
12
13
Ho True
Ho False
Do Not
Reject Ho
No Error
Type II Error
Probability 1 -
Probability
Reject Ho
Type I Error
No Error
Probability
Probability 1 -
Ho: Innocence
H1: Guilty
Jury decision
Reject the null
(i.e., convicting
the defendant), or
Do not reject Ho.
Identify the
(potential) errors in
this decision.
14
Type II error
failure
to detect cancer -- patient might miss treatment
_____________
15
16
Hypothesis
Testing:
Known
17
a/2
a/2
3
Reject H0
Do not reject H0
-Z
Reject H0
+Z
Lower
critical value
Upper
critical value
19
H1: 3
X
2.84 3 .16
2.0
0.8
.08
n
100
21
a= 0.05
a /2
Reject H0
Based on the
sample evidence,
the mean weight of
chocolate bars is
not equal to 3.
-Z /2 = -1.96
Upper-tail area = ??
Do not reject H0
Reject H0
+Z/2 = +1.96
22
Set a = 2%. The sample has a mean of 12.19oz, and a size of 36. Past
record shows that = 0.11oz. Test the claim that = 12.00oz.
ANSWER:
(2) Test statistic: Z = 10.364
(3) Critical values: Z0.01 = 2.327, (Reject of rejection: Z > 2.327 or Z < -2.327)
(4) Conclusion: Reject Ho as the test statistic falls in the region of rejection.
There is sample evidence to reject the claim of =12.00. We conclude
that 12.00 instead.
23
3. Determine the appropriate statistical technique and the test statistic to use
4. Find the critical values and determine the rejection region(s)
5. Collect data and compute the test statistic from the sample result
24
significance
25
statistic ).
Obtain the p-value from a statistical table.
Compare the p-value with a:
If p-value < a , reject Ho
If p-value a , do not reject Ho
If the p-value is
26
Ho: = 3.0;
X = 2.84 is translated to a Z
score of Z = -2.0
P(Z 2.0) .0228
P(Z 2.0) .0228
H1: 3.0
a/2 = .025
a/2 = .025
.0228
.0228
p-value
=.0228 + .0228 = .0456
-1.96
-2.0
1.96
2.0
27
a/2 = .025
a/2 = .025
.0228
.0228
1.96
2.0
Z
28
If you use a 0.05 level of significance in a two-tail hypothesis test, what will
you decide if the computed value of the test statistic Z is +2.21?
a.
b.
2.
Suppose that in a two-tail hypothesis test, you compute the value of the test
statistic Z as -1.38. What is the p-value?
ANSWER
29
0.8
to
100
2.84 (1.96)
0.8
100
2.6832 2.9968
Since this interval does not contain the hypothesized
30
H0: 3
H1: < 3
H0: 3
H1: > 3
Reject Ho
Do not reject Ho
Critical value
Form hypothesis:
H0: 52
H1: > 52
33
1-a = .90
a = .10
Do not reject H0
Reject H0
34
.90
.10
Z
a = .10
.90
.07
.08
.09
0 1.28
Critical Value
= 1.28
35
0.88
10
n
64
36
I.e., There is not sufficient evidence that the mean bill is greater than $52.
Reject H0
1-a = .90
a = .10
1.28
Z = .88
Hypothesis
Testing:
Unknown
38
Reminder:
As in the confidence interval chapter, when t-distribution is
39
t n -1
S
n
40
Ho: = 168
H1: 168
41
= 0.05
n = 25
is unknown, so use
a t-statistic
Critical Value:
t24 = 2.0639
/2=.025
/2=.025
Reject H0
-t n-1,/2
-2.0639
Do not reject H0
Reject H0
t n-1,/2
2.0639
42
a/2=.025
X
172.50 168
1.46
S
15.40
n
25
a/2=.025
-t n-1,/2
-2.0639
t n-1,/2
1.46
2.0639
Hypothesis Testing:
Connection to Confidence Intervals
For X = 172.5, S = 15.40 and n = 25, the 95%
15.4
15.4
to 172.5 (2.0639)
25
25
166.14 178.86
Since this interval contains the hypothesized
theorem applies.
45
Testing
Proportion
46
Hypothesis Testing
Proportions
Involves categorical variables
Two possible outcomes
Success (possesses a certain characteristic)
Failure (does not possesses that characteristic)
47
Hypothesis Testing
Proportions
Sample proportion in the success category is denoted by p
X
number of successes in sample
p
n
sample size
When both n and n(1-) are at least 5, p can be
(1 )
n
48
Hypothesis Testing
Proportions
The sampling distribution of proportion (p)
p
(1 )
n
49
First, check:
n = (500)(.08) = 40
n(1-) = (500)(.92) = 460
50
H1: .08
= .05
Reject
n = 500, p = .06
.025
.025
-1.96
z
1.96
51
52
(1 )
n
Decision:
.06 .08
1.648
.08(1 .08)
500
Conclusion:
.025
.025
-1.96
z
1.96
-1.646
53
54
Z or t?
Population Mean ()
Z: samp dist normally distributed if is known
also acceptable.
Population Proportion ()
Z: binomial approximated by normal dist
55
More Examples
56
57
H0: = 4.5
a = .05
H1: 4.5
Sample size n = 25
Determine the appropriate technique
The population is normal and is known ( = 1.2) so this is a Z test
X
5 .1 4 .5
2.50
1.2
n
25
58
Decision Rule
a /2
Reject Ho if
Z < -1.96 or Z > 1.96;
otherwise do not reject.
Reject H0
Do not reject H0
-Z /2 = -1.96
Reject H0
+Z/2 = +1.96
59
problem.
Again we compute the test statistic of 2.50.
Probability (test statistic 2.50) = ______
1-0.9938 = 0.0062
The p-value for this two-tail test =2______
x 0.0062 = 0.0124
Decision rule: p < a, reject Ho.
chosen at 0.05
GRAPH:
60
Review Questions
Level of significance
True or False? level of significance = = confidence level
Types of error
In hypothesis testing if the null hypothesis has been rejected when the
alternative hypothesis has been true, which error has been committed?
Setting hypotheses
The manager of an automobile dealership is considering a new bonus
plan in order to increase sales. Currently, the mean sales rate per
salesperson is five automobiles per month. The correct set of
hypotheses for testing the effect of the bonus plan is ____
p-value approach
A two-tailed test is performed at 95% confidence. The p-value is 0.09.
What is the decision?
Is it a two-tailed test?