You are on page 1of 53

TEST OF HYPOTHESIS

TEST OF HYPOTHESIS
There are many problems in which, rather then estimating the
value of a parameter, we need to decide whether to accept or
reject statement about the parameter. This statement is called
hypothesis and the decision making procedure about the
hypothesis is called Hypothesis-Testing. For e.g.
a) The teaching method in both the institutes are effective
b) The average IQ of normal human being is 113

Statistical Hypotheses
A verbal statement or claim ,about a population
parameter is called a Statistical Hypotheses To Test a
population Parameter we state a pair of Hypotheses:-

a) NULL HYPOTHESES
b) ALTERNATE HYPOTHESES

CONTD..
Null Hypotheses H0:It is a statistical hypotheses that contains a statement of
Equality such as :- , or
, , .

Alternate Hypotheses H1 :It is the complement of the null hypotheses. It is a


statement that must be true if H0 is false and it
contains a
statement of inequality ,such as

>,< or

CONTD..
e.g1.......H 0 : k
.............H1 : k
e.g 2......H 0 : k
.............H1 : k

(Stating

PROBLEM1
the Null and Alternate Hypotheses)

Write the claim as a mathematical sentence .State the


null and alternate hypotheses, and identify which
represents the claim.
a)

A university publicizes that proportion of its students


who graduate in 4 years is 82%.

b)A cereal company advertises that the mean weight of the


contents of its 20 ounce size cereal boxes is more than
20 ounces.

Solution
a) The claim the proportion.82% can be written
as p = 0.82 contains the statement of equality ,it
becomes the null hypotheses.
H0: p = 0.82(claim)
H1: p 0.82
bThe claim the mean..than 20 ouncescan be
written as > 20.Its complement is 20.
because 20. contains the statement of
equality it becomes null hypotheses

Thus

H 0 : 20ounces
H1 : 20ounces (claim )

Note:- When we perform a hypotheses


testing
we make one of the two decisions:
i) Reject the null hypotheses or
ii) Accept the null hypotheses
since our decision is based on the sample
rather than the entire population there is
always possibility we will make wrong
decision.

TYPES OF ERROR AND


LEVEL OF SIGNIFICANCE
In testing a statistical hypotheses ,we will encounter
Typical Situations These typical situations give rise
to two types of error.. :
Accept H

Reject H

H is true

Correct decision

Type I error

H is false

Type II error

Correct decision

i) Type I error:-we may reject a hypotheses H when H is


true..
ii) Type II error:- we may accept a hypotheses when H is
false.

PROBLEM 2
(Identifying TypeI and TypeII error)
The USDA limit for salmonella
contamination for chicken is 20%. A meat
inspector reports that the chicken produced
by a company exceeds the USDA limit.You
perform a hypotheses test to determine
whether meat inspectors claim is true.When
will type I or type II error occur?

Solution
Let p represent the proportion of the chicken that is
contaminated. The meat inspectors claim is more than 20%
is contaminated . Null and alternate hypotheses is as follows.
H0:
H1:

p
0.2
p > 0.2 (claim)

Type I error will occur if the actual proportion of


contaminated chicken is less than or equal to 0.2,but we decide
to reject H0.
Type II error will occur if the actual proportion of
contaminated chicken is greater than 0.2 ,but we accept H0.

LEVEL OF SIGNIFICANCE
The probability of committing Type I error is called level of
significance and is denoted by Greek letter alpha

e.g. 5%(or 0.05) level of significance is chosen in designing


a test of hypotheses
There are 5 chances in 100 that we would reject the hypotheses when
it should be accepted.
or We are about 95 % confident that we have made the right decision
or We could be wrong with Probability 0.05.

Definition:
Probability of committing Type II error is
denoted by Greek letter
Definition (POWER)
The probability that null hypotheses will be
rejected when ,alternate hypotheses is true
is called Power of the test. Thus
Power + = 1

Critical Region
A crical region in the sample space which
amount to rejection of H0 is termed as critical
region or region of rejection.Then

P( X w H 0 )
P( X w H1 )
where w , the complementaryset of is
called the acceptance region

Problem 3
A process for making steel pipe is under control if the
diameter of the pipe has a mean of 3.0000 inches with a
standard deviation of 0.0250 inch. To check whether the
process is under control, a random sample of size n = 30 is
taken each day and the null hypothesis = 3.0000 is
rejected if X is less than 2.9960 or greater than 3.0040. Find
(a) The probability of a Type I error
(b) The probability of a Type II error when = 3.0050
inches.

