Hypothesis Testing (S-5)
Hypothesis Testing (S-5)
Large Z= 0 Large
Negative Z Z-Values Positive Z
Close to Zero
P-Value : The process compares the probability called the p-value with
the significance level, then Ho is rejected. If it is larger than the
significance level, then Ho is not reject the P-value is the lowest
2
Some Formula
1. For one mean: sample is large or small and - is known, also
population are normally distributed.
x
sample statistic Z
| n
x
2. is not known t
s n
(b) - is unknown, z
x x M
1 2 1 M2
2 2
s1 s
2
n1 n 2
Test of Hypothesis
Simple and composite hypothesis:
If the statistical hypothesis specifies the population completely then it is
called simple hypothesis, otherwise it called a composite statistical
hypothesis.
e.g: x1, x2......., xn be a random sample of size n from a normal
population with mean and variance 2, then the hypothesis
Ho : o, 2 0
2
is a simple hypothesis. On the other hand ...
0 , 2 0 2 is composite hypothesis.
A hypothesis which does not specify completely ‘r’ parameters of
population then it is called composite hypothesis with r degrees of
freedom.
Given the frequency function :
4
1
:0 x
f x.0
0 ; otherwise
and that you are testing the hypothesis Ho: 1.5 against =2.5 by means
of single observation value (observed value) of x, what would be the
sizes of the type- I and type- II errors. If you chose the interval 0.8 x as
the critical region? Also obtain the power function of the test.
* Neyman- person Lemma:
Let k> 0, be a constant and w be a critical region of size such that
f x, 1
W x s : k
f x, o
L1
w= x s : k 1
L0
L1
and w = x s : k 2
L0
Where Lo and L1 are the likelihood functions of the sample observations
x x1 , x2 ....... xn under Ho and H1 respectively. Then w is the most power
ful critical region of the test hypothesis Ho : 0 against the alternative
H 1 ; 1
W1
W
A C B
Lo dx Lo dx
B C AUC
Lo dx Lo dx
B A
Lo dx Lo dx (7)
A B
= L1dx k Lo dx
w w
6
= 1 1 1
Hence proved the lemma
and that you are testing the null hypothesis Ho: 1 against H1: 2, by
means of single observed value of x. what would be the sizes of the
type- I and type- II errors, if you choose the interval (i) 0 .5 x (ii) 1 x 1.5
as the critical regions? Also obtain the power function of the lest.
Ans: Here we want to test
H o : 1 against H 1 : 2
and W x : x 0.5
= P0.5 x | 1
= P0.5 x 1| 1
1
= [ f x, 1 dx
0.5
1
= 1.dx 0.5
0.5
7
Similarly
P x w | H 1
= Px 0.5| 2
0.5
= [ f x. ] 2 dx
0
0.5
1
= dx
0 2
1
= 0 .5
2
= 0.25
Thus the sizes of type-I and type- II errors are respectively
0.5, 0.25
(ii) w= x : 1 x 1.5
Px W | o 1
1.5
= f x1 1 dx 0
1
P x w | 2
= 1 p x w | 2
1.5
= 1 [ f ( x, )] 2 dx
1.5
1.5
= 1 .5 dx
1
= 1 1 x1.5
2
= 1 1 x1.51
2
= 1 1 x.5
2
= 1- 0.25
= 0.75
Hence power function = 1 1 0.75 0.25
8
and W x : x 1
Also Ho : 2
Ho : 2
= Px 1| 2
= f x1 2 dx
1
= 2 e 2 x dx
1
e 2 x
= 2
2
= e 2
1
=
e2
P x w H 1 P x 1 | 1
e 1
1
1
2 e 2 x dx e x 0
1
1 e 1 1 =
0 e e
P-1 : Let us consider x 50.58 , S= 1.65 . Find for 51, n 40
Ans: Given that x 50.58
S= 1.65
51
n= 40.
The Probability of type II error P ( H o accept | Ho False)
= P (Ho accept | H1 true)
9
= P x 50.43| 51
x 51 50.43 51
= P
1 . 65 | 40 1 . 65 / 40
= Pz 2.18
= 0.0146
Power of test 1 1 0.0146 0.9854 for H 1 : 51
P-2 : The average weight and s.d of detergent packet of a detergent production
company is 500 gm and 4 gm respectively. A government agency receives many
consumer complains that each packet contains less than 500 gm. To check the
consumers complain at the 5% level of signification, the government agency bags
100 packets of this detergent and find that mean weight 498.5 gm. should the
government agency order the company to puck more detergent in its packets.
Ans: Here 500, 4, x 498.5, n 100
H o : 500
H 1 : 500
0.05
Z 0.005 1.64
x o
Z
| n
498.5 500
=
4 100
= -3.75
Since Z < 2005
Hence Ho rejected. Therefore we conclude that the average weight of each packet
less that 500 gm. Hence government agency will be ordered the company to put
more detergent in its packets.
P-3: The s.d of the weight of 100 gm bread made by a certain bakery is 1 gm. On a
certain day the owner claims that the production is out of control. To check
whether its production is under control, employees select a random sample of 25
10
breads and find that there mean weight is 99.5 gm. Test the claim of the owner at
5% and 1% level of significance. Also compute the P-value.
Ans: Let the weight of bread is
1, x 99.5 gm n= 25
H o : 100
H 1 : 100
0.05
Since it is too-taid test
Z 0.025 = -1.96, Z 0.0975 = 1.96
x o
Test Statistic, Z N 0.1
/ n
99.5 100
1
25
0 .5
1
5
= 2.5
Since Z < z0.025, hence Ho rejected at 5% level of significance.
Therefore the average weight of bread is less that 100 gram
At 1% level of significance z.005 = -2.575 and z.995 = 2.575
Since z > z0.005
Hence Ho accepted at 1% level of significance.
P-Value: probability of test statistic below – 2.5 = 0.0062
probability of test statistic above – 2.5 = 0.0062
In two tail test p-value > 0.0062+ 0.0062 = 0.0124
Since, p-value > 0.01 i.e p-value < 0.05
Thus at 5% level of significance Ho: = 100 rejected and H1 : 100 accepted
The production is out of control of that day.
P-4: A medical doctor sensed that the patients with lung cancer in the age groups
40-45 had smoked average more than 20 years. A sample of 20 patients gave the
following years of smoking.
11
22.0 21.3 19.6 19.6 21.4 24.0 25.9 19.7 25.5 25.1
22.2 21.5 19.8 22.5 24.5 20.5 19.8 25.0 23.8 25.7
using a 1% level of significance is their sufficient evidence to justify the doctor is
belief?
Ans Ho : 20
H1 : 20
0.01
At 0.01 t0.01 = 2.539 with n-1 = 19 degree of freedom
x 22.47
n 20
20
S 2.28
x o 22.47 20 2.47
t 4.84
s | n 2.28 / 20 0.0703
Since t t 0.01
Ho rejected
Therefore conclude that lung cancer patients in the age group 40-45 had
smoked on average more than 20 years.
* Illustrate how to draw random sample of 5 bags of rice from the 10,000
shipload.
Ans:
Method : All the nice bags are first serially numbered from 1 to 10.00. Each of
these numbers are then written on 10,000 small identical cards. The cards are
placed inside a box and 5 amongst them are chosen as in the lottery. The bags
bearing the numbers corresponding to those on the drawn cards then comprising
our random from the whole lot.
Construction of a sample 5 bags
Note : Given an extract from one of these two- digit series.
43 10 53 74 35 08 90 61 18 37 44 10
50 32 40 43 62 23 50 05 10 03 22 11
51 94 05 17 58 53 78 80 59 01 94 32
13 99 75 53 08 70 94 25 12 58 41 54
The 10000 bags of nice of the ship are nubered 1,2, .........99, 100, 101, ..... 999,
1000, .....9998, 9999, 10000 From a page of random numbers we now select any
row and column and take 5 four-digit figures successively as they occur. Thus if
we start from the digit in the first and first column of the above series in random
number and move horizontally. Our selected numbers will be 4310, 5374, 3508,
9061, 1837
Hence the sample of 5 bags rice construct by the bags numbered by 4310, 5374,
3508, 9061, 1837.