Transcript p-value

Business Statistics - QBM117
The p value
Objectives

Calculation of the p-value of a hypothesis test.

Interpretation of the p- value.

Testing a hypothesis using the p-value.
What is the p-value of a test?
One of the main problems with the testing procedure
used so far is that if we change the level of significance,
this may change the test’s conclusion.
One way of avoiding this is by reporting the p-value
of the test.
The p-value of a test is the smallest value of  that
would lead to rejection of the null hypothesis.
It is a measure of the likelihood of obtaining a
particular sample mean or sample proportion, if the
null hypothesis is true.
How do we calculate the p-value of a test?
The p-value for a one tail test is found by
p  value  P ( z  z sample ) for an upper tail test.
p-value
3.00
z sample
2.50
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
-1.50
-2.00
-2.50
-3
0
z
How do we calculate the p-value of a test?
The p-value for a one tail test is found by
p  value  P ( z  z sample ) for a lower tail test.
p-value
3.00
2.50
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
-1.50
-2.00
-2.50
-3
z sample
0
z
The p-value for a two tailed test is found by
2 P ( z  z sample ) if z sample  0
or
2 P ( z  z sample ) if z sample  0
1/2 p-value
1/2 p-value
3.00
2.50
z sample
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
-1.50
-2.00
-2.50
-3
 z sample
0
z
Exercise 10.19 p342 (9.19 p308 abridged)
:   200
H
0
H
A
:   200
z sample
 2 . 63
p-value
3.00
z2.63
sample
2.50
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
-1.50
-2.00
-2.50
-3
0
z
pp  value
))  P
value  P
P(( zz  zzsample
P ( zz  22. 63 )
sample
 0 . 5  0 . 4957  0 . 0043
Exercise 10.18 p342 (9.18 p308 abridged)
H 0 :   500
H
A
z sample   1 . 76
:   500
1/2 p-value
z
z-1.76
sample
p  value  2 P ( z  z sample )  2 P ( z   1 . 76 )
 2 ( 0 . 5  0 . 4608 )  0 . 0784
3.00
2.50
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
-1.50
-2.00
-2.50
-3
0
Interpretation of the p-value
The p-value is very important because it measures the
amount of statistical evidence that supports the alternative
hypothesis.
For a given hypothesis test, as the sample statistic moves
further away from the hypothesised population
parameter, the test statistic gets larger and the p-value
gets smaller.
ie there is more evidence to indicate that the
alternative hypothesis is true.
Using the p-value to test hypotheses
A small p-value indicates that if the null hypothesis is true,
then the probability of obtaining a sample result as extreme
as that obtained is very small ie highly unlikely.
Therefore small p-values lead to rejection of the null
hypothesis.
A large p-value indicates that if the null hypothesis is true,
then the probability of obtaining a sample result as extreme
as that obtained is reasonably high ie quite likely.
Therefore large p-values lead to non-rejection of the
null hypothesis.
What is considered to be a small p-value?
This depends on the researcher however
If the p-value <  it would be considered small and
hence the researcher would reject H0 The researcher
would then conclude there is sufficient evidence to
support the alternative hypothesis.
If the p-value >  it would not be considered small
and hence the researcher would not reject H0 . The
researcher would then conclude there is insufficient
evidence to support the alternative hypothesis.
Exercise 10.70 p360 (9.70 p328 abridged)
Step 1
H 0 : p  0 . 22
H A : p  0 . 22
Step 2
z
ˆp
p
pq / n
Step 3
  0.05
Region of non-rejection
0.95
3 .0 0
2 .5 0
2 .0 0
1 .5 0
1 .0 0
0 .5 0
0 .0 0
- 0 .5 0
- 1 .0 0
- 1 .5 0
- 2 .0 0
- 2 .5 0
-3
0
z
α = 0.05
Critical
1.645
value
Step 4
Reject
Reject H
H00 ifif zpsample
value 1.645
0.05
Step 5
z sample  2.90
p value  P ( z  z sample)
 P ( z  2.90)
 0.5  0.4981
 0.0019
Step 6
Since 0.0019
2.9 > 1.645
< 0.05
wewe
reject
reject
H0.H0.
There is sufficient evidence at  = 0.05 to conclude
that the campaign was a success.
How do we calculate the p-value of a test
when our test statistic is a t statistic?
The p-value for a one tail test is found by
p  value  P ( t  t sample )
for an upper tail test.
p-value
3.00
2.50
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
-1.50
-2.00
-2.50
-3
0
t
t sample
However the process for calculating this is not so simple.
The p-value for a one tail test is found by
p  value  P ( t  t sample ) for a lower tail test.
p-value
3.00
2.50
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
-1.50
-2.00
-2.50
-3
t sample
0
t
Example
Exercise 10.26 p346 (9.26 p312 abridged)
You will remember that the hypotheses we were testing were
H 0 :   160
H A :   160
The test statistic for this test was t = -3.87
 p  value  P ( t   3 . 87 )
3 .0 0
2 .5 0
2 .0 0
1 .5 0
1 .0 0
0
0 .5 0
0 .0 0
- 0 .5 0
- 1 .0 0
- 1 .5 0
- 2 .0 0
- 2 .5 0
-3
-3.87
t
Since n = 15, the degrees of freedom here are 14.
From Table 4, appendix C we find
t 0 .005 ,14  2 . 977
0.005
3.00
2.50
2.00
1.50
1.00
0
0.50
0.00
-0.50
-1.00
-1.50
-2.00
-2.50
-3
t14
2.977
Therefore due to the symmetric nature of the t distribution
0.005
3.00
2.50
2.00
1.50
1.00
0
0.50
0.00
- 0.50
- 1.00
- 1.50
- 2.00
- 2.50
-3
-2.977
t14
The p-value we require is p  value  P ( t   3 . 87 )
Therefore the best we can say is that the p-value < 0.005
Exercises to be completed before next lecture
S&S 10.19 10.21 10.25 10.53 10.58 10.67
(9.19
9.21
9.25
9.53
9.58
9.67 abridged)