Beruflich Dokumente
Kultur Dokumente
)
THE p -VALUE OF A TEST OF HYPOTHESIS
‘historical’ µ
Ex 1: σ
For the past few years, the number of customers of a drive-in bottleshop has
averaged 20 per hour, with a standard deviation of 3 per hour. This year,
another bottleshop 1 km away opened a drive-in window. The manager of the
first shop believes that this will result in a decrease in the number of customers.
A random sample of 15 hours showed that the mean number of customers per
hour was 18.6. Can we conclude at the 5% level of significance that the
manager’s belief is correct? n 100-C
x-bar
x 0 18.7 21
z obs 2.968
x 0.775
which is smaller, i.e. even further
from zero than the original test
statistic value, -1.677.
Z
-1.645 0
Reject H0 in favour of HA. Rejection Non-rejection
region region
In general,
a) If we perform a left-tail test at a given significance level, then HA : µ < µ0,
and H0 : µ = µ0 is equivalent with H0 : µ µ0.
b) If we perform a right-tail test at a given significance level, then HA : µ > µ0,
and H0 : µ = µ0 is equivalent with H0 : µ µ0.
4
2) If we change the significance level, e.g. increase it from 5% to 10%, then
the critical value is -1.282 instead of -1.645, but the observed test statistic
remains the same, -1.677.
5
(Ex 1)
What is the p-value of this test?
P(Z z obs ) P(Z 1.677)
P( Z 1.677) p-value
In this example, any significance level higher than 0.0465 leads to the
rejection of H0.
Note: The calculation of the p-value depends on whether the test is a left-tail
test, a right-tail test or a two-tail test.
Assuming e.g. that the test statistic is Z,
a) If the test is left tailed, the p-value is equal to P (Z < zobs);
b) If the test is right tailed, the p-value is equal to P (Z > zobs);
c) If the test is two tailed, the p-value is equal to 2P (Z > |zobs|);
In each case, reject H0 if the p-value is smaller than the significance level, α.
6
Ex 2:
A diet doctor claims that the average Australian is more than 10 kg overweight.
To test his claim, a random sample of 100 Australians were weighed, and the
difference between their actual weight and their ideal weight was calculated.
Can we infer at the 5% significance level that the doctor’s claim is true?
H0 : µ = 10 and HA : µ > 10 Right-tail test
The data set is saved on the textbook CD in the Xr10-38 Excel file.
X-bar is greater than 10, but is
t-Test: Mean it large enough to reject H0?
Kgs 0
Mean 12.175
Standard Deviation 7.898
Hypothesized Mean 10.000 x 0 12.175 10
df 99.000 t obs 2.7539
t Stat 2.754 sx 0.7898
P(T<=t) one-tail 0.004
t Critical one-tail 1.660 P- value = 0.004
P(T<=t) two-tail 0.007
t Critical two-tail 1.984
7
The critical value is 1.660, and since tobs = 2.754 > 1.660 = tα, we reject H0 and
conclude at the 5% level of significance that the average Australian is more
than 10 kg overweight.
Alternatively, we can make use of the p-value for a one-tail test with H0 : µ = 10
and HA : µ > 10.
Performing a right-tail test, we can reject H0 if the test statistic is positive, and
the p-value is smaller than α.
Note:
We have applied two different decision rules to decide whether to reject H0.
The first one was based on the comparison of the observed test statistic value
to the critical value, while the second one made use of the p-value. The two
decision rules led to the same conclusion.
8
Note: On the basis of an Excel t -test output H0 : µ = µ0 can be rejected
1) in favor of HA : µ µ0 if | tobs | > tα/2, or two tail p-value < α;
2) in favor of HA : µ < µ0 if tobs < -tα, or tobs < 0 and one tail p-value < α;
3) in favor of HA : µ > µ0 if tobs > tα, or tobs > 0 and one tail p-value < α.
Ex 3:
A market is considered profitable by an e-grocer if average orders exceed $85.
A random sample of orders were taken and the order values recorded in file
Xr9-79. Do the data provide sufficient evidence at the 5% level of significance
to establish that the market would be profitable?
9
t-Test: Mean
Orders
Mean 89.266
Standard Deviation 17.296
Hypothesized Mean 85.000
df 84.000
t Stat 2.274
P(T<=t) one-tail 0.013
t Critical one-tail 1.663
P(T<=t) two-tail 0.026
t Critical two-tail 1.989
10
HYPOTHESIS TESTS FOR COMPARING TWO
(SUB-) POPULATION MEANS
Independent samples
• Occasionally, we wish to compare two populations and to verify some
statement about the difference between the two population means.
E.g.: Do males spend less on newspapers than females?
In examples like these ones there are two populations, but only one variable.
Given that the difference between the two population means, µ1 and µ2, is
influenced only by the factor which distinguishes the two populations,
we want to test H0 : µ1 = µ2 (i.e. µ1 - µ2= 0)
against HA : µ1 µ2 (i.e. µ1 - µ2 0) two-tail test,
or HA : µ1 < µ2 (i.e. µ1 - µ2< 0) left-tail test,
or HA : µ1 > µ2 (i.e. µ1 - µ2> 0) right-tail test.
11
– In order to answer questions like these ones, we have to take
independent random samples from both populations, find the sample
means and standard deviations, and specify the sampling distribution of
the test statistic.
In general, the test statistic is equal to
Male Female
Mean 72.320 68.770 HA : µ1 µ2 (µ1 - µ2 0)
Variance 26.301 36.199
Observations 100.000 100.000 The two tail p-value of
Pooled Variance 31.250
Hypothesized Mean Difference 0.000
0.000 is less than 0.05 the
df 198.000 significance level.
t Stat 4.490 Therefore, reject H0
P(T<=t) one-tail 0.000 The distances driven are
t Critical one-tail 1.653
significantly different.
P(T<=t) two-tail 0.000
t Critical two-tail 1.972
13
Matched pairs (dependent samples)
In this case there is only one population (employees) and one variable
(performance), which is observed twice (before and after the course).
Denoting the difference between the before and after measurements as D, we
intend to test H0 : µD = µ1 - µ2= 0 against a two-tail or one-tail alternative.
The observations are matched pairs (i.e. the samples are not independent), and
the point estimator of the mean difference is X X
1 2
H0 : µD = 0 , HA : µD > 0
15