
Lesson 8 :Testing Hypotheses
Satya Mandal
Due Date:
See the Lecture Notes Site.
The Philosophy of Testing Hypotheses
The Testing of hypotheses is another approach to estimation of parameters. A hypothesis H_{0},
called the Null hypothesis, is
tested against another hypothesis
H_{A},
called the alternative
hypothesis. Only one of these two hypotheses is true.
Based
on the collected sample and established
testing criterion, one of them is accepted and the other one rejected.
The following two examples would provide further insight.
Example 1.
An assertion is made that the disparity between the wages (annual income) of working men and women does not exist any more. To test this assertion,
the mean annual incomes μ_{1}, μ_{2}, respectively, of the working male and female populations were
compared. Our Null hypothesis H_{0}
would be that the mean annual income
μ_{1} of the working male population would be higher than the mean annual income μ_{2} of the working female population. The Alternative Hypothesis H_{A} would be,
as the assertion suggests,
that these two means would be equal. We write them formally as:
H_{0} : μ_{1}
μ_{2}
> 0
H_{A} : μ_{1}
μ_{2}
= 0
Example 2.
A TV commentator mentioned that, during the last decade, the life expectancy of human being has increased substantially from 75 years. To test this assertion, the mean life expectancy
μ was compared with 75.
The Null hypothesis H_{0}
would be that the mean life expectancy
μ remains equal to 75, as it was before.
The Alternative Hypothesis H_{A} would be that,
as the assertion suggests, the mean
μ rose above 75 year by now.
We write them formally as:
H_{0} : μ
=75
H_{A} : μ >75
Definitions and Terminologies.
Following are some definitions and terminologies.
 Definition. A statistical
hypothesis is defined to be
a statement, claim, or proposition regarding
a population. Usually,
it would be about the values of the population
parameters. The hypotheses
H_{0} and H_{A} in the above two examples would examples
of statistical hypotheses.
 It would be important to distinguish
which one would be the Null hypothesis and which
one would be the alternative hypothesis in a given context.
One of them would, essentially,
be the negation of the other.
 The Null hypothesis H_{0}
represents the status quo.
It would be the conventional wisdom.
It represents something
that was accepted for a long time, or some assumption or
method that has been working reliably for a long time.
Null hypothesis would remain as the default, unless the collected data provides very strong evidence against it,
in favor of the alternative. There is a clear bias in favor of the Null Hypothesis.
The alternative hypothesis represents
a new claim or something out
of the ordinary. It could be a researcher's new technology
or some sales person's claim. The bar for acceptance of the Alternative Hypothesis is very high.
The burden of proof of its validity belongs to those who assert the same.
There may even be resistance or skepticism about its validity.
It would be accepted only if there
is very strong evidence, in the collected
data, in its support.
There are reasons for such favoritism in favor of Null Hypothesis. This is because an incorrect decision to reject the Null may have more serious consequences than rejecting the Alternative incorrectly. For example, in any medical test, erroneously concluding that the patient does not have an ailment would have more grievous consequences than erroneously concluding that the patient has the same ailment.
Similarly, when one designs a pregnancy test, the priority would be to minimize chances (probability) of erroneously concluding that one is not pregnant when one is indeed pregnant,
than the converse. Common sense dictates that such a test could only allow
a maximum of five percent of such erroneous conclusions.
Such erroneous conclusions are also known as
false negative
and false positive.
 Given a Null hypothesis H_{0} and an alternative hypothesis
H_{A}, a test of hypothesis is
a rule or a procedure to decide, based on the collected sample, whether
to accept H_{0} or H_{A}.
The test will be based on the value of a test statistic. The rule
is also called the decision rule.
A test of hypothesis is also known as a
Significance Test.
The test will be based on the value of a test statistic.
 Two Types of errors. In such
testing of hypotheses,
two types of mistaken conclusions (errors) are possible as follows.
 Rejecting the Null H_{0} when it is in fact true
would be
called the type one error.
The analogy would be a false negative.
 Accepting the Null H_{0} when it is in fact false
would be called
the type two error.
The corresponding analogy would be a false positive.
 The probability of type one error would be called the
level of significance.
It would be
denoted by α.
Since the priority would be to minimize the frequency of false negative,
α would be a small number.
Most often, α
will be a .1, .05, .01 or a small number.
The rest of this chapter would be analogous to Lesson 7.
Corresponding to each interval estimation we considered, there would be
one Significance Test.
8.1 A Significance Test for mean μ, when σ is known
Let X be a random variable with mean μ and standard deviation
σ. Some of our hypotheses testing would look like the following.
Two Tail Test 
Left Tail Test 
Right Tail Test 
H_{0} : μ
= 75
H_{A} : μ ≠ 75

H_{0} : μ =
75
H_{A} : μ > 75

H_{0 }: μ
= 75
H_{A }: μ
< 75

More generally, they would look like one of the following.
Two Tail Test 
Left Tail Test 
Right Tail Test 
H_{0} : μ
= μ _{0}
H_{A} : μ ≠ μ _{0}

H_{0} : μ =
μ _{0}
H_{A} : μ > μ _{0}

H_{0 }: μ
= μ _{0}
H_{A }: μ
<
μ _{0}

