You are on page 1of 4

STA 403 Non Parametric Methods

September 4, 2020

1 Lecture 5
If the hypothesis was: Test
H0 : η = 14000
H1 : η > 14000
at α near 0.05

Solution:

Test statistic:
T1 = N o. of obsns > 14000 = 13

p − value = P (Y ≥ 13) = 1 − P (Y ≤ 12) = 0.132


Since 0.132 > 0.05, we fail to reject H0

Alternatively:
P (Y > t2 ) = α
P (Y > t2 ) ∼
= 0.05
P (Y > 13) = 1 − P (Y ≤ 13) = 1 − 0.9423 = 0.0577
Reject H0 if T1 = 13 > t2 = 13

Example 2: The soil samples taken from a particular region were subjected
to chemical analysis to determine the pH of each sample. The sample pH’s were
found to be:
5.93 6.08 5.86 5.91 6.12
5.90 5.95 5.89 5.98 5.96
Test
H0 : M = 6.0
H1 : M 6= 6.0
at α = 0.05

1
Solution: Y ∼ Bin(n = 10, p = 0.5)
Let
Y = N o. of pH 0 s in the sample which exceed 6.0
Y =2

Decision Rule: Reject H0 if Y > c or Y ≤ n − c where

α1 = P (Y ≥ 9) = 1 − P (Y ≤ 8)
= 1 − 0.9893 = 0.0107
α2 = P (Y ≤ 1) = 0.0108

⇒ α = α1 + α2 = 0.0215

Reject H0 if Y ≥ 9 or Y ≤ 1.
Since Y = 2, we fail to reject H0 .

Alternatively: Let

T1 = # of obsns > 6.0 = 2


T2 = # of obsns < 6.0 = 8

p − value = 2P (Y ≥ 8)
= 2[1 − P (Y ≤ 7)]
= 0.11

=⇒ p − value = 0.11 > 0.05,

we fail to reject H0 .
************************************************************
Now, if our hypothesis for the Median is given as

H0 : m = m0

where m − median and m0 − median f ixed at a number, then, if letting Y =


N o. of obsns ≥ m0 , the alternatives and their respective decision rules are

A:

H1 : m > m0 ⇒ Reject H0 if Y ≥ c1 (large Y )

B:

H1 : m < m0 ⇒ Reject H0 if Y ≤ c2 (small Y )

2
C:
H1 : m 6= m0 ⇒ Reject H0 if Y ≥ c or Y ≤ n − c
If n is large, then

t2 ∼
p
= np ∗ +z1−α np ∗ (1 − p∗)

1.1 Confidence Interval


Let x1 , x2 , · · · , xn be a random sample of size n.
Let x(1) , x(2) , · · · , x(n) be the order statistics.
Let xp∗ be the pth population quartile

Property:
r−1  
X n
P (xp∗ < x(r) ) = (p∗)i (1 − p∗)n−i
i
i=1

Proof: for r = 1
0
P (xp∗< x(1)
) = P (allxi s > xp∗ )
0 n
(p∗)i (1 − p∗)n−i
P
=
i=0  i 
0 n
(p∗)0 (1 − p∗)n = (1 − p∗)n
P
=
i=0 0
for r = 2
P (xp∗ < x(2) ) = P (atleast(n − 1)of x1 > xp∗ )
= P (oneorf
 ewerx1 is < xp∗ )
1 n
(p∗)i (1 − p∗)n−i
P
=
i=0 i
and for r = r
0
) = P (r − 1orf ewerx sare < xp∗ )
P (xp∗ < x(r)
r−1 n
(p∗)i (1 − p∗)n−i
P
=
i=1 i
To find the confidence interval, we want
1−α∼ = P (xr ≤ xp∗ ≤ x(s) )
= P (xp∗ ≤ x(s) ) − P (xp∗ ≤ x(r) )
Assuming distribution to be continuous
Choose r&s so that
α
P (xp∗ < x(s) ) = 1 − 2
P (xp∗ < x(r) ) = α2
which gives our confidence interval

3
Example: Find an approximate 95% confidence interval (C.I.) for median of
the income data.

Solution: Now; n = 20; 1 − α = 0.95 and


α = 0.05 ⇒ α/2 = 0.025 ⇒ 1 − α/2 = 0.975
Now:
0.025 = P (xp∗ = median < x(r) )
r−1 n
(p∗)i (1 − p∗)n−i
P
=
i=0  i 
r−1 20
(0.5)i (0.5)n−i
P
=
i=0 i

From binomial table (n = 20, p = 0.5),

P (Y ≤  5) =0.0207 = α1
5 20
(0.5)i (0.5)n−i = 0.0207
P
=
i=0 i

so that r − 1 = 5 ⇒ r = 6.
14  
X 20
P (Y ≤ 14) = (0.5)i (0.5)n−i = 0.9793
i
i=0

so that r − 1 = 14 ⇒ r = 15.
Therefore,

P (median ≤ x(15) ) = P (median < x(15) ) =


= 0.9793 = 1 − α

which is true if the distribution is continuous.


From

1 − α1 − α2 = 0.9793 − 0.0207 = 0.9586,

the 95.86% C.I. for median is [x(6) , x(15) ]


For our data, 95.86% C.I. is [6th smallest, 6th l arg est] leading to P [13600, 19500].
NOTE:
For large samples n > 20, the C.I. for xp∗ is (r∗, s∗) where
p
r∗ = np ∗ +zα/2 np p ∗ (1 − p∗)
s∗ = np ∗ +z1−α/2 np ∗ (1 − p∗)

You might also like