Solution: n = 30, = 3.0000, = 0.0250


(a ) P (T ypeI error) P ( X 2.9960or X 3.0040)
P( X 2.9960) P ( X 3.0040)
P

3.0040 3.0000

0.0250/ 30

/
n
0
.
0250
/
30

P Z 0.876 1 P ( Z 0.876)
since

/ n

2.9960 3.0000

will be random variable with approximately

/ n
st andardnormaldistribution.
F (0.876) 1 F (0.876) 2 F (0.876) 0.381

(b) P (T ypeII error) P (2.9960 X 3.0040) ( when 3.0050)


P

2.9960 3.0050

0.0250/ 30

P(1.97 Z .219)
since

/ n

3.0040 3.0050
0.0250/ 30

will be random variable wit h approximately

/ n
st andardnormaldist ribut ion.

F (.219) F (1.97)
0.4133 0.0244 0.3889

Problem 4
Suppose that for a given population with = 8.4 in2 we want
to test the null hypothesis = 80.0 in2 against the alternative
hypothesis < 80.0 in2 on the basis of a random sample of
size n = 100.
(a) If the null hypothesis is rejected for X < 78.0 in 2 and
otherwise it is accepted, what is the probability of a Type
I error?
(b) What is the answer to part (a) if the null hypothesis is
80.0 in2 instead of = 80.0 in2 ?

Solution: Given = 8.4 n = 100, H0 : = 80, H1 : < 80


= P (Type I error) P( X 78)

78 80
P

/ n 8.4 / 100

P( Z 2.38) (since n is large)


F (2.38) 0.0087
(b) If null hypothesis is 80, then for this composite null
hypothesis 0.0087 is maximum for all values of the
null hypothesis which we get when = 80 hence
probability of a Type I error will be at most 0.0087 i.e.
0.0087

The errors and their probabilities


Type I error: Rejection of H0 when H0 is true.
Type II error: Non-rejection of H0 when H1 is true.
= probability of making a Type I error (also called the level
of significance)
= probability of making a Type II error

Five steps of hypothesis


testing
We formulate a null hypothesis and an appropriate
alternative hypothesis which we accept when the null
hypothesis must be rejected.
We specify the probability of a type I error; if possible,
desired or necessary we may also specify the probabilities
of Type II errors for particular alternatives.
Based on the sampling distribution of an appropriate
statistic, we construct a criterion for testing the null
hypothesis against the given alternative.
We calculate from the data the value of the statistic on
which the decision is to be based.
We decide whether to reject the null hypothesis or
whether to fail to reject it.

Test of Hypotheses
To illustrate the general concepts involved in deciding
whether or not a statement about the population is true or
false, suppose that a consumer protection agency wants to
test a paint manufacturers claim that the average drying time
of his new fast-drying paint is 20 minutes. It instructs a
member of its research staff to take 36 boards and paint them
with paint from 36 different 1-gallon cans of the paint, with
intention of rejecting the claim if the mean drying times
exceeds 20.75 minutes otherwise, it will accept the claim and
in either case it will take whatever action is called for in its
plans.

This provides a clear-cut criterion for accepting or rejecting the


claim, but unfortunately it is not infallible. Since the decision is
based on a sample, there is the possibility that the sample mean may
exceeds 20.75 minutes even though the true mean drying time is =
20 minutes and there is also possibility that the sample mean may be
20.75 minutes or less even though the true mean drying time is, say,
= 21 minutes.
Thus before adopting the criterion, it would seem wise to investigate
the chances that the criterion may lead to a wrong decision.
Assuming that it is known from past experience that =2.4 minutes,
let us first investigate the probability that the sample mean may
exceeds 20.75 minutes even though the true mean drying time is
= 20. Assuming the population is large enough to be treated as an
infinite.

Test of Hypotheses
(contd)

X 20.75 20

P( X 20.75) P

2.4 / 36
/ n
P( Z 1.875) 1 F (1.875)
1 0.9696 0.0304

Hence the probability of erroneously reject the hypothesis = 20 minutes is


approximately 0.0304.

0.0304

Figure: Probability of falsely


rejecting claim

x Minutes
= 20
20.75
Accept the claim Reject the claim
that = 20
that = 20

Test of Hypotheses
(contd)
Consider the other possibility where the procedure fails to detect that
> 20 minutes. Suppose that true mean drying time is = 21 minutes
so calculate the probability of getting a sample mean less than or equal
to 20.75 minutes and hence erroneously accepting the claim that
= 20 minutes.

X 20.75 21