In this course, all the Null Hypotheses H_{0} would be an equality.
The alternative Hypotheses H_{A} would be one of the three
inequalities as above.
Develop a Significance Test
A Significance Test for the mean μ
would be developed for the following Null and Alternative hypotheses:
H_{0} : μ =
μ _{0}
H_{A }: μ ≠
μ _{0}
Take a sample X_{1},X_{2}, …, X_{m}
of size m from the X population and let X
be the sample mean.
 The sample size m is assumed to be large. Therefore, by CLT
X has
N(μ,
σ_{X})
distribution, where
σ
_{X}
= σ/√m.
 By increasing the sample size m,
both type one and type two errors can be controlled.
Once the sample size is fixed, it is not possible
to control both simultaneously.
As one of them is minimized the other one goes up.
As was mentioned above,
priority would be
to control the probability of type
one error, that is the level of significance
α.
Therefore,
a Test of Significance at the level of significance α will be developed.
 As usual, use X as an
estimator of μ.
As the alternative hypothesis is
H_{A} :
μ ≠ μ_{0},
the null hypothesis H_{0} would be rejected, only if X
and μ_{0} are far apart, that is, if

X  μ_{0}
is large.
 If H_{0} is true, then μ = μ_{0}
and
Z=(Xμ_{0})
/σ_{X}
has N(0,1) distribution, where
σ_{X}
= σ/√m.
Expression Z above will be called a test
statistic and we will accept H_{0} if the observed
(absolute) value z of Z is small and reject H_{0} if
the observed value z of Z is large.
 If H_{0} is true, then
P(Z is not within
[ z_{α /2,} z_{α/2} ]) =
α
 So, at the level of significance α,
the decision rule is set as:
Reject H_{0
} if
z is not within
[ z_{α/2}, z_{α/2} ]
where
z = (xμ_{0})
/σ_{X}
= (xμ
_{0})√m/σ.
Accept H_{0} otherwise.
Obviously, rejection of H_{0} is synonymous
to acceptance of H_{A}.
 The above decision rule works only if we know the value of σ.
The Hypothesis Test for the mean μ, when σ is known
Arguing similary, set
the Decision Rules for all three tests for mean μ. It is
assumes that the value of σ is known.
 Twotail test: The decision rule
for testing the hypotheses
H_{0 }: μ
= μ_{0}
H_{A }: μ
≠ μ_{0}
is set as, at the level of significance α,
Reject H_{0 }if
z
is not within [ z_{α/2},
z_{α/2} ]
where
z =
(xμ
_{0})√m/σ.
Accept H_{0} otherwise.
 Lefttail test:
The decision rule for testing the hypotheses
H_{0} :
μ = μ_{0}
H_{A} : μ
< μ_{0}
is set as, at the level of significance α
Reject H_{0 }if
z < z_{α }
where
z =
(xμ_{0})√m/σ.
Accept H_{0} otherwise.
 Righttail test:
The decision rule for testing the hypotheses
H_{0} :
μ = μ_{0}
H_{A} : μ >
μ_{0}
is set as, at the level of significance α,
Reject H_{0}
if z > z_{ α }
where
z =
(xμ_{0})√m/σ.
Accept H_{0} otherwise.

Informally, these will be called ZTests.
Definition. The set of values (that is, the
intervals) that leads to the rejection of the Null hypothesis H_{0}
is called the rejection region or the critical
region.
pValue based Decision Rules
There is an alternative and equivalent way to describe the decision rules,
stated above. This is based on some probability computations.
Definition. Let T be a test statistic
to test H_{0} against H_{A}. Let the observed value
of T = t. The pvalue, for this test,
is defined as the
probability, assuming H_{0} is true, that T will take a value
at least as extreme as t or worse. In the above decision rules, the
test statistic is
Z = (Xμ_{0})
/σ_{X}
=
(xμ_{0})√m/
σ
In particular for the Ztest,
if Z = z is the observed value of Z, then pvalue is define as follow.
The normalcdf function of TI84 can be used to compute the same.
 For the twotail test, the pvalue is given by
p=P(Z ∉[z,z]) =
1  P(z < Z < z) =
1  normalcdf(z, z).
 For the lefttail test, the pvalue is given by
p=P(Z < z)
= normalcdf(5, z).
 For the righttail test, the pvalue is given by
p=P(Z > z) =
normalcdf(z, 5).
pvalue based Decision Rules:
For all three ZTests,
the pvalues can be computed as above. Then,
the above decision rules could, equivalently, be written as,
at the level of significance α,
Reject H_{0 }if
p < α
Accept H_{0} otherwise.
Remark. For the rest of this chapter, the
decision rules for various significance tests will be described in two ways:
(1) By checking whether the value of the test statistics T falls within the critical region or not. (2) By checking whether the
pvalue < α or not?
Problems on 8.1: On ZTests
Exercise 8.1.1.
The standard deviation of life expectancy of a population is
σ = 15 years. A
sample of size 25 had mean life expectancy X =
= 81 years. Perform a significence test for
the null and alternative hypothesis, regarding the mean life expectancy μ:
H_{0} : μ =
75
H_{A} : μ ≠
75.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 5 percent level of significance will you reject or accept the
null hypothesis?

What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
Here the population standard deviation σ = 15,
the sample size n = 25,
the sample mean X = 81,
Also, μ_{0} = 75
 The Test Statistics
