Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 14 The Sign Test and the Rank Test

Similar presentations


Presentation on theme: "Lecture 14 The Sign Test and the Rank Test"— Presentation transcript:

1 Lecture 14 The Sign Test and the Rank Test
Outline of Today The Sign Test The Rank Test 1/16/2019 SA3202, Lecture 14

2 The Problem Let X~ F (density f) Y~G (density g)
We say that X and Y differ in location if X has the same distribution as Y shifted by an amount a X~ Y+theta or f(x)=g(x-theta) or F(x)=G(x-theta) Usually theta is unknown, and is referred to as the shift parameter or the location parameter. The Location Test Problem Given a sample (Xi, Yi), i=1,2, …,n, we wish to test H0: theta= (i.e. X~Y) against H1: theta ~= (i.e X~Y+theta) or H1: theta>0 or H1: theta<0 1/16/2019 SA3202, Lecture 14

3 The Sign Test The usual parametric test of this hypothesis is the paired t-test. A simple nonparametric test may be based on the sign of the difference D=X-Y By noting that if X~Y, then by symmetry, P(X>Y)=P(Y>X)=1/2 1/16/2019 SA3202, Lecture 14

4 Let p=P(D>0)=Pr(X>Y). Then under H0: X~Y, we have p=
Let p=P(D>0)=Pr(X>Y). Then under H0: X~Y, we have p=.5 whereas under H1, we have p> when theta>0 < when theta <0 ~=.5 when theta~=0 Thus, we can use a binomial test, based on the sign of the difference Di=Xi-Yi, I=1,2, …,n The test statistic is M=#{i |Di>0}=# of the times that Xi>Yi 1/16/2019 SA3202, Lecture 14

5 Example Remark : Due to continuity, under H0, Pr(D=0)=Pr(X=Y)=0. That is, the probability of a tie is 0. In practice, however, ties do occur and the usual practice is to discard the ties and base the sign test on the remaining observations. In this case, M=#{i| Di>0}~Binom (n’, .5), n’ =# of no tie pairs Example The number of defective electrical fuse proceeding from each of two production lines, A and B, was recorded for a period of 10 days. The results are as follows: Day A B 1/16/2019 SA3202, Lecture 14

6 We wish to test the hypothesis that the two distributions of defectives produced by A and B are identical, against the alternative that either production line produces more defectives than the other one. n=10, p=.5 Binomial Table ======================================================================= U<= U<= U<= U<= U<=4 U<=5 U<=6 U<=7 U<=8 U<=9 U<=10 ====================================================================== The test statistic is M=# of the times that A exceeds B. Under H0, M~Binom(10,.5). From the Binomial table for n=10, a test of approximate 10% is to reject H0 if Now the observed M is so we reject H0. That is, there is a significance difference between A and B. 1/16/2019 SA3202, Lecture 14

7 Remark Clearly, the sign test may be also used to test other hypotheses about the shift parameter. For example to test hypothesis H0: theta=theta0, we look at the signs of the differences Di=Xi-Yi-theta0. Note that if X~Y+theta, then the shift parameter theta is the median of difference D=X-Y. Therefore confidence intervals for theta may be obtained, based on the values of differences, as discussed earlier. 1/16/2019 SA3202, Lecture 14

8 Ranks Definition Given a sample X1, X2, …, Xn ~ F, continuous
The rank of the i-th observation, Ri, is the order of the i-th observation when the observations are arranged in increasing order. For example, for the following sample of size 5, i Xi The order statistics are X(i) The ranks are Ri 1/16/2019 SA3202, Lecture 14

9 The order statistics are X(i) 1.8 3.1 3.1 5.2 10.1
The Tie Rank If two or more observations are equal, referred to as tie., we assign the average rank of these observations to each one. For example, i Xi The order statistics are X(i) The ranks are Ri =(2+3)/2 This procedure will be used to deal with ties throughout the course. Theoretically, however, the problem of ties can be ignored if a continuous distribution function is considered. 1/16/2019 SA3202, Lecture 14

10 Rank Distribution Note that R=(R1, R2, …,Rn) is a permutation of the numbers (1,2,…, n) (ignoring ties). By symmetry, all the possible permutations are equally likely: Pr( R = any given permutation of (1,2,…,n))= Also, by symmetry, for each k, we have Pr(Rk=r)= , k=1,2,…,n Pr(Rk=r, Rl=s)= , k, l=1,2, ….,n 1/16/2019 SA3202, Lecture 14

11 Use these results, we have E(Rk)= Var(Rk)=
Cov(Rk, Rl)= 1/16/2019 SA3202, Lecture 14


Download ppt "Lecture 14 The Sign Test and the Rank Test"

Similar presentations


Ads by Google