P ( X 20.75) P

/ n 2.4 / 36
P ( Z 0.625) F (0.625)
0.2660
0.2660

Figure: Probability of failing


to reject claim

x Minutes

20.75
= 21
Accept the claim Reject the claim
that = 20
that = 20

Test of Hypotheses (contd)


In the above example we showed that for the
given test criterion = 0.03 and = 0.27 when
= 21 minutes.
In calculating the probability of a type II error in
our example we arbitrarily chose the alternative
value = 21 minutes. However, in this problem as
in most others, there are infinitely many other
alternatives, and for each one of them there is a
positive probability of erroneously accepting
the hypothesis H.

Definition :CRITICAL VALUE(or Significant value)


It is the value of the test statistic ,which
divides the area under the probability curve
into critical region and acceptance region, for
given level of significance.

ONE TAILED TEST AND


TWO TAILED TEST
i)

Right One Tailed Test :


When H1 is of the greater than type
i.e > 0 ,then complete critical
region
of area lies on the right side tail of
the
probability density curve

Problem 5
Suppose that for a given population with = 8.4 in2 we want
to test the null hypothesis = 80.0 in2 against the alternative
hypothesis > 80.0 in2 on the basis of a random sample of
size n = 100.
(a) If the null hypothesis is rejected for X >82.0 in 2 and
otherwise it is accepted, what is the probability of a Type
I error?

P (typeIerror )
P( X 82)

X-

82 80
P

8
.
4

n
100

P(Z 2.38)
1 - P( Z 2.38)
1 - F(2.38)
1 - .9913
0.0087

Two Tailed Test


When H1 is of not eqnal s type- i.e
0
, then the total critical region lies on
both sides of the right and left tails of the curve
such that ctitical region of area /2 lies on the
right tail and critical region of area /2 lies on
the left tail

Problem 6
A process for making steel pipe is under control if the
diameter of the pipe has a mean of 3.0000 inches with a
standard deviation of 0.0250 inch. To check whether the
process is under control, a random sample of size n = 30 is
taken each day and the null hypothesis = 3.0000 is
rejected if X is less than 2.9960 or greater than 3.0040. Find
(a) The probability of a Type I error

Solution: n = 30, = 3.0000, = 0.0250


(a ) P (T ypeI error) P ( X 2.9960or X 3.0040)
P( X 2.9960) P ( X 3.0040)
P

3.0040 3.0000

0.0250/ 30

/
n
0
.
0250
/
30

P Z 0.876 1 P ( Z 0.876)
since

/ n

2.9960 3.0000

will be random variable with approximately

/ n
st andardnormaldistribution.
F (0.876) 1 F (0.876) 2 F (0.876) 0.381

Left one Tailed Test


When H1 is of less than type i.e <0,then
total critical region of area lies on the Left
side tail of the curve

Problem 7
Suppose that for a given population with = 8.4 in2 we want
to test the null hypothesis = 80.0 in2 against the alternative
hypothesis < 80.0 in2 on the basis of a random sample of
size n = 100.
(a) If the null hypothesis is rejected for X < 78.0 in 2 and
otherwise it is accepted, what is the probability of a Type
I error?

Solution: Given = 8.4 n = 100, H0 : =


80, H1 : < 80
= P (Type I error)
P( X 78)
X

78 80
P

/ n 8.4 / 100

(since n is large)
P( Z 2.38)
F (2.38) 0.0087

Sampling Distribution of Mean


When known
If sample is large (n 25) then sample
mean is a random variable with
approximately
normal
distribution,
regardless of the form of the population
distribution.
If the random samples come from a normal
population, the sampling distribution of the
mean is normal regardless of the size of the
sample.

When unknown
If a small (n < 30) random sample is
coming from the normal population then
X
S/ n
is a random variable with t-distribution with
= n 1 degree of freedom.
The standard normal distribution provides a
good approximation to the t distribution for
samples of size 30 or more.

Hypotheses Concerning One


Mean
Statistic for test concerning mean known

X 0
Z
/ n

If z is such that the area under the standard normal curve to


its right equals , the critical regions, namely, the sets of
values of Z for which we reject the null hypothesis = 0,
can be expressed as it following table:

Critical Regions for Testing = 0


(Normal population and known)

Alternative
hypothesis

Reject null
hypothesis if:

< 0

Z < - z

>0

Z > z

Z < - z/2 or
Z > z/2

Hypotheses Concerning One Mean (contd)