z =
(x
μ_{0})√n/σ
=(8175)√25/15
= 2.
 This is a Two Tail Test. So,
pvalue =
1  P(z < Z < z) =
1  normalcdf(z, z) =
1  normalcdf(2, 2) = 1  .9545 = .0455.

Five percent level of significance means α = .05.
Since,
pvalue = .0455 < α = .05, we REJECT the null hypothesis at 5 percent level of significance.
That means, at five percent level of significance, we accept
that the mean life expectancy
μ ≠
75.

Since pvalue = .0455, from this possibilities of
.1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent; 5 percent would be the lowest level at which we would reject the null hypothesis.
pvalue demo. The problem may have changed.
Exercise 8.1.2. (Change the level of significance.)
Assume the same situation as in exercise 8.1.1.
At the 1 percent level of significance will you reject or accept the
null hypothesis?
Solution by Long Hand Method:
This is also a two tail test. From Exercise 8.1.1, pvalue = .0455.
One percent level of significance means α = .01.Since,
pvalue = .0455 is not less than α = .01.
We ACCEPT the null hypothesis at one percent level of significance.
That means, at one percent level of significance, we do not accept
that the mean life expectancy
μ ≠
75.
Exercise 8.1.3. (Change the alternative hypothesis)
Assume the same situation as in exercise 8.1.1 and change the hypotheses as
follows:
H_{0} : μ
= 75
H_{A} : μ > 75
Answer all the four questions as in exercise 8.1.1.
Solution by Long Hand Method:

From exercise 8.1.1 the test statistics z = = 2.

This is a Right Tail Test. So,
pvalue =
=P(Z > z) =
normalcdf(2, 5) = .02275

Five percent level of significance means α = .05.
Since,
pvalue = .02275 < α = .05, we REJECT the null hypothesis at 5 percent level of significance.
That means, at five percent level of significance, we accept
that the mean life expectancy
μ is higher than
75 years.

Since pvalue = .02275, from this possibilities of
.1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10
percent; 3 percent would be the lowest level at which we would reject the null hypothesis (i.e. accept the alternative).
pvalue demo. The problem may have changed.
Exercise 8.1.4. The time taken by an athlete
to run an event is normally distributed with mean μ
and known standard deviation σ = 3.5
seconds. The coach believes that his/her mean time
μ
has improved from last year's
mean 34 seconds. To test, the athlete ran 16 times and the sample mean
was found to be X = 31 seconds.
 Formulate the null and alternative hypotheses to perform a significance test for coach's belief.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 5 percent level of significance will you reject or accept the null hypothesis (or that his/her time has improved or not)?

What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:

The alternative hypothesis is the coach's belief: H_{A}: μ < 34. The null and alternative hypotheses are:
H_{0} : μ =
34
H_{A} : μ <
34.
We summarize the given data:
The population standard deviation σ = 3.5,
the sample size n = 16,
the sample mean X = 31,
Also, μ_{0} = 34
 The Test Statistics
z =
(x
μ_{0})√n/σ
=(3134)√16/3.5
= 3.4286
 This is a Left Tail Test. So,
pvalue =
P(Z < z) =
normalcdf(5, z) =
normalcdf(5, 3.4286)
= 3.0311*10^{4}.

Five percent level of significance means α = .05.
Since,
pvalue = 3.0311*10^{4} < α = .05, we
REJECT the null hypothesis at 5 percent level of significance.
That means, at five percent level of significance, we accept
that the mean time
μ
has improved from last year's mean 34 seconds.

Since pvalue = 3.0311*10^{4}, from this possibilities of
.1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10
percent; .1 percent (because 3.0311*10^{4} < .001)
would be the lowest level at which we would reject the null hypothesis.
pvalue demo .The problem may have changed.
Exercise 8.1.5. The effectiveness of a weight loss program is to be tested on a group of 83 participants. At the beginning of the program, the mean weight of group is 210 pounds. At the end of the program the mean weight of the group is 199 pounds.
The standard deviation of weight is known to be σ = 53.1 pounds.
In terms of mean weight μ, perform a significance test that the program is effective.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Decide if it is a Two Tail, Left Tail or Right Tail Test and
compute the pvalue.
 At the 2 percent level of significance will you reject or accept the null hypothesis (or that the program is effective or not)?

What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
The population mean weight (after completing such a program) will be denoted by μ.

The alternative hypothesis is program was effective to reduce the
mean weight feom 210 pounds: H_{A}: μ < 210. The null and alternative hypotheses are:
H_{0} : μ =
210
H_{A} : μ <
210.
We summarize the given data:
The population standard deviation σ = 53.1,
the sample size n = 83,
the sample mean X = 199,
Also, μ_{0} = 210
 The Test Statistics
z =
(x
μ_{0})√n/σ
=(199210)√83/53.1
= 1.8872
 This is a Left Tail Test. So,
pvalue =
P(Z < z) =
normalcdf(5, z) =
normalcdf(5, 1.8872) = .0296.

Two percent level of significance means α = .02.
Since,
pvalue = .0296 is NOT less than α = .02, we accept the null hypothesis at 2 percent level of significance.
That means, at two percent level of significance, we do not accept
that the weight loss program is effective.

