You are on page 1of 39

# HYPOTHESIS TESTING

Z TEST

## HYPOTHESIS TESTING FOR POPULATION

PARMETERS WITH LARGE SAMPLES (>30)

## HYPOTHESIS TESTING FOR

POPULATION PARMETERS
WITH LARGE SAMPLES

## Hypothesis testing involving

large samples (n > 30)is based
on the assumption that the
population from which the
sample is drawn has a normal
distribution
Consequently the sampling
distribution of mean x is also
normal

## HYPOTHESIS TESTING FOR

POPULATION PARMETERS
WITH LARGE SAMPLES

## HYPOTHESIS TESTING FOR LARGE SAMPLE

Let o be the hypothesized value of the
population mean to be tested. For the null
hypothesis the null and alternative
hypothesis for two tailed test are defined as
Ho: = o
H1 : = o
If std deviation of population is known
Test statistic z = (x )/ x = (x )/( /n)

## If population std deviation is not known

Then z = (x- )/(s/n)

## HYPOTHESIS TESTING FOR

POPULATION PARMETERS WITH
LARGE SAMPLES

## Decision Rule based on sample

means for the two tailed test
takes the form
Reject Ho if z(cal) -z(/2) or
z(cal)
z(/2)
Accept Ho if z(/2) < z <
z(/2)
where z(/2) is the table value of
z at a chosen level of

## HYPOTHESIS TESTING FOR

POPULATION PARMETERS WITH
LARGE SAMPLES

## LEFT TAILED TEST

Large sample hypothesis testing
about a population mean for a left
tailed test is of the form
Ho : o and H1 : < o
Test Statistic z = (x )/x = (x )/
( /n)
Decision Rule
Reject Ho if z(cal) -z()

## HYPOTHESIS TESTING FOR

POPULATION PARMETERS WITH
LARGE SAMPLES

## RIGHT TAILED TEST

Large sample hypothesis testing
about a population mean for a
right tailed test is of the form
Ho : o and H1 : > o
Test Statistic z = (x )/x = (x
)/( /n)
Decision Rule
Reject Ho if z(cal) z()

EXAMPLE 1
An ambulance service claims
that it takes on average 8.9
minutes to reach its destination
in emergency calls. To check the
claim the agency which licenses
ambulance services has then
timed on 50 emergency calls,
getting a mean of 9.3 minutes
with a std deviation of 1.8
minutes. Does this constitute
evidence that the figure claimed

EXAMPLE 1-Solution
Let us consider the null
hypothesis Ho that the claim is
same as observed
Ho:=8.9 , H1: = 8.9
Given n=50,x=9.3 ,s=1.8
Z=(x-) /sx = x-/(s/n) =
(9.3-8.9)/(1.8/
50)=1.574
Since z(cal) is less than critical
value z(/2)= 2.58 the null

Example 2
A hospital uses large quantities of
packaged doses of a particular drug.
The individual dose of this drug is
100 cc. The action of this drug is
such that body will harmlessly pass
off excessive doses. On other hand
insufficient doses do not produce
desired medical effect. The hospital
has purchase the drug from the same
manufacturer for years and

Example 2
The hospital inspects 50 doses of this
drug at random and finds a mean of
99.75 cc
If a hospital sets a significance level
of 0.10 and asks whether the dosage
is too low how can we find this.

Example 2 - Solution
To begin we can state this problem as
Ho:o = 100: H1 : 1 = 100
The hospital wishes to know
whether actual dosage are 100cc or
whether in fact the dosage are too
small
A better way would be
Ho: o 100 , H1 : 1 < 100
Z=(x-) /x = 99.75 100 / 2 50 = - 0.88

Example 2 - Solution
The critical value of z is -1.28 and
therefore we accept null hypothesis

EXAMPLE 3
A packaging device is set to fill detergent
powder packets with a mean weight of 5 kg,
with a standard deviation of 0.21 kg. The
weight of packets can be assumed to be
normally distributed.
The weight of packets is known to drift
upwards over a period of time due to
machine fault which is not tolerable. A
sample of 100 packets is taken and
weighed. This sample has a mean weight of
5.03 kg. can we conclude that the mean
weight produced by the machine has
increased? Use a 5 % level of significance

EXAMPLE 3-Solution
Let null hypothesis Ho that mean weight has
increased
Ho : 5 and H1 : < 5
Given n=100, x=5.03 kg, =0.21, = 5%
Z= (x- ) / (/n) = 5.03-5 /(0.21/100) =
1.428
Since calculated value z(cal) = 1.428 is less
than its critical value z() =1.645 at =
0.05, the null hypothesis Ho is accepted
Hence we conclude that mean weight is
likely to be more than 5 kg

