0% found this document useful (0 votes)
80 views15 pages

Hypothesis Test

Download as doc, pdf, or txt
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 15

Hypothesis Test

Note :
(1) Using the P-value approach,
We reject
0
H
if
value p
In this case the p-value does not provide much support
to accept the null hypothesis.
(2) Using the interval estimate for


n
z x

2
t
The quantity
n
z

2
is the margin of error.
Let

n
z E

2
the desired margin of error, then

E
z n

.
we obtain the following expression for the sample size

2
2
2
2
E
z
n


,
_


EXAMPLE(1): Let
0.05 2, E , 65 . 9
5 Find the
sample size.
1
Solution: at
96 . 1 z 0.05
2


The sample size =
( ) ( )
4 . 89
2
65 . 9 96 . 1
2
2 2
2
2
2
2

,
_

E
z

Then, the sample size = 90.


Statistical Inference about means and
proportions with two populations:
Notations:
Population(1) Population(2)
2
Population mean
1

Population
variance
2
1

2
2

Population size
1
N
2
N
Sample mean
1
X
2
X
Sample variance
2
1
S
2
2
S
Sample size
1
n
2
n
Population
proportion
1
p
2
p
Sample
proportion
1
p
2
p
(1) Confidence
Interval for the difference between two
means (
( )
2 1

3
In case of drawing two independent random samples
( )
2 1
, n n
it has been found that
( )
2 1 2 1
x x E
2
2
2
1
2
1
2 1
n n
x x

+

Then the
( ) % 100 1
confidence interval for
( )
2 1

is
( )
2
2
2
1
2
1
2
2 1
n n
z x x

+ t
When
2
1

and
2
2

are known and we want to test the null


hypothesis
0 :
2 1 0
H
we use the statistic
2
2
2
1
2
1
2 1
n n
x x
z

+

,
which belong to standard normal distribution, assuming
0
H
is true.
4
When
2
2
2
1
and

are unknown, and
( )
2 1
n n +
are large
( ) 60 >
We use
2
1
S
and
2
2
S
instead of
2
1

and
2
2

and using the


standard normal distribution. But if
( )
2 1
n n +
are small we
use t-distribution as:
The
( ) % 1
confidence interval for
( )
2 1

is;
( )
2
2
2
1
2
1
2
2 1
n
S
n
S
t x x + t

and when we want to test the null hypothesis ;
0 :
0 :
2 1 1
2 1 0




H
H
.
We use the statistic;
2
2
2
1
2
1
2 1
n
S
n
S
x x
t
+

.
with degree of freedom(d.f) as;
2
2
2
2
2
2
1
2
1
1
2
2
2
2
1
2
1
1
1
1
1
1
]
1

+
1
]
1

1
]
1

n
S
n n
S
n
n
S
n
S
df
in case 2 1

.
5
EXAMPLE(2):
Given
9
40
36
1
1
1

X
n

10
35
49
2
2
2

X
n

a) Find 95%
confidence interval for ( 2 1

)
b) Test that
0
2 1

at
05 . 0
.
Solution:
a) Lower Limit
(L.L) =
( )
2
2
2
1
2
1
2
2 1
n n
z x x

+

( )
9 . 0 1 . 4 5
49
100
36
81
96 . 1 35 40

+
Upper Limit (U.L) =
( )
2
2
2
1
2
1
2
2 1
n n
z x x

+ +


( )
1 . 9 1 . 4 5
49
100
36
81
96 . 1 35 40
+
+ +

Then
( )
2 1

is between
( ) 1 . 9 , 9 . 0
with 95% confidence.
6
b)
true is H 0 :
2 1 0

.

0 :
2 1 1
H
( ) ( )
415 . 2
29 . 4
5
04 . 2 25 . 2
5
49
10
36
9
35 40
2 2
2
2
2
1
2
1
2 1

+

n n
x x
z

at
05 . 0
we reject
0
H
EXAMPLE(3):
Given
40
325
12
1
1
1

S
x
n

44
286
12
2
2
2

S
x
n
1.96 - 1.96
95%
7
a) Find 99%
confidence interval (C.I) for ( 2 1

).
b) Test that (
0
2 1

) at
05 . 0
Solution:
L.L=
( )
2
2
2
1
2
1
2
2 1
n
S
n
S
t x x +


( )
( ) ( )
1 2
4 4
1 2
4 0
2 7 . 2 2 8 6 3 2 5
2 2
+


034 . 0 33 . 161 33 . 133 27 . 2 39 +
U.L=
( )
2
2
2
1
2
1
2
2 1
n
S
n
S
t x x + +

97 . 77 33 . 161 33 . 133 27 . 2 39 + +
then,
( )
2 1