Since pvalue = .0296, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 3 percent would be the lowest level at which we would reject the null hypothesis.
Exercise 8.1.6. A manufacturer of heating furnace is marketing a new model of energy efficient furnace.
The mean gas consumption in January by ordinary furnaces is 153 CCF.
A sample of 93 new model furnace had a mean consumption of 142 CCF in January.
The standard deviation of consumption in January is known to be σ = 46 CCF.
In terms of mean consumption μ, perform a significance test that the new model is really energy efficient.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 1 percent level of significance will you reject or accept the null hypothesis (or that the new model is energy efficient or not)?

What would be the lowest level of significance,
percent among
.1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
The population mean consumption in January will be denoted by μ.

The alternative hypothesis is the claim of the manufacturer: H_{A}: μ < 153. The null and alternative hypotheses are:
H_{0} : μ =
153
H_{A} : μ <
153.
We summarize the given data:
The population standard deviation σ = 46,
the sample size n = 93,
the sample mean X = 142,
Also, μ_{0} = 153
 The Test Statistics
z =
(x
μ_{0})√n/σ
=(142  153)√83/46
= 2.3061
 This is a Left Tail Test. So,
pvalue =
P(Z < z) =
normalcdf(5, z) =
normalcdf(5, 2.3061) = .01055.

One percent level of significance means α = .01.
Since,
pvalue = .01055 is NOT less than α = .01, we accept the null hypothesis at 1 percent level of significance.
That means, at one percent level of significance, we do not accept
that the this model is energy efficient.

Since pvalue = .01055, from this possibilities of
.1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent; 2 percent would be the lowest level at which we would reject the null hypothesis.
Exercise 8.1.7. It is believed that due to favorable weather conditions the mean weight μ of King salmon in Anchor River would be higher than the last
year's mean of 33 pounds .
The standard deviation of the weight is known to be σ = 16 pounds.
A catch of 53 King had a mean of 39 pounds.
In terms of mean weight
μ, perform a significance test that the weight would be higher.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 2 percent level of significance will you reject or accept the null hypothesis (or that the mean weight hasincreased or not)?

What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
The population mean weight will be denoted by μ.

The alternative hypothesis is that the mean weight
has increased: H_{A}: μ > 33. The null and alternative hypotheses are:
H_{0} : μ =
33
H_{A} : μ >
33.
We summarize the given data:
The population standard deviation σ = 16,
the sample size n = 53,
the sample mean X = 39,
Also, μ_{0} = 33
 The Test Statistics
z =
(x
μ_{0})√n/σ
=(39  33)√53/16
= 2.7300
 This is a Right Tail Test. So,
pvalue =
P(z < Z) =
normalcdf(2.7300, 5) =
.0032

Two percent level of significance means α = .02.
Since,
pvalue = .0032 < α = .02, we REJECT the null hypothesis at 2 percent level of significance.
That means, at two percent level of significance, we accept
that the mean weight has increased.