## HYPOTHESIS TESTING FOR

POPULATION PARMETERS
WITH LARGE SAMPLES

## HYPOTHESIS TESTING FOR

DIFFERENCE BETWEEN TWO
POPULATION MEANS
Idea is to test whether there is
significant difference between
the means of these populations
Let 1 and 2 be mean of two
population
1 and 2 be std deviation of two
population

## HYPOTHESIS TESTING FOR

POPULATION PARMETERS WITH
LARGE SAMPLES

## Z statistic = [(x1-x2) (1-2)]/ x1 x2

= [(x1-x2) (1-2)]/ (/n1 +
/n2)
The null and alternate hypothesis are stated
as Null hypothesis
Null Hypothesis Ho : 1 2 = do ( do is
specified difference)
Two tailed test
One tailed test
Alternate
hypothesis
Ho:
(1 2)
= do Ho : 1-2 0
where do is the
(1 2) > do
specified
H0 : 1 -2 0
difference that is (1 2) < do
desired to be

H1 :
H1 :

## HYPOTHESIS TESTING FOR

POPULATION PARMETERS WITH
LARGE SAMPLES

Decision Rule
Reject Ho at a specified level of
significance
when
tailed
Tailed Test
Two
One
test
Z(cal)>z(/2)
or
z(cal) <z(/2)

do

## [or when z<-z() when H1=(12) < do] deviation 1 and

[note : if standard

## 2 are not known then we estimate

standard error by substituting the
sample deviations s1 and s2 as

EXAMPLE 4
A firm believes that the tyres produced
by process A on an average last longer
than tyres produced by process B. To
test this belief, random supplies of
tyres produced by the two processes
were tested and the result are
Proce
ss

Sample size

Average
lifetime(k
m)

Standard
deviation(
km)

50

22400

1000

50

21800

1000

## Is there evidence at a 5 % level of

significance that the firm is correct in
its belief?

EXAMPLE 4-Solution
Let us take the null hypothesis that
there is no significant difference in the
average life of tyres produced by
processes A and B
Ho : 1=2 or 1-2 = 0
H1 : 1=2
Given x1 = 22400, x2 =21800
1 =2=1000, n1=n2=50
Z= [(x1-x2) (1-2)]/ x1 x2
= [(x1-x2) (1-2)]/( /n1 + /n2 )

EXAMPLE 4-Solution
= 22400 21800 / ((1000)/50 +
(1000)/50)
= 600/ ( 20000+20000)
= 600/200=3
Since the calculated value z(cal )=3 is
more than its critical value z (/2) =
1.645 at
= 0.5 level of
significance therefore Ho is rejected
Hence we conclude that the tyre produced
by process A last longer than that of B

## HYPOTHESIS TESTING FOR SINGLE

POPULATION PROPORTION

## HYPOTHESIS TESTING FOR SINGLE

POPULATION PROPORTION
p=No of successes in sample/sample
size=x/n
po: The value of the above statistic is
compared with hypothesized
population proportion po to arrive at a
conclusion
The three forms of null hypothesis
and alternative hypothesis pertaining
Null Hypothesis
Hypothesis
to the hypothesizedAlternative
population
Ho: p = po
p = po ( two tailed
proportion p are as H1:
follows
test)
Ho :p po

test)

## HYPOTHESIS TESTING FOR SINGLE

POPULATION PROPORTION
Test statistic z = p-po/p
= p-po /po(1po)/n
Decision Rule: Reject Ho when

## One tailed test

Two tailed test
Z(cal) > z() (when H1: p Z (cal) > z(/2)
> po)
or
or
Z (cal) < - z(/2)
Z(cal) < - z() (When
H1 :p< po)

EXAMPLE 5
An auditor claims that 10% of
customers ledger accounts are
carrying mistakes of posting and
balancing. A random sample of
600 was taken to test the
accuracy of posting and
balancing and 45 mistakes were
found .Are these samples results
consistent with the claim of the
auditor? Use 5% level of

EXAMPLE 5 -Solution
Let us take the claim of auditor
is valid
Ho: p=0.10 H1 : p= 0.10 (two
tailed test)
Given p=45/600 =0.075,
n=600 ,=5%
Z=p-po/p = 0.075 -0.10 /
(0.10x0.90/600)
= - 2.049
Since z(cal) is less than critical

