1. B171 (Oct. 2014) Group 7
Hypothesis testing for
one population
1
Study Unit 4
Lawrence Lee
2. Contents
Hypothesis Testing Methodology
Z Test for the Mean ( s
Known)
p-Value Approach to Hypothesis Testing
Confidence Interval Estimation
One-Tail Tests Vs. Two-Tail Tests
t Test for the Mean ( s
Unknown)
Z Test for the Proportion
Chi-squared Test for Inference about a
Population Variance
B171 2
3. Introduction
The purpose of hypothesis
testing is to determine whether
there is enough statistical
evidence in favor of a certain
belief about a parameter .
B171 3
4. What is a Hypothesis?
A Hypothesis is a
Claim (Assumption)
about the Population
Parameter
I claim the mean GPA of
this class is m = 3.5!
Examples of parameters
are population mean
or proportion
The parameter must
be identified before
analysis
B171 4
5. Concept of hypothesis testing
The critical concepts of hypothesis testing.
There are two hypotheses (about a population
parameter(s))
H0 - the null hypothesis [ for example m = 5]
H1 - the alternative hypothesis [m > 5]
Assume the null hypothesis is true.
Build a statistic related to the parameter hypothesized.
Pose the question: How probable is it to obtain a
statistic value at least as extreme as the one
observed from the sample?
(i.e. if the true mean is μ, we will tolerate a certain
amount of deviation with our sample mean as
unbiased estimator.) m = 5 x
B171 5
6. Continued
Make one of the following two decisions
(based on the test):
Reject the null hypothesis in favor of the
alternative hypothesis.
Do not reject the null hypothesis.
Two types of errors are possible when making the
decision whether to reject H0
Type I error - reject H0 when it is true.
Type II error - do not reject H0 when it is false.
B171 6
7. Hypothesis formulation
Null hypothesis
H0 must always contain the condition of equality (Refer to
Table 4.1 on p.7 of Study Unit 4)
Example : H0 : μ=5
Alternative hypothesis
H1 will only be in the following forms
H1: μ≠5 or H1: μ>5 or H1: μ<5
(represents the conclusion reached by rejecting the null
hypothesis if there is sufficient evidence from the sample
information to decide that the null hypothesis is unlikely to be
true.)
B171 7
9. One-tailed and two tailed tests
One Tailed Test
Alternative hypothesis H1 is expressed in
“<“ or “>” sign
Two Tailed Test
Alternative hypothesis H1 is expressed in
“≠” sign
See Study Guide Unit 4 p.8 Figure 4.1 for graphical
illustration.
B171 9
11. Error in Making Decisions
Type I Error
Reject a true null hypothesis
When the null hypothesis is rejected, we can
say that “We have shown the null hypothesis
to be false (with some ‘slight’ probability, i.e.
a
, of making a wrong decision)
May have serious consequences
Probability of Type I Error is
Called level of significance
Set by researcher
a
B171 11
12. Error in Making Decisions
(continued)
Type II Error
Fail to reject a false null hypothesis
Probability of Type II Error is
b
The power of the test is
(1-b )
Probability of Not Making Type I Error
(1-a )
Called the Confidence Level
B171 12
13. Type I and Type II Error
Actual
Decision
Statistical
Decision
H0 is true H0 is false
Reject H0
Type I error
(α)/Level of
Significance
Right decision
(1-β)/Power of
Test
Do not reject H0
Right decision
(1-α)/Level of
Confidence
Type II error (β)
B171 13
14. B171
Example
Mr. Chan is the QC manager on a production line.
He has to monitor the output to ensure that the
proportion of defective products is less than 0.5%.
Hence, he periodically selects a random sample
of the items produced to perform a hypothesis test
accordingly.
1)State the corresponding H0 and H1 for the above
scenario.
2)For the given situation, what is a type I error and
what is a type II error? Explain briefly.
3)Which type of error might Mr. Chan considers
more serious? Explain briefly.
14
15. Solutions 1)
H0 : The proportion of defective quality products is not less than
0.5%.
H1 : The proportion of defective products is less than 0.5%.
2)
A type I error means that the actual proportion of defective
products is not less than 0.5% but it was considered to be less
than 0.5%.
A type II error means that the actual proportion of defective
products is less than 0.5% but it was considered to be not less
than 0.5%.
3)
Mr. Chan might consider a type I error be more serious since its
consequence implies that his customer has a higher chance of
buying a low-quality product because Mr. Chan wrongly believes
that the quality of the output is up to the required standard when in
fact it is not. 15
B171
16. Hypothesis Testing Process
Identify the Population
Assume the
population
mean GPA is 3.5
( )
0 H : m = 3.5
( : 3.5) 1 H m ¹
11
Is X = 2.4 likely if m = 3.5?
No, not likely!
REJECT
22
Take a Sample
Null Hypothesis
44 3
( X = 2.4)
B171 16
17. Reason for Rejecting H0
X
22 3
... Therefore,
we reject the
null hypothesis
that = 3.5.
Sampling Distribution of
11
... if in fact this were
the population mean.
= 3.5
It is unlikely that
we would get a
sample mean of
this value ...
m
2.4
If H0 is true
X
m
B171 17
18. Accept or reject the
hypothesis?
See whether test statistic falls into acceptance
region or rejection region
Due to the uncertainty associated with making
a Type II error, we often recommended that we
use the statement
“Do not reject H0” instead of “Accept H0”
Please take note that:
When we reject H0, it does not mean that we have proved it to be false.
Since we are not proving that H0 is true and we do not certain about the
probability of making Type II error, it is wiser to say ‘do not reject H0’
instead of ‘accept H0’
B171 18
19. Level of Significance,
a
Defines Unlikely Values of Sample Statistic if
Null Hypothesis is True
Called rejection region of the sampling
distribution
Designated by a
, (level of significance)
Typical values are .01, .05, .10
Selected by the Researcher at the Beginning
Controls the Probability of Committing a Type
I Error
Provides the Critical Value(s) of the Test
B171 19
20. Level of Significance and the
Rejection Region
H0: m ³ 3.5
H1: m < 3.5
0
0
0
H0: m £ 3.5
H1: m > 3.5
H0: m = 3.5
H1: m ¹
3.5
a
Critical
Value(s)
a
a /2
Rejection
Regions
B171 20
21. Inference about a population
mean with a known population
standard deviation (p.15 of Study Unit 4)
Two approaches:
The rejection (critical) region
approach
p-value approach
B171 21
22. Rejection Region Approach to Testing
Convert Sample Statistic (e.g., X
) to
Test Statistic (e.g., Z, t or F –
statistic)
Obtain Critical Value(s) for a
Specified
a
from a Table or Computer
If the test statistic falls in the critical (or
rejection) region, reject H0
Otherwise, do not reject H0
B171 22
23. The Rejection Region Approach
The rejection region is a range of values such that if the
test statistic falls into that range, the null hypothesis is
rejected in favor of the alternative hypothesis.
x
Define the value of that is just large enough to
reject the null hypothesis as . The rejection region is
xL
x ³ xL
L is the critical value. X
B171 23
24. The Rejection region is: x ³ xL
(for one-tailed test)
x > xL x < xL xL
Do not reject the
null hypothesis
Reject the
null hypothesis
Acceptance Region
Critical Value Rejection Region
B171 24
25. Finding critical value
Determine the α
For a given σ and n, the critical value is
z
a
s m
x
L
s
- m
=
n
x z
Þ = a
+
n
L
L x
L x > x
If , reject H0; otherwise do not reject H0
B171 25
26. x
The standardized test statistic
Instead of using the statistic , we can
use the standardized value z.
= -m
n
z x
s
Then, the rejection region becomes
z ³ za
One-tail test
B171 26
27. General Steps in Hypothesis Testing
E.g., Test the Assumption (Claim) that the
True Mean # of TV Sets in U.S. Homes is at
Least 3 ( s Known)
1. State the H0
2. State the H1
3. Choose
4. Choose n
5. Choose Test
H
H
m
m
³
<
: 3
0
: 3
1
=.05
100
Z
a
n
=
test
a
B171 27
28. General Steps in Hypothesis Testing
(continued)
Reject H0
a
-1.645 Z
100 households surveyed
Computed test stat =-2,
p-value = .0228
Reject null hypothesis
There is evidence that the true
mean # TV set is less than 3
at 0.05 level of significance
6. Set up critical value(s)
7. Collect data
8. Compute test statistic
and p-value
9. Make statistical
decision
10.Draw conclusion
B171 28
29. p-Value Approach to Testing
(p.20-p.26 of Study Unit 4)
Steps:
Convert Sample Statistic (e.g., X
) to Test Statistic
(e.g., Z, t or F –statistic)
Obtain the p-value from a table or computer
p-value: probability of obtaining a test statistic as
extreme or more extreme ( £ or ³
) than the
observed sample value given H0 is true
Called observed level of significance
Smallest value of a
that an H0 can be rejected
Compare the p-value with a
for one-tailed test
a
If p-value ³, do not reject H0
If p-value <
a
, reject H0
B171 29
30. P-Value Approach
The p - value provides information about the
amount of statistical evidence that supports
the alternative hypothesis.
– The p-value of a test is the probability of observing a
test statistic at least as extreme as the one computed,
given that the null hypothesis is true.
Use commonly in computer software
Change the Step 8 (Slide 28) as Find the p-value
B171 30
31. Describing the p-value
If the p-value is less than 1%, there is
overwhelming evidence that support the
alternative hypothesis.
If the p-value is between 1% and 5%, there is a
strong evidence that supports the alternative
hypothesis.
If the p-value is between 5% and 10% there is a weak
evidence that supports the alternative hypothesis.
If the p-value exceeds 10%, there is no evidence
that supports of the alternative hypothesis.
B171 31
32. The p-value and rejection region approaches
The p-value can be used when making decisions
based on rejection region approaches as follows:
Define the hypotheses to test, and the required
significance level a.
Perform the sampling procedure, calculate the test
statistic and the p-value associated with it.
Compare the p-value to a. Reject the null hypothesis only
if p-value <a; otherwise, do not reject the null hypothesis.
The p-value
mx =170
x 175.34 L =
a= 0.05
x =178
B171 32
33. Conclusions of a test of Hypothesis
If we reject the null hypothesis, we conclude
that there is enough evidence to infer that the
alternative hypothesis is true.
If we do not reject the null hypothesis, we
conclude that there is not enough statistical
evidence to infer that the alternative
hypothesis is true.
If we reject the null hypothesis, we conclude
that there is enough evidence to infer that the
alternative hypothesis is true.
If we do not reject the null hypothesis, we
conclude that there is not enough statistical
evidence to infer that the alternative
hypothesis is true. The alternative hypothesis
is the more important
one. It represents what
we are investigating.
B171 33
34. One-Tail Z Test for Mean
( s
Known)
Assumptions
Population is normally distributed
If not normal, requires large samples (i.e.
n³30)
Null hypothesis has £ or ³
sign only
is known
Z Test Statistic
- - = =
m m
s s
/
X Z X
X
X
n
s
B171 34
35. Rejection Region
H0: m £ m 0
H1: m > m 0
Reject H0
a a
0 Z
H0: m ³ m 0
H1: m < m 0
0 Z
Reject H0
Z must be significantly
below 0 to reject H0
Small values of Z don’t
contradict H0 ; don’t reject
H0 !
B171 35
36. Example: One-Tail Test
Does an average box of
cereal contain more
than 368 grams of
cereal? A random
sample of 25 boxes
showed = 372.5.
The company has
specified s to be 15
grams. Test at the
a = 0.05 level.
368 gm.
H0:
m £ 368
H1: m > 368
X
B171 36
37. Reject and Do Not Reject
Regions
.05
0 H : m £ 368
Do Not Reject
368 X X m = m = 372.5
0 1.645 Z
Reject
1.50
X
1 H : m > 368
B171 37
38. Finding Critical Value: One-Tail
Standardized Cumulative
Normal Distribution Table
(Portion)
.05
Z .04 .06
1.6 .4495 .4505 .4515
1.7 .4591 .4599 .4608
1.8 .4671 .4678 .4686
.4738 .4750
What is Z given a = 0.05?
a = .05
1 Z s =
.5+.45 = .95
0 1.645 Z
1.9 .4744
Critical Value
= 1.645
B171 38
39. Example Solution: One-Tail Test
H0: m £ 368
H1: m > 368
a = 0.05
n = 25
Critical Value: 1.645
Z = X - m
=
1.50
n
s
Do Not Reject H0 at a = .05, since Z=1.5<1.645
Conclusion:
There is Insufficient Evidence
that True Mean is More Than 368
at 0.05 level of significance.
Reject
.05
0 1.645 Z
1.50
B171 39
40. p -Value Solution
p-Value is P(Z ³ 1.50) = 0.0668
3
p-Value =.0668
0 1.50 Z
2
0.5000
- .4332
.0668
Z Value of Sample
Statistic
From Z Table:
Lookup 1.50 to
Obtain .4332
Use the
alternative
hypothesis
to find the
direction of
the rejection
region.
1
B171 40
41. p -Value Solution (continued)
(p-Value = 0.0668) > (a = 0.05)
Do Not Reject.
0
1.50
p Value = 0.0668
a = 0.05
Z
Reject
1.645
4
Test Statistic 1.50 is in the Do Not Reject
Region
B171 41
42. Example: Two-Tail Test
Does an average box of
cereal contain 368
grams of cereal? A
random sample of 25
boxes showed = 372.5.
The company has
specified s to be 15
grams and the
distribution to be
normal. Test at the
a = 0.05 level.
368 gm.
H0: m = 368
H1: m ¹ 368
X
B171 42
43. Reject and Do Not Reject
Regions
0 H : m = 368
.025
368 X X m = m = 372.5
0 1.96 Z
Reject
.025
-1.96
1.50
X
Reject
1 H : m ¹ 368
B171 43
44. Example Solution: Two-Tail Test
Since s is known, we use Z-test
Test Statistic:
H0: m = 368
H1: m ¹ 368
= - = - = a = 0.05
n = 25
Critical Value: ±1.96
372.5 368 15 1.50
25
Z X
m
n
s
Decision:
Do Not Reject H0 at a = .05 since
-1.96 < (Z=1.5) < 1.96
Conclusion:
Reject
.025
0 1.96 Z
.025
-1.96
1.50
There is insufficient evidence
that true mean is not 368 at 0.05
level of significance.
B171 44
45. p-Value Solution
(p-Value = 0.1336) > (a = 0.05)
Do Not Reject.
p-Value = 2 x 0.0668
(for two-tailed test)
Reject
a = 0.05
0 1.50 1.96
Z
Reject
Test Statistic 1.50 is in the Do Not Reject
Region
B171 45
46. Testing hypotheses and intervals estimators
Interval estimators can be used to test
hypotheses.
Calculate the 1 - a confidence level interval
estimator, then
if the hypothesized parameter value falls within
the interval, do not reject the null hypothesis,
while
if the hypothesized parameter value falls
outside the interval, conclude that the null
hypothesis can be rejected (m is not equal to
the hypothesized value).
B171 46
47. Connection to Confidence Intervals
X s n
= = =
H0: m = 368
H1: m ¹ 368
For 372.5, 15 and 25,
the 95% confidence interval is:
( ) ( )
- £ m
£ +
X Z d
a
2
±
372.5 1.96 15 / 25 372.5 1.96 15 / 25
or
£ m
£
366.62 378.38
We are 95% confident that the population mean is
between 366.62 and 378.38.
n
If this interval contains the hypothesized mean (368),
we do not reject the null hypothesis.
It does. Do not reject.
H0 at 0.05 level of significance
B171 47
48. Drawbacks
Two-tail interval estimators may not provide the
right answer to the question posed in one-tail
hypothesis tests.
The interval estimator does not yield a p-value.
There are cases where only tests (rejection
region approach or p-value approach) produce
the information needed to make decisions.
B171 48
49. Inference About a Population
Mean with Unknown Standard
Deviation
For unknown σ, with small samples
(n<30), t-test is used.
Test statistic
tn
= -1
with d.f. (n-1)
x
-m
s n
B171 49
50. Checking the required
conditions/assumptions for using t-distribution
We need to check that the population is
normally distributed, or at least not
extremely non-normal.
We can plot the histogram of the data
set to verify its normality.
B171 50
51. Example: One-Tailed t Test
Does an average box of
cereal contain more than
368 grams of cereal? A
random sample of 36
boxes showed X = 372.5,
368 gm.
and s = 15. Test at the
a = 0.01 level.
H0: m £ 368
H1: m >
368
s is not given
B171 51
52. Example Solution: One-Tailed
H0: m £ 368
H1: m > 368
Please take note that you may use Z-test in this case
since n>30. But t-test is an exact method in this case.
Therefore, both tests are acceptable in this case.
a = 0.01
n = 36, df = 35
Critical Value: 2.4377
Test Statistic:
t XS
= -m = - =
n
Decision:
372.5 368 15 1.80
36
Do Not Reject H0 at = .01 since
t=1.80<2.4377
Conclusion:
Reject
.01
t35 0 2.4377
1.80
a
There is Insufficient Evidence
that True Mean is More Than
368 at 0.01 level of significance.
B171 52
53. p -Value Solution
(p-Value is between .025 and .05) > (a = 0.01)
p-Value = [.025, .05]
Reject
t = 1.8 & d.f. = 35
Do Not Reject.
a = 0.01
0 t35
1.80 2.4377
Test Statistic 1.80 is in the Do Not Reject
Region
B171 53
54. Example: Two-Tailed t Test
Does an average box of
cereal contain 368 grams
of cereal? A random
sample of 36 boxes
showed X = 372.5, and s
368 gm.
= 15. Test at the
a = 0.01 level.
H0: m = 368
s is not given H1: m ≠ 368
B171 54
55. Example Solution: Two-Tailed
H0: m = 368
H1: m ¹ 368
Please take note that you may use Z-test in this
case since n>30. But t-test is an exact method
in this case. Therefore, both tests are
acceptable in this case.
a = 0.01
n = 36, df = 35
Critical Value: 2.724
Test Statistic:
t XS
= -m = - =
n
Decision:
372.5 368 15 1.80
36
a
Do Not Reject H0 at = .01 since -2.724<
t=1.80 <2.724
Conclusion:
Reject
.005
t35 0 2.724
1.80
There is Insufficient Evidence
that True Mean is 368 at 0.01
level of significance.
Reject
0.005
-2.724
B171 55
56. p -Value Solution
p-Value is between 2x(.025 and .05) > (a = 0.01)
i.e. p-Value is between (.05 and .1) > (a = 0.01)
(p-Value)/2 = [.025, .05]
Reject
t = 1.8 & d.f. = 35
Do Not Reject H0.
a /2= 0.005
0 t35
1.80 2.724
Reject
a /2= 0.005
2.724
Test Statistic 1.80 is in the ‘Do Not Reject H0‘
Region
B171 56
57. Connection to Confidence Intervals
H: m = 368
0a= 0.01
H: m ¹ 368
n=36, df = 35
1For X = 372.5, S = 15
and n =25, the 99% confidence interval
is:
X t S
n
a ±
2
372.5 – (2.797) £ m £ 372.5 + (2.797)
or
364.11 £ m £ 380.89
We are 99% confident that the population mean is
between 364.11 and 380.89. Since this interval
contains the hypothesized mean (368), we do not
reject H0 at 0.01 level of significance.
B171 57
58. Inference About a Population
Proportion
Use in qualitative or categorical data
Only inference about the proportion of
occurrence of a certain value
Test statistic
ˆ
-
z = p -
p
p (1 p ) /
n
pˆ
provided that is approx. normal and both np and
n(1-p) are greater than 5
B171 58
59. Proportion
Sample Proportion in the Success
Category is Denoted by pS
(continued)
Number of Successes
p X
= =
s
n
Sample Size When Both np and n(1-p) are at Least
5, pS Can Be Approximated by a Normal
Distribution with Mean and Standard
Deviation
p p
n
s = -
ps m = p (1 )
ps
B171 59
60. Example: Z Test for Proportion
( )
Check:
np
= =
³
- = -
500 .04 20
5
1 500 1 .04
( ) ( )
= ³
480 5
n p
A marketing company
claims that a survey
will have a 4% response
rate. To test this claim,
a random sample of 500
were surveyed with 25
responses. Test at the
a = .05 significance
level.
B171 60
61. Z Test for Proportion: Solution
Two-tailed Test
Critical Values: ± 1.96
Reject Reject
.025 .025
0.05
@ - = - =
.05 .04 1.1411
B171 61
1.1411
( 1 ) .04 ( 1 .04
)
500
Z pS p
p p
n
- -
a = 0.05
n = 500
Do not reject H0 at a = .05 since
-1.96 < (Z=1.1411) < 1.96
H0: p = 0.04
H1: p ¹
0.04
Test
Statistic:
Decision
:
Conclusion
:
Z 0
-1.96 1.96
We do not have sufficient
evidence to reject the
company’s claim of 4%
response rate at 0.05 level of
significance.
S P
0.04
62. p -Value Solution
(p-Value = 0.2542) > (a = 0.05)
Do Not Reject.
p-Value = 2 x .1271
(for two-tailed test)
Reject
a = 0.05
0 1.1411 1.96
Z
Reject
Test Statistic 1.1411 is in the Do Not Reject
Region
B171 62
63. Z Test for Proportion: Solution
One-tailed Test
Critical Values: 1.645
Reject
0.05
@ - = - =
.05 .04 1.1411
0.05
B171 63
1.1411
( 1 ) .04 ( 1 .04
)
500
Z pS p
p p
n
- -
a =0.05
n = 500
Do not reject H0 at a = .05 since
Z=1.1411 < 1.645
H0: p £0 .04
H1: p >
0.04
Test
Statistic:
Decision
:
Conclusion
:
Z 0
1.645
We do not have sufficient
evidence to reject the
company’s claim of at most
4% response rate at 0.05 level
of significance.
S P
0.04
64. p -Value Solution
(p-Value = 0.1271) > (a = 0.05)
Do Not Reject H0.
p-Value = 0.5 – 0.3729
=0.1271
Reject
a = 0.05
0 1.1411 1.645
Z
Test Statistic 1.1411 is in the Do Not Reject
Region
B171 64
65. Connection to Confidence Intervals
H: p = 0.04
0a= 0.05
H: p 1¹ 0.04
n=500
For ps = 0.05, the 95% confidence interval is:
( ) ( )
= ± -
0.05 1.96 0.05 1 0.05
P 1
-
P
P Z S S
S a
n
i.e. 0.0309 £ p £ 0.0691
500
2
±
We are 9 5% confident that the population proportion
is between 0.0309 and 0.0691. Since this interval
contains the hypothesized proportion of 0.04, we do
not reject H0 at 0.05 level of significance.
B171 65
66. Inference About a Population
Variance
Some times we are interested in making
inference about the variability of
processes.
Examples:
The consistency of a production process for
quality control purposes.
Investors use variance as a measure of risk.
To draw inference about variability, the
parameter of interest is s2.
B171 66
67. The test statistic used to draw conclusions about the variability
is called a “Chi-squared test statistics’
The sample variance s2 is an unbiased,
consistent and efficient point estimator
for s2.
(n -
1)s2
The statistic s
2
has a distribution
called Chi-squared, if the population is
normally distributed.
2
(n 1)s d.f. n 1
c = - d.f. = 1
2 = -
2
s
d.f. = 5 d.f. = 10
Critical Value of
2 2
c = c -a n-
1 , 1
B171 67
68. The c2 table (p.52 of Study Unit 4)
A
A
=.01
1 - A =.99
c2
c2
A 1-A
Chi-squared
Distribution
Degrees of
freedom
c2
=.01
.990 .010
c2
.01,10 = 23.2093
.995 c2
.990 c2
.975 c2
.010 c2
.005
1 0.0000393 0.0001571 0.0009821 . . 6.6349 7.87944
..
10 2.15585 2.55821 3.24697 . . 23.2093 25.1882
. . . . . .
. . . . . . . .
**Please take note that it may not be possible to find out an exact p-value from the Chi-squared
table. To find a p-value, we can use Excel (Refer to p.42 of Study Unit 4).
B171 68
71. Estimating the population variance
(1-α)100% Confidence Interval:
From the following probability statement
P(c2
1-a/2 < c2 < c2
a/2) = 1-a
we have (by substituting
c2 = [(n - 1)s2]/s2.)
2
( 1) 2 ( 1)
n s n s
- < < -
2
1 / 2, 1
2
2
/ 2, 1
s
c
a a c
n n
- - -
B171 71
72. χ2 test statistic and decision rule
(Please also refer to Example 4.5 on pp.41 of Study Unit 4)
Similar to mean and proportion
Test statistic
c 2 = ( n - 1)
s
2
0
2
s
Decision rule: Reject H0 if
Two-tailed:
2 or
Right-tailed:
Left-tailed:
2 2
(1 2)
c < c c >
c
2 2
c c
-
a
2
1
2
2
a a
-
a
>
c <
c
B171 72
73. IDENTIFY
Example
Consider a container filling machine. Management
wants a machine to fill 1 liter (1,000 cc’s) so that
that variance of the fills is less than 1 cc2. A
random sample of n=25 1 liter fills were taken.
Does the machine perform as it should at the 5%
significance level?
1000.3
1001.3
999.5
999.7
999.3
999.8
998.3
1000.
6
999.7
999.8
Data
1001
999.4
999.5
998.5
1000.7
999.6
999.8
1000
998.2
1000.1
998.1
1000.7
999.8
1001.3
1000.7
B171 73
74. Example
We want to show that:
IDENTIFY
(so our null hypothesis becomes:
H0: σ2 = 1). We will use this test
statistic:
Variance is less than 1 cc2
H1: σ2 < 1
(n – 1)s2
χ2 =
σ2
B171 74
75. COMPUTE
Example
Since our alternative hypothesis is phrased
as:
H0: σ2 = 1 H1: σ2 < 1
We will reject Hin favor of Hif our test
statistic χ2 < χ2 0 1 1-α,n-1 falls = χ2
into χ2
= 13.8484
1-.05, 25-1 this = .95,24rejection region:
We computer the sample variance to be:
s2=0.8088
And thus our test statistic takes on this
value…
c o m p a r e
(n – 1)s2
χ2 =
σ2
(25 – 1)(0.8088)
= = 19.41
1
B171 75
76. Example
Since:
INTERPRET
There is not enough evidence to infer that the claim is true
at 0.05 level of significance.
a = .05 1-a = .95
Rejection
region
13.8484 19.41
c2 < 13.8484
c 2
2
.95,25-1 c
Do not reject the null hypothesis
B171 76
77. Example
As we saw, we cannot reject the null
hypothesis in favor of the alternative. That
is, there is not enough evidence to infer
that the claim is true.
Note: the result does not say that the
variance is greater than 1, rather it merely
states that we are unable to show that the
variance is less than 1 .
We could estimate (at 99% confidence say)
the variance of the fills…
B171 77
78. COMPUTE
Example
In order to create a confidence interval estimate
of the variance, we need these formulae:
lower confidence limit upper confidence limit
we know (n–1)s2 = 19.41 from our previous
calculation, and we have from Table 5 in
Appendix B:
χ2
α/2,n-1 = χ2
.005,24 = 45.5585
c2
1-α/2,n-1 = χ2
.995,24 =9.88623
B171 78
79. Example
COMPUTE
Thus the 99% confidence interval estimate is:
That is, the variance of fills lies between .426 and
1.963 cc2.
H0: σ 2 = 1 H1: σ 2 ≠ 1
We are 99% confident that the population variance
is between 0.426 and 1.963. Since this interval
contains the hypothesized variance of 1, we do not
reject H0 at 0.01 level of significance.
B171 79