Since pvalue = .0032, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; .5 percent (because .0032 < .005) would be the lowest level at which we would reject the null hypothesis.
Exercise 8.1.8. The instructor of Math 105 claims that due to his updated method of teaching, the student's learning has improved.
The mean percent score of all his Math 365 courses before this semester was 68 percent.
This semester in his call of 79 students, the mean percent score is 74 percent.
The standard deviation of the percent score is known to be σ = 22 percent.
In terms of mean consumption μ, perform a significance test that the percent score is higher.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 2 percent level of significance will you reject or accept the null hypothesis (or that the student's learning has improved or not)?

What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
The population mean percent score will be denoted by μ.

The alternative hypothesis is that the mean percent score
has increased from 68 percent: H_{A}: μ > 68. The null and alternative hypotheses are:
H_{0} : μ =
68
H_{A} : μ >
68.
We summarize the given data:
The population standard deviation σ = 22,
the sample size n = 79,
the sample mean X = 74,
Also, μ_{0} = 68
 The Test Statistics
z =
(x
μ_{0})√n/σ
=(74  68)√79
/22
= 2.4241
 This is a Right Tail Test. So,
pvalue =
P(z < Z) =
normalcdf(z, 5) =
normalcdf(2.4241, 5)=
.0077

Two percent level of significance means α = .02.
Since,
pvalue = .0077 < α = .02, we REJECT the null hypothesis at 2 percent level of significance.
That means, at two percent level of significance, we accept
that the mean percent score has increased.

Since pvalue = .0077, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 1 percent (because .0077 < .001) would be the lowest level at which we would reject the null hypothesis.
Exercise 8.1.9. It is believed that the annual mean expenditure, including tuition, for students has increased from the corresponding mean in year 2000. In year 2000, the mean annual expenditure was $17,000.
A sample of 87 students had annual mean expenditure of $19,500.
The standard deviation annual expenditure is known to be σ = $7,500 percent.
In terms of mean expenditure μ, perform a significance test that the mean annual expenditure μ has increased.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 2 percent level of significance will you reject or accept the null hypothesis (or that the expenditure has or not)?

What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
8.2 Significance Test for μ, Case of σ
Unknown
Let X be a random variable with mean μ and standard deviation σ. In this section also, another confidence interval of the mean μ. In contrast to ZTest, this section deals with the situation when σ is unknown.
As in the case of
Titervals (section 7.2), X would be assumed to have a normal distribution.
Two Tail, Left Tail and Right Tail Tests
would be developed to test the null hypothesis H_{0}: μ = μ_{0}, in the case
when the value of σ
is not known.
A sample X_{1},X_{2},…,X_{m} of size m
is drawn from the X population. Let X
and S^{2} denote the sample mean and variance, respectively.
The
statistic
T=((Xμ_{0}) √m) /S
would be the
Test Statistic.
Similar to the situation of Tintervals (section 7.2),
when the null hypthesis H_{0}: μ = μ_{0}
is true, T has tdistribution with degrees of freedom m1. Using
the same kind of arguments as in section 8.1,
the decision rules are set as follows:
 Twotail test:
The decision rule for testing the hypotheses
H_{0} : μ=
μ_{0}
H_{A} : μ
≠ μ_{0}
is set as, at the level of significance α,
Reject H_{0
} if t
is not within
[ t_{m1, α/2,}
t_{m1, α/2} ]
where
t =
((xμ_{0})
√m)
/s.
Accept H_{0} otherwise.
 Lefttail test:
The decision rule for testing the hypotheses
H_{0} : μ
= μ_{0}
H_{A} : μ
< μ_{0}
is set as, at the level of significance α,
Reject H_{0
} if
t < t_{m1, α }
where
t = ((xμ_{0})
√m)
/s.
Accept H_{0} otherwise.
 Righttail test:
The decision rule for testing the hypotheses
H_{0} : μ = μ_{0}
H_{A} : μ > μ_{0}
is set as, at the level of significance α,
Reject H_{0}
if t > t_{m1, }_{α}
where
t = ((xμ_{0})
√m)
/s
Accept H_{0} otherwise.
These are known as TTests.
pValue based Decision Rules
The
test statistic
T =
(xμ_{0})
√m/S
has a tdistribution, with degrees of freedom m1.
For the TTests,
if T = t is the observed value of T, then pvalue is define as follow.
The tcdf function of TI84 can be used to compute the same.
 For the twotail test, the pvalue is given by
p=P(T
not within
[t,t]) =
1  P(t < Z < t) =
1  tcdf(t, t, m1).
 For the lefttail test, the pvalue is given by
p=P(T < t)
=tcdf(5, t, m1) + [1  tcdf(5, 5, m1)]/2
≈
tcdf(5, t, m1)
whenever m is large.
 For the righttail test, the pvalue is given by
p=P(T > t)
= tcdf(t, 5, m1) + [1  tcdf(5, 5, m1)]/2
≈
tcdf(t, 5, m1)
whenever m is large.
pvalue based Decision Rules:
For all three TTests,
the pvalues can be computed as above. Then,
the above decision rules could, equivalently, be written as,
at the level of significance α,
Reject H_{0 }if
p < α
Accept H_{0} otherwise.
Problems on 8.2: on TTests
Exercise 8.2.1. A supplier of lamps
claims that the mean lifetime of his lamps is longer than that of the
lamps in the market. The mean lifetime of
the bulbs on the market is 3456 hours. To test the claim of the supplier,
a sample of 26 bulbs were examined.
The sample mean was found to be 3720 hours
and the sample standard deviation was s = 552 hours.
In terms of mean lifetime μ, perform a significance test that the
supplier's lamps last longer.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic T.
 Compute the pvalue.
 At the 5 percent level of significance will you reject or accept the null hypothesis (or that the mean lifetime of the lamps is higher or not)?

What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
Here the population standard deviation is not known.
So, the Ttest will be used.

The alternative hypothesis is that mean lifetime μ of
the supplier's lamps is higher than 3456 hours:
H_{A}: μ > 3456. The null and alternative hypotheses are:
H_{0} : μ =
3456
H_{A} : μ >
3456.
We summarize the given data:
The sample size n = 26,
The sample mean X = 3720,
The sample standard deviation S = 552,
Also, μ_{0} = 3456
 The Test Statistics
t =
(x
μ_{0})√n/S
=(3720  3456)√
26/552
= 2.4387
 This is a Right Tail TTest.
The degrees for freedom df = m1 261 =25.
pvalue =
P(t < T) =
tcdf(2.4387, 5, 25) =
.0111

Five percent level of significance means α = .05.
Since,
pvalue = .0111 < α = .05, we REJECT the null hypothesis at 5 percent level of significance.
That means, at five percent level of significance, we accept
that the supplier's claim.

Since pvalue = .0111, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 2 percent (because .0111 < .02) would be the lowest level at which we would reject the null hypothesis.
pValue demo . The problem may have changed.
Exercise 8.2.2. It is believed that the mean
length of babies at birth in the United States is higher than the
mean of 16.7 inches in some other nation.
A sample of 33 babies in the United States
was collected, and the sample mean and standard deviation was found
to be X = 19 inches, S = 5.5 inches.
Perform a
of significance test for this beleif as follows.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic T.
 Compute the pvalue.
 At the 1 percent level of significance will you reject or accept the null hypothesis (or that the birth length is higher or not)?

What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
Here the population standard deviation is not known.
So, the Ttest will be used.

The alternative hypothesis is that mean birth length μ
in US is higher than 16.7 inches:
H_{A}: μ > 16.7 . The null and alternative hypotheses are:
H_{0} : μ =
16.7
H_{A} : μ >
16.7 .
We summarize the given data:
The sample size n = 33,
The sample mean X = 19,
The sample standard deviation S = 5.5,
Also, μ_{0} = 16.7
 The Test Statistics
t =
(x
μ_{0})√n/S
=(19  16.7)√
33/5.5
= 2.4023
 This is a Right Tail TTest.
The degrees for freedom df = m1 331 = 32.
pvalue =
P(t < T) =
tcdf(2.4023, 5, 32) =
.0111

One percent level of significance means α = .01.
Since,
pvalue = .0111 is not less than α = .01, we ACCEPT the null hypothesis at 1 percent level of significance.
That means, at one percent level of significance, we do NOT accept
that the mean birth length μ is longer than 16.7 .

Since pvalue = .0111, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 2 percent (because .0111 < .02) would be the lowest level at which we would reject the null hypothesis.
pValue demo .
The problem may have changed.
Exercise 8.2.3. A car manufacturer claims
that a new model of car will get more mileage per gallon than the old
model. The old model gets a mean mileage of 33 miles per gallon. To
test the claim, 19 cars from the new model were tested and the sample
mean was found to be x = 35 miles and standard
deviation s = 3.3 miles. Perform a significance test for this manufacturer's claim as follows.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic T.
 Compute the pvalue.
 At the 1 percent level of significance will you reject or accept the null hypothesis (or that the milage is higher or not)?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
Here the population standard deviation is not known.
So, the Ttest will be used.

The alternative hypothesis is that mean milage μ per gallon for the new model is higher than 33 miles:
H_{A}: μ > 33 . The null and alternative hypotheses are:
H_{0} : μ =
33
H_{A} : μ >
33 .
We summarize the given data:
The sample size n = 19,
The sample mean X = 35,
The sample standard deviation S = 3.3,
Also, μ_{0} = 33
 The Test Statistics
t =
(x
μ_{0})√n/S
=(35  33)√
19/3.3
= 2.6218
 This is a Right Tail TTest.
The degrees for freedom df = m1 = 19  1 = 18.
pvalue =
P(t < T) =
tcdf(2.6218, 5, 18) =
.0086

One percent level of significance means α = .01.
Since,
pvalue = .0086 is not less than α = .01, we ACCEPT the null hypothesis at 1 percent level of significance.
That means, at one percent level of significance, we do NOT accept
that the mean milage μ is higher than 33 miles .

Since pvalue = .0086, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 1 percent (because .0086 < .01) would be the lowest level at which we would reject the null hypothesis.
pValue demo . The problem may have
changed.
Exercise 8.2.4. It is assumed that the lifetime
(in hours) of light bulbs produced in a factory is normally distributed
with mean μ and standard deviation
σ. The mean lifetime for an average
light bulb on the market is 4500 hours. To estimate μ,
the following data was collected on the lifetime of light bulbs.
5110 
4671 
6441 
3331 
5055 
5270 
5335 
4973 
1837 
5487 
7783 
4560 
6074 
4777 
4707 
5263 
4978 
5418 
5123 
5017 
The producer claims that the mean lifetime
of the bulbs is
more than the average bulbs on the market. Perform a significance test for this claim.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic T.
 Compute the pvalue.
 At the 2 percent level of significance will you reject or accept the null hypothesis (or that the lifetime is higher or not)?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
Here the population standard deviation is not known.
So, the Ttest will be used.

The alternative hypothesis is that the mean lifetime μ of the lamps is higher than 4500 hours:
H_{A}: μ > 4500 . The null and alternative hypotheses are:
H_{0} : μ =
4500
H_{A} : μ >
4500.
Use TI84, as in Lesson 2, summarize the raw data:
The sample size n = 20,
The sample mean X = 5060.5,
The sample standard deviation S = 1143.1106,
Also, μ_{0} = 4500
 The Test Statistics
t =
(x
μ_{0})√n/S
=(5060.5  4500)√
20/1143.1106
= 2.1928
 This is a Right Tail TTest.
The degrees for freedom df = m1 = 20  1 = 19.
pvalue =
P(t < T) =
tcdf(2.1928, 5, 19) =
.0204

Two percent level of significance means α = .02.
Since,
pvalue = .0204 is not less than α = .02, we ACCEPT the null hypothesis at 2 percent level of significance.
That means, at two percent level of significance, we do NOT accept
that the mean lifetime μ is higher than 4500 hours.

Since pvalue = .0204, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 3 percent (because .0204 < .03) would be the lowest level at which we would reject the null hypothesis.
pValue demo .
The problem may have changed.
Exercise 8.2.5. To estimate the mean weight
(in pounds) of salmon in a river, the following sample was collected.
34.7 
33.8 
38.2 
20.3 
27.8 
45.3 
43.1 
37.3 
32.5 
32.3 
31.8 
41.5 
44.5 
29.2 
25.3 
29.6 
39.5 
29.1 
37.3 

It is suspected that, due to polution, the mean weight has reduced from
last year's the mean weight 37 pounds.
Perform a significance test as follows.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic T.
 Compute the pvalue.
 At the 10 percent level of significance will you reject or accept the null hypothesis (or that the mean weight has reduced or not)?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
Here the population standard deviation is not known.
So, the Ttest will be used.

The alternative hypothesis is that the mean weight μ has reduced from 37 pounds:
H_{A}: μ < 37 . The null and alternative hypotheses are:
H_{0} : μ =
37
H_{A} : μ <
37.
Use TI84, as in Lesson 2, summarize the raw data:
The sample size n = 19,
The sample mean X = 34.3737,
The sample standard deviation S = 6.7608,
Also, μ_{0} = 37
 The Test Statistics
t =
(x
μ_{0})√n/S
=(34.3737  37)√
19/6.7608
= 1.6933
 This is a Left Tail TTest.
The degrees for freedom df = m1 = 19  1 = 18.
pvalue =
P(T < t) =
tcdf(5, 1.6933, 18) =
.0538

Ten percent level of significance means α = .10.
Since,
pvalue = .0538 < α = .10, we REJECT the null hypothesis at 10 percent level of significance.
That means, at ten percent level of significance, we accept
that the mean weight μ has reduced from 37 pounds.

Since pvalue = .0538, from this possibilities of .1, .5, 1 ,2, 3, 4, 5, 6, 7,8, 9,10 percent; 6 percent (because .0538 < .06) would be the lowest level at which we would reject the null hypothesis.
Exercise 8.2.6.
It is speculated that the teenage boys in a certain community are under weight. Under normal circumstances the mean weigh of this age group should be 155 pounds. A sample of 27 teenage boys had a mean weight 135 pound and sample standard deviation 32 pounds. Perform a significance test whether the mean weigh μ of this group is below 155 pounds, as follows.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic T.
 Compute the pvalue.
 At the 3 percent level of significance will you reject or accept the null hypothesis (or that the mean weight is lower or not)?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
Exercise 8.2.7.
A guess is that the mean time μ needed for a student to arrive at the class from his/her residence would be less than 30 minutes. To test his guess, a sample 37 was collected. The sample mean time needed was 27 minutes and the sample standard deviation was 9 minutes. Perform a significance test whether the mean time μ needed would be below 30 minutes, as follows.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic T.
 Compute the pvalue.
 At the 3 percent level of significance will you reject or accept the null hypothesis (or that the mean weight is lower or not)?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
8.3 Population Proportion
Let p be the population proportion that has a particular attribute
A. In this section, decision rules would be formulated to
to test the Null hypothesis
H_{0} : p
= p_{0}.
As in section 7.3, a
sample of size m is drawn. Let X be the
number of sample members that has this attribute and X
= X/m be the sample proportion.
(In other words, X is
the sample proportion of "success.") The test statistic to be used is
Z=(Xp_{0})
/σ_{X}
where
σ_{X}
= √[(p_{0}(1p_{0}))
/m].
If H_{0} : p = p_{0}
is true, then Z has approximately N(0,1) distribution. As before,
the decision rules are set as follows:
 Twotail test:
The decision rule for testing the hypotheses
H_{0} : p = p_{0}
H_{A} : p ≠ p_{0}
is set as, at the level of significance α,
Reject H_{0} if z
is not within
[ z_{α/2,}
z_{α/2} ]
where
z = (xp_{0})
/σ_{X}.
Accept H_{0} otherwise.
 Lefttail test:
The decision rule for testing the hypotheses
H_{0} : p = p_{0}
H_{A} : p < p_{0}
is set as, at the level of significance α,
Reject H_{0 }if z < z_{α}
where
z = (xp_{0}) /σ_{X}
Accept H_{0} otherwise.
 Righttail test:
The decision rule for testing the hypotheses
H_{0} : p = p_{0}
H_{A} : p > p_{0}
is set as, at the level of significance α,
Reject H_{0 }if z > z_{α }
where
z = (xp_{0}) /σ_{X}
Accept H_{0} otherwise.
These are known as 1Proportion ZTest
pValue based Decision Rules
With thhe test statistics
Z = (X  p_{0})
/σ_{X}
=
(x p_{0})√m/
√[p_{0}(1p_{0})]
pValues are defined as
 For the twotail test,
p=P(Z ∉[z,z]) =
1  P(z < Z < z) =
1  normalcdf(z, z).
 For the lefttail test,
p=P(Z < z)
= normalcdf(5, z).
 For the righttail test,
p=P(Z > z) =
normalcdf(z, 5).
pvalue based Decision Rules:
For all three 1Proportion ZTests,
the pvalues can be computed as above. Then,
the above decision rules could, equivalently, be written as,
at the level of significance α,
Reject H_{0 }if
p < α
Accept H_{0} otherwise.
Problems on 8.3: 1Proportion ZTest
Exercise 8.3.1. In a sample of 197 apples
from a lot, 26 were found to be sour. The lot will be rejected if
more than 10 percent is sour. Perform a significance test for the acceptability
of this lot.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 3 percent level of significance will you reject or accept the null hypothesis (or whether the lot is acceptable or not)?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
The proportion of sour apples will be denoted by p.
A 1Proportion ZTest will be performed.

The alternate hypothesis is that p is more that .1 (ten percent).
The null and alternative hypotheses are:
H_{0} :
p = .1
H_{A} : p > .1.
We summarize the given data:
The sample size n = 197,
The number of success X = 26,
The sample proportion of success
X = X/n = 26/197 = .1320
Also, p_{0} = .1
 The Test Statistics
Z =
(X  p_{0})√n/
√[p_{0}(1p_{0})]
=
(.1320  .1)√
197/
√[.1(1  .1)]
=
1.4971
 This is a Right Tail Test. So,
pvalue =
P(z < Z) =
normalcdf(z, 5) =
normalcdf(1.4971, 5) = .0672

Three percent level of significance means α = .03.
Since,
pvalue = .0672 is NOT less than α = .03, we accept the null hypothesis at 3 percent level of significance.
That means, at three percent level of significance, we conclude that the lot is acceptable.

In fact, .06 < pvalue = .0296 < .07.
Therefore, from these possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 7 percent would be the lowest level at which we would reject the null hypothesis.
a pValue demo .
The problem may have changed.
Exercise 8.3.2. A new vaccine was tried on
147 randomly selected individuals, and it was determined that 61 of
them got the virus. It is known that usually fifty percent of the population
get the virus. Perform a significance test to decide if this
vaccine is indeed effective or not.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 3 percent level of significance will you reject or accept the null hypothesis (or that the vaccine is effective or not)?
 What would be the lowest level of significance,
among
.1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,
at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
The proportion of the vaccinated population who benefit from it
would be denoted by p.
A 1Proportion ZTest will be performed.

The alternate hypothesis is that p is less that .5 (better than 50 percent).
The null and alternative hypotheses are:
H_{0} :
p = .5
H_{A} : p < .5.
We summarize the given data:
The sample size n = 147,
The number of success X = 61,
The sample proportion of success
X = X/n = 61/147 = .4150
Also, p_{0} = .5
 The Test Statistics
Z =
(X  p_{0})√n/
√[p_{0}(1p_{0})]
=
(.4150  .5)√
147/
√[.5(1  .5)]
=
2.0611
 This is a Left Tail Test. So,
pvalue =
P(Z < z) =
normalcdf(5, z) =
normalcdf(5, 2.0611) = .0196

Three percent level of significance means α = .03.
Since,
pvalue = .0196 < α = .03, we REJECT the null hypothesis at 3 percent level of significance.
That means, at three percent level of significance, we conclude that the vaccine in EFFECTIVE.

In fact, .01 < pvalue = .0196 < .02.
Therefore, from these
possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 2 percent would be the lowest level at which we would reject the null hypothesis.
a pValue Demo . The problem may have changed.
Exercise 8.3.3. Before an election for a
congressional seat, a poll was conducted. Out of 887 randomly selected
voters interviewed, 389 said that they would vote for Candidate A.
The election strategists have decided that, to win Candidate A needs to get more than 40 percent votes.
Perform a significance test whether he/she will get more than 40 percent or not.
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 3 percent level of significance will you reject or accept the null hypothesis (or whether he/she will get more than 40 percent
or not.)?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
Solution by Long Hand Method:
The proportion of the voter population who would vote for the candidate
would be denoted by p.
A 1Proportion ZTest will be performed.

The alternate hypothesis is that p is more that .4 (higher than 40 percent).
The null and alternative hypotheses are:
H_{0} :
p = .4
H_{A} : p > .4.
We summarize the given data:
The sample size n = 887,
The number of success X = 389,
The sample proportion of success
X = X/n = 389/887 = .4386
Also, p_{0} = .4
 The Test Statistics
Z =
(X  p_{0})√n/
√[p_{0}(1p_{0})]
=
(.4386  .4)√
887/
√[.4(1  .4)]
=
2.3466
 This is a Right Tail Test. So,
pvalue =
P(z < Z) =
normalcdf(z, 5) =
normalcdf(2.3466, 5) = .0095

Three percent level of significance means α = .03.
Since,
pvalue = .0095 < α = .03, we REJECT the null hypothesis at 3 percent level of significance.
That means, at three percent level of significance, we conclude that the Candidate A will win.

In fact, .005 < pvalue = .0095 < .01.
Therefore, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 1 percent would be the lowest level at which we would reject the null hypothesis.
a pValue demo. The problem may have changed.
Exercise 8.3.4.
A pollster was asked to make decision whether the proportion p
of the US population who would
support Government shutdown due to budget dispute, would be above 55 percent or not?
A sample 898 were polled and 522 of them said they would support government shutdown.
Perform a significance test whether p would be above 55 percent?
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 3 percent level of significance will you reject or accept the null hypothesis.?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
Exercise 8.3.5.
A telephone company wants to know whether the proportion p of calls that are longer than 20 minutes, in a town, would exceed 65 percent. A sample of 1123 class, 761 were longer than 20 minute. Perform a significance test whether p would be above 65 percent?
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 3 percent level of significance will you reject or accept the null hypothesis.)?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
Exercise 8.3.6.
It is believed that, this year, proportion p of infected oranges will remain below 15 percent. A sample of 1333 class, 175 were were infected. Perform a significance test whether p would remain below 15 percent?
 Formulate the null and alternative hypotheses.
 Compute the value of the test statistic Z.
 Compute the pvalue.
 At the 3 percent level of significance will you reject or accept the null hypothesis?
 What would be the lowest level of significance,
among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?
back to top