is between
( ) 99 . 77 , 0337 . 0
with 99%
confidence.
b)
( ) 0 :
2 1 0
H

( ) 0 :
2 1 1
H
8
( )
27 . 2
12
44
12
40
286 325
2 2
2
2
2
1
2
1
2 1

n
S
n
S
X X
t
,
2
2
2
2
2
2
1
2
1
1
2
2
2
2
1
2
1
1
1
1
1
.
1
]
1

+
1
]
1

1
]
1

n
S
n n
S
n
n
S
n
S
f d
,
21
12
44
11
1
12
40
11
1
12
44
12
40
2 2
2

1
]
1

+
1
]
1

1
]
1

.
At
05 . 0

08 . 2
21 , 025 . 0
t
We reject
0
H
.
Special Case
The case when the two population standard deviation are
equal when 2 1

.
We compute the pooled sample variance
2.08 - 2.08
9
( ) ( )
.
2
1 1
2 1
2
2 2
2
1 1 2
+
+

n n
S n S n
S
and the t-test statistic becomes
2 1
2 1
1 1
n n
S
X X
t
+

.
With
( ) 2
2 1
+ n n
degree of freedom.
EXAMPLE(5)
In a study to measure the standard of intelligence
between students of Cairo and Sinai universities. A
sample of size 14 from Cairo university gives mean 110
and standard deviation 8, and a sample of size 16 from
Sinai university gives mean 105 and standard deviation
10. Assuming the variance of the two population are
equal, study if there is significance difference between
the two populations with
05 . 0
.
Solution
10
8
110
14
1
1
1

X
n

10
105
16
2
2
2

X
n
2 1 0
: H
.
2 1 1
: H
)
1 1
(
2 1
2
2 1
n n
S
x x
t
+

with 28
f d.
where
( ) ( )
( ) ( )
286 . 83
28
100 15 64 13
2
1 1
2 1
2
2 2
2
1 1 2

+
+

n n
S n S n
S
then
05 . 0
497 . 1
3398 . 3
5
)
16
1
14
1
( 286 . 83
105 110

at
t
where the computed value lies in the acceptance region,
We accept
0
H
.
2.048 - 2.048
95%
11
(2) Confidences Interval for the difference
between two population proportions:
To compare the population proportions for two different
population
( )
2 1
, p p
We draw two samples 2 1
, n n
and compute
1
1
1

n
x
p

2
2
2

n
x
p
and
2 1
2 2 1 1

n n
p n p n
p
+
+

It has been shown that;


( )
2 1 2 1
p p p p E
,
( )
( ) ( )
2 1
2 1
2 1
1
var
n n
n n p p
p p
+

.
then
( ) % 100 1
confidence interval for
( )
2 1
p p
is given by
( )
( ) ( )
2 1
2 1
2
2 1
1

n n
n n p p
z p p
+
t
.
Also, to test the null hypothesis
p p p H
2 1 0
:
12
where
p
is unknown and can be estimated by;
2 1
2 2 1 1

n n
p n p n
p
+
+

then we use the statistic


( ) ( )
2 1
2 1
2 1
1

n n
n n p p
p p
z
+

which follows the standard normal distribution.


EXAMPLE(6)
Given
243
300
1
1

x
n

164
200
2
2

x
n
a) Find 95%
confidence interval (C.I) for ( 2 1
p p
).
b) Test that (
2 1
p p
) at
05 . 0
81 . 0
300
243

1
1
1

n
x
p


82 . 0
200
164

2
2
2

n
x
p

13
and
( ) ( )
814 . 0
500
164 243
200 300
82 . 0 200 81 . 0 300

2 1
2 2 1 1

+
+

+
+

n n
p n p n
p
1) to get 95% C.I for ( 2 1
p p
)
L.L=
( )
( ) ( )
2 1
2 1
2
2 1
1

n n
n n p p
z p p
+


=
( )
( )( )
( )
0796 . 0
200 300
500 186 . 0 814 . 0
96 . 1 82 . 0 81 . 0
U.L=
( )
( ) ( )
2 1
2 1
2
2 1
1

n n
n n p p
z p p
+
+

=
( )
( )( )
( )
0596 . 0
200 300
500 186 . 0 814 . 0
96 . 1 82 . 0 81 . 0 +
then ( 2 1
p p
) lies between (-0.0796, 0.0596) with 95%
confidence.
2)
2 1 0
: p p H
14

:
1
H
2 1
p p
( ) ( )
2 1
2 1
2 1
1

n n
n n p p
p p
z
+

( )( )
028 . 0
60000
500 186 . 0 814 . 0
82 . 0 81 . 0

z
Given
05 . 0

Since the calculated value lies the acceptance
region, we accept
0
H
.
1.96 - 1.96
95%
15

You might also like