Example 6
A manufacturer claims that at
least 95% of the equipments
which he supplied to a factory
conformed to specifications. An
examination of sample of 200
pieces of equipment revealed
that 18 were faulty. Test the
claim of the manufacturer
Given critical value z()= -1.645
at 5% level of significance

Example 6 - Solution
Let us take null hypothesis that at
least 95 % of equipment supplied
conformed to specification
Ho: po 0.95 H1 :po< 0.95(left
tailed test)
Given p = 1-(18/200) = 0.91, n=
200, = 0.05
Z=p-po/p = 0.910.95/(0.95x0.05)/200 = -2.67
Since z(cal) is less than critical

## HYPOTHESIS TESTING FOR DIFFERENCE

BETWEEN TWO POPULATION PROPORTIONS

## HYPOTHESIS TESTING FOR

DIFFERENCE BETWEEN TWO
POPULATION PROPORTIONS

## Let two independent populations each having

proportion and standard deviation of an
attribute be as follows
Populatio Proportion Standard
n
Deviation
1
p1
p1
2
p2
p2
The hypothesis testing concepts developed can
be extended to test whether there is any
difference between the proportions of these
populations. The null hypothesis that there is no
difference between two proportions is stated as

## HYPOTHESIS TESTING FOR

DIFFERENCE BETWEEN TWO
POPULATION PROPORTIONS
Ho : p1=p2 or p1-p2 =0

H1 : p1 = p2
H1 : p1 > p2
H1 : p1 < p2

## The sampling distribution of difference in

sample proportions p1-p2 is based on the
assumption that the difference between
two population proportions p1-p2 is
normally distributed.
The standard error of p1-p2 is given by
p1-p2=p1(1-p1)/n1 + p2(1-p2)/n2
[q1=1-p1, q2=1-p2]

## HYPOTHESIS TESTING FOR

DIFFERENCE BETWEEN TWO
POPULATION PROPORTIONS
The z statistic is
Z=(p1-p2) (p1-p2) / p1-p2
= (p1-p2/p1-p2)
Invariably the standard error p1-p2 is not
known. Thus when a null hypothesis states
there is no difference between the
population proportion we combine
proportions p1 and p2 to get one unbiased
estimate of population proportion
p = n1p1 +n2p2/ (n1 + n2)
Z= p1-p2/sp1-p2
[ sp1-p2 = p(1-p) {1/n1+1/n2}

Example 8

## A company is considering two different TV

advertisement for promotion of new product.
Management believes that advertisement A is
more effective than advertisement B. Two test
market areas with virtually identical consumer
characteristics are selected.
Ad A is used in one area and Ad B is used in
other area. In a random sample of 60
customers who saw advertisement A , 18 had
tried the product. In random sample of 100
customers who saw ad B ,22 tried the product.
Does this indicate ad A is more effective than
Ad B if a 5% level of significance is used
Given critical value z()= 1.645 at 5%
significance

Example 8-Solution
Let us take null hypothesis both
Ad are equal
Ho: p1=p2 H1 : p1 > p2 (right
tailed test)
Given n1=60, p1=18/60=0.30, n2=
100, p2=22/100= 0.22, =0.05
Z= p1-p2/sp1-p2
Sp1-p2=p(1-p)[1/n1+1/n2]
= 0.25x0.75(1/60+1/100) =
0.707

Example 8-Solution
Substituting value in z test
statistic
z= 0.30- 0.22/0.0707 =
0.08/0.0707 =1.131
Since z(cal) is less than critical
value z()= 1.645 , Ho is accepted

Example 9
In a simple random sample of
600 men taken from a big city
400 are found to be smokers. In
another random sample of 900
men taken from another city are
450 smokers. Do the data
indicate that there is a
significant difference in habit of
smoking in the two cities?

Example 9 - Solution
Let us take the null hypothesis
that there is no significant
difference in the habit of
smoking in two cities
Ho: p1=p2 H1 : p1 = p2 (two
tailed test)
Given n1=600,
p1=400/600=0.667, n2= 900,
p2=450/900=0.50, =0.05
Z= p1-p2/sp1-p2

Example 9-Solution
[p=n1p1+n2p2/n1+n2
=600(400/600) +
900(450+900)/ (600+900)
=450 +450 /1500 =
850/1500=0.567 ]
Z= 0.667-0.500/0.026 = 0.167/0.026
=6.423
Since z(cal) =6.423 is greater than z
(/2) =2.58 at /2=0.025 Ho is rejected.
Hence we conclude there oi no
significant difference in habit of