Example: According to the norms established for mechanical
aptitude test, persons who are 18 years old should average
73.2 with a standard deviation of 8.6. If 45 randomly
selected persons of that age averaged 76.7, test the null
hypothesis = 73.2 against the alternative hypothesis >
73.2 at the 0.01 level of significance.
Solution: Given 0 = 73.2
1. Null hypothesis H0: = 73.2
Alternative hypothesis H1: > 73.2
2. Level of significance: = 0.01
3. Criterion: Using a normal approximation for the
distribution of the sample mean we reject the null
X 0
hypothesis when Z > z = 2.33 where
Z
.
/ n

Hypotheses Concerning One Mean (contd)


4 Calculations: Given 0 = 73.2, = 8.6, n =
45 and x 76.7
Z

76.7 73.2
8.6 / 45

2.73

5. Decision: Since Z = 2.73 > 2.33, the null


hypothesis that = 73.2 is rejected at the
0.01 level of significance.

Hypotheses Concerning One Mean (contd)


Statistic for large sample test concerning mean

unknown

X 0
Z
S/ n

Critical Regions for Testing = 0


(large sample and unknown)

Alternative
hypothesis

Reject null
hypothesis if:

< 0

Z < - z

>0

Z > z

Z < - z/2 or
Z > z/2

Hypotheses Concerning One Mean


(contd)
Statistic for small sample test concerning mean NORMAL
POPULATION

X 0
t
S/ n

Critical Regions for Testing = 0


(Normal population and unknown)
One sample t-test

Alternative
hypothesis

Reject null
hypothesis if:

< 0

t < - t

>0

t > t

t < -t/2
or t > t/2

t and t/2 are based on n 1 degrees


of freedom

Hypotheses Concerning One Mean


(contd)
Example: Test run with 6 models of an experimental engine
showed that they operated for 24, 28, 21, 23, 32 and 22
minutes with a gallon of a certain kind of fuel. If the
probability of Type I error is to be at most 0.01, is this
evidence against a hypothesis that on the average this kind
of engine will operate for at least 29 minutes per gallon
with this kind of fuel? Assume normality.
Solution: Given n = 6, x1 = 24, x2 = 28, x3 = 21, x4 = 23, x5 =
32, x6 = 22.

x 25 and s 4.195

Hypotheses Concerning One Mean


(contd)
1.
2.
3.

Null hypothesis H0: 29


Alternative hypothesis H1: < 29
Level of significance: 0.01
Criterion: Since the probability of a Type I error is
greatest when = 29 minutes, we proceed as if we were
testing the null hypothesis = 29 minutes against the
alternative hypothesis < 29 minutes at the 0.01 level of
significance.
Assuming the population is normal we can use the
statistics
X 0

S/ n

Hypotheses Concerning One Mean


(contd)
Since the alternative hypothesis is one sided the critical
region (set of values of t for which we can reject null
hypothesis) is defined by t < - t0.01 where t0.01 with 5 degree
of freedom is 3.365.
4. Calculations: Given 0 = 29, s = 4.195, n = 6 and x 25
25 29
t
2.336.
4.195 / 6
5. Decision: Because 2.336 > -3.365, we cannot reject the
null hypothesis at the 0.01 level of significance.

Significance Testing
P-Value Approach:
The P- value is the smallest level of significance
that would lead to rejection of the null hypotheses
H0 If Z is the computed value of the test statistic ,
then the P-value is

SIGNIFICANCE TESTING Contd

i) If H0: = 0, H1: 0
P= 2(1-F(|Z|))
ii) if H0: = 0, H1: > 0
P= 1-F(Z)
iii) if H0 : = 0, H1 : < 0
P= F(Z)

Significance testing contd..

P-DECISION RULE BASED ON P-VALUE


1) if P ,then reject H0.
2) if P > , then fail to reject H0.

PROBLEM 8
Suppose that we want to test on the basis of n = 35
determinants and at the 0.05 level of significance
whether the thermal conductivity of a certain kind
of cement brick is 0.340, as has been claimed.
From information gathered in similar studies, we
can expect the variability of such determination is
given by = 0.010and suppose that the mean of
35 determination is 0.343

Solution
Hypotheses test method
1. H0: = 0.340
H1: 0.340
2 = 0.05
3 Criterion: Reject the null hypotheses if
Z< -1.96 or Z>1.96
where

X 0

4. Calculation:
Z=1.77
5 Decision since Z=1.77<1.96, H0 cant be
rejected
P- value approach
P=2(1-F(1.77))=0.0768
Since P >=0.05 H0 cant be rejected, agreeing
with our earlier result.

You might also like