Professional Documents
Culture Documents
OF
AGRICULTURE & TECHNOLOGY
tion/answer.
5 Tests of Hypothesis 1 5
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . 5
5.2 Parametric Tests . . . . . . . . . . . . . . . . . . 9
5.2.1 Z Test for Two Means . . . . . . . . . . . 22
5.2.2 The t-Test . . . . . . . . . . . . . . . . . . 27
JJ II • Comparing Two independent Pop-
J I ulation Means . . . . . . . . . . . 32
J DocDoc I
Back Close 3
HCBA 3102 STATISTICS FOR BUSINESS
• Dependent samples . . . . . . . . 33
Solutions to Exercises . . . . . . . . . . . . . . . . 45
©JKUAT-SODeL
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 4
HCBA 3102 STATISTICS FOR BUSINESS
LESSON 5
Tests of Hypothesis 1
Learning outcomes
Upon completion of this lessonyou should be able to;
©JKUAT-SODeL
5.1. Introduction
JJ II
A statistical hypothesis is an assertion or conjecture about
J I
a parameter (or parameters) of a population. It can be viewed
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 5
HCBA 3102 STATISTICS FOR BUSINESS
as precise testable statement about the value of a population
parameter developed for the purpose of testing. Hypothesis
testing is a procedure, based on sample evidence and probabil-
ity theory, used to determine whether the hypothesis is a reason-
able statement and should not be rejected, or is unreasonable
and should be rejected.
©JKUAT-SODeL
actually false.
H0 is True H0 is false
Accept H0 Correct Type II error
Reject H0 Type I error Correct
H0 is True H0 is false
Accept H0 1−α β
Reject H0 α 1−β
©JKUAT-SODeL
against
H1 : µ 6= 5,
ate.
– Calculate the test statistic assuming H0 is true.
– Compare the test statistic with the critical value(s)
for the critical region.
– Accept or reject H0 as appropriate.
– State conclusion in terms of the original problem.
When testing for the population mean from a large sample and
JJ II the population standard deviation is known, the test statistic is
J I given by
x̄ − µ
J DocDoc I Z= √
σ/ n
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 10
HCBA 3102 STATISTICS FOR BUSINESS
where σ is a known population standard deviation.
Example . Brandways company indicate on the label that
their loaves weigh 400g. A sample of 40 loaves is selected hourly
from their processing line and the contents weighed. Last hour
a sample of 40 loaves had a mean weight of 403g with a stan-
©JKUAT-SODeL
JJ II
Step 2 : State the decision rule: State the decision rule: We
J I
need to find the value of Z that will only be exceeded 5% of
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 11
HCBA 3102 STATISTICS FOR BUSINESS
the time since we have set our alpha level at .05. Since we
have a two sided hypothesis, we use α/2 = 0.025 when reading
the table. From the Z-table tables we find that the associated
Z-score would be -1.96 or 1.96. Then
403 − 400
Z= √ = 2.371
8/ 40
JJ II
Step 4 : Decide on H0 : H0 is rejected because 2.371 is greater
J I
than the critical value of 1.96.
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 12
HCBA 3102 STATISTICS FOR BUSINESS
NOTE: By rejecting the null hypothesis, we mean that the pro-
vided sample contained enough evidence to indicate that
the process is faulty. The truth may be different from this
position.
that will only be exceeded 1% of the time since we have set our
alpha level at 0.01. Since we have a one sided hypothesis, we
use α = 0.01 when reading the table. From the Z-table tables
we find that the associated Z-score would be 2.33. Then
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 14
HCBA 3102 STATISTICS FOR BUSINESS
Step 3 : Compute the value of the test statistic:
113 − 100
Zc = √ = 2.6
15/ 9
mean with the population mean and the standard deviation for
the population is known, the proper statistical test to use is the
Z-test otherwise it becomes a T-test.
Step 4 : Decide on H0 : We reject H0 because 2.6 > 2.33 and
conclude that the data provides enough evidence to indicate
that such a training increases the IQ. Recommend it for the
whole population.
JJ II
J I
J DocDoc I NOTE: The sample should be drawn from a population from
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 15
HCBA 3102 STATISTICS FOR BUSINESS
which the Standard Deviation (or Variance) is known. Also, the
measured variable should have a Normal Distribution.
Note that if the distribution of the variable in the popula-
tion is non-normal (or unknown), the Z-test can still be used
for approximate results, provided the sample size is sufficiently
large. Sample sizes of at least 30 have been considered suffi-
©JKUAT-SODeL
H0 : µ = 50 versus H1 : µ > 50
©JKUAT-SODeL
The sample size is fairly large (greater than 30), and the stan-
dard deviation is known, so a Z-test is appropriate. We reject
the null hypothesis at 0.05 significance level if Zc > 1.64
x̄ − µ0 52 − 50
Z= √ = √ = 1.3416
σ/ n 10/ 45
JJ II Since Zc = 1.3416 < 1.64, we fail to reject the null hypothesis
J I and conclude that the evidence does not support the researcher’s
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 17
HCBA 3102 STATISTICS FOR BUSINESS
belief.
Agency may fine the company. If the machine delivers too much,
then the company may lose money. For these reasons, Jane
is looking for any evidence that the amount delivered by the
machine is different from 355 mL.
During her investigation, she obtains a random sample of 10
cans, and measures the following volumes:
JJ II x̄ − µ0 355.06 − 355
Z= √ = √ = 2.3717
σ/ n 0.08/ 10
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 19
HCBA 3102 STATISTICS FOR BUSINESS
Since Zc > 1.96, we reject the null hypothesis and conclude
that the sample provides enough evidence that the machine is
not working correctly.
©JKUAT-SODeL
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 20
HCBA 3102 STATISTICS FOR BUSINESS
Common hypothesis tests involving normal distributions
Test Hypothesis Test Statistic
A value xis from H0 : µ = µ0 Z = X−µ σ
0
∼
X ∼ N (µ0 , σ 2 ) where σ 2 is N (0, 1)
known
A value x is from X−np
©JKUAT-SODeL
H0 : µ = np Z= √
npq
X ∼ Bin(n, p) where n is
large and np, nq > 5
A sample of size n with H0 : µ = µ0 Z= x̄−µ
√0
σ n
mean x̄ is from
X ∼ N (µ0 , σ 2 ) where σ 2 is
known
A large sample of size H0 : µ = µ0 Z = x̄−µ √0
JJ II σ̂ n
n > 30 with mean x̄ is from
J I
X ∼ N (µ0 , σ 2 ) where σ 2 is
J DocDoc I
unknown 21
Back Close JKUAT, Setting trends in higher Education, Research and Innovation
HCBA 3102 STATISTICS FOR BUSINESS
5.2.1. Z Test for Two Means
The Null Hypothesis should be an assumption about the dif-
ference in the population means for two populations. The data
should consist of two samples of quantitative data (one from
each population). The samples must be obtained independently
©JKUAT-SODeL
JJ II
J I H0 : µ1 − µ2 = d and H0 : µ1 − µ2 6= d
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 22
HCBA 3102 STATISTICS FOR BUSINESS
in which d is the supposed difference in the expected values
under the null hypothesis. The Alternate Hypothesis could be,
H1 : µ1 − µ2 6= d
H1 : µ1 − µ2 < d
©JKUAT-SODeL
H1 : µ1 − µ2 > d
(x̄1 − x̄2 ) − d
Z= q 2
σ1 σ2
n1
+ n22
x̄1 − x̄2
Z=q 2
σ1 σ2
n1
+ n22
x̄1 − x̄2
Z= q
σ n11 + n12
JJ II
H0 : µA = µB
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 25
HCBA 3102 STATISTICS FOR BUSINESS
(where µA is the true mean full professor salary at IIA institu-
tions, and µB is the mean at IIB institutions) . He is looking for
evidence that IIA institutions have a higher mean salary; thus
the alternate hypothesis is
H1 : µA > µB
©JKUAT-SODeL
µA − µB 54218 − 46550
Z=q 2 2
=q = 8.5292
σA σB 84502 95002
JJ II nA
+ nB 200
+ 200
J I
This value is far much larger than 4, the most extreme value
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 26
HCBA 3102 STATISTICS FOR BUSINESS
in the standard normal, we reject the null hypothesis an con-
clude that IIA schools have a significantly higher salary than
IIB schools.
x̄ − µ
t= √ ∼ tn−1
σ̂ n
where
( x)2
X P
2 1 2
σ̂ = x − .
n−1 n
For a two-tail test using the t-distribution, you will reject the
JJ II null hypothesis when the value of the test statistic is greater
J I than tn−1,α/2 or if it is less than −tn−1,α/2 depending on the di-
J DocDoc I rection of the tail.
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 29
HCBA 3102 STATISTICS FOR BUSINESS
x̄ − µ0 256 − 250
tc = √ = √ = 3.16
σ/ n 6/ 10
faster.
d¯ − µd
t= √ ∼ tn−1
σ̂d / n
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 33
HCBA 3102 STATISTICS FOR BUSINESS
where di = xi −yi is the difference between pairs, d¯ is the average
of the differences
¯2
pP
(di − d)
σ̂d =
n−1
is the estimated standard deviation of the differences.
An independent testing agency is interested in the cost for rent-
©JKUAT-SODeL
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 34
HCBA 3102 STATISTICS FOR BUSINESS
Estate Rent06 (Ksh’00’) Rent07 (Ksh’00’)
Githurai 55 59
Kahawa 64 65
Ngomongo 23 32
Roysub 45 58
Ruiru 38 48
©JKUAT-SODeL
Kawangware 57 50
Solution
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 35
HCBA 3102 STATISTICS FOR BUSINESS
Estate Rent 2006 Rent 2007 Difference(d)
(Ksh’00’) (Ksh’00’)
Githurai 55 59 4
Kahawa 64 65 1
Ngomongo 23 32 9
Roysub 45 58 13
©JKUAT-SODeL
Ruiru 38 48 10
Kawangware 57 50 -7
TOTAL 282 312 30
AVERAGE 47 52 5
d = 416, d¯ = 5
P P 2
d = 30,
s
1 302
JJ II σ̂d = 416 − = 7.294
6−1 6
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 36
HCBA 3102 STATISTICS FOR BUSINESS
The hypothesis is
H0 : µd = 0 vs H1 : µd > 0
5−0
©JKUAT-SODeL
d̄−µd
t= √ = √ = 1.68
σ̂d / n 7.294/ 6
but t5,0.05 = 2.015,. Since tc < t5,0.05 , we fail to reject the null
hypothesis and conclude that the data do not provide enough
evidence that rent has increased significantly.
Score 1: Before 19 21 17 21 23 18 14
Score 2: After 26 29 23 23 19 29 19
improvements in students.
Example . Consider the following data as captured in SPSS
file.
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 38
HCBA 3102 STATISTICS FOR BUSINESS
©JKUAT-SODeL Table 5.1: SPSS Data file
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 39
HCBA 3102 STATISTICS FOR BUSINESS
Suppose we wish to test whether performance in Maths de-
pends on Gender, Since gender has only two categories, the
test is simply a comparison of two group means. To determine
whether the differences are by chance, the appropriate test is
independent samples t-test with the hypothesis;
©JKUAT-SODeL
The first table SPSS gives is for descriptives; From table 5.2, it
is apparent that the mean score for Males is higher than that of
Females. However, this is not conclusive as the test is not about
JJ II
the sampe data but the population from which the data was
J I
taken. The standard error of the mean is a ratio s.e(x̄) = √Sn
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 40
HCBA 3102 STATISTICS FOR BUSINESS
(s is the standard deviation) is a measure of accuracy of the
estimates.
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 41
HCBA 3102 STATISTICS FOR BUSINESS
©JKUAT-SODeL Table 5.3: T-Test results 2
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 44
HCBA 3102 STATISTICS FOR BUSINESS
Solutions to Exercises
Exercise 1. We will assume that the scores (X) of the students
in the professor’s class are approximately normally distributed
with unknown parameters µ and σ.
State the hypotheses
©JKUAT-SODeL
H0 : µ = 60 vs H1 : µ < 60
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 46
HCBA 3102 STATISTICS FOR BUSINESS
Exercise 3. Hint: Similar test as the one done in the example.
Exercise 3
©JKUAT-SODeL
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 47
HCBA 3102 STATISTICS FOR BUSINESS
Exercise 4. Hint: Use One-sample t-test with test value 65.
Confirm that the null hypothesis H0 : µ = 65 is accepted.
Exercise 4
©JKUAT-SODeL
JJ II
J I
J DocDoc I
Back Close JKUAT, Setting trends in higher Education, Research and Innovation 48