{"id":117,"date":"2018-12-24T06:40:53","date_gmt":"2018-12-24T06:40:53","guid":{"rendered":"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=117"},"modified":"2018-12-24T06:56:04","modified_gmt":"2018-12-24T06:56:04","slug":"sign-test-i","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/chapter\/sign-test-i\/","title":{"rendered":"Sign Test I"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/HqfBCZwhT9I\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong style=\"text-align: justify;font-size: 1em\">1 A motivating example<\/strong>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">We start with a motivating example. Consider the following data on the lifetime of an electric equipment:<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">1046.541 1110.841 1259.690 1014.233 1156.425 1001.439 1299.962 1116.045<\/p>\r\n<p style=\"text-align: justify\">1022.895 1106.415 1023.236 1093.674 1103.354 1005.930 1202.124 1001.251<\/p>\r\n<p style=\"text-align: justify\">1129.546 1051.215 1043.066 1054.430.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Suppose interest is to test the null hypothesis that the mean lifetime is 1050 hours. The usual practice is to use Student's t distribution for the purpose. But the question is natural \"\u00a0\u00a0 Whether normality assumption holds?\" We perform some exploratory data analysis. We provide below the histogram and Q-Q plot for the data.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-120 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-35.png\" alt=\"\" width=\"519\" height=\"319\" \/>\r\n<div>\r\n<p style=\"text-align: center\"><strong>Figure 1: Histogram and Q-Q plot of the data<\/strong><\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The histogram shows that the distribution of the data is far from symmetric. The QQ plot clearly reveals the non normality of data. Then t test is not appropriate.A test for this data will be appropriate , if the assumed distribution is appropriate. However, deciding an\u00a0<span style=\"font-size: 1em\">appropriate distribution su ers from subjectivity and no such thumb-rule is present. Thus, we need alternative procedures to test the hypothesis appropriately.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">2 What is Sign Test?<\/span><\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">This is a nonparametric analogue of Student's t test for the mean(i.e. a location parameter) of the population. The t-test is based on the assumption of normality of the underlying population. Sign test is a nonparametric alternative to t test. This test does not require the assumption of normality. It also provides a test of location but uses quantiles of the distribution as the location parameter. Moreover, sign test is based on only the continuity of the underlying population.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">2.1 Assumptions &amp; the hypothesis<\/span><\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Suppose X1; X2; ::; Xn are iid observations from a population characterised by the DF F , where F is unknown but assumed to be continuous. Suppose (F ) is the quantile of order p, that is F ( (F )) = p for known p. Then in Sign test, the objective is to test H0 : (F ) = 0 against one of the alternatives Ha : (F ) &gt; 0 or Ha : (F ) &lt; 0 or Ha : (F ) 6= 0 for some known 0. For our discussion, we choose p = 0:5 so that (F ) reduces to the median.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">2.2 Sign test statistic-The intuitive argument<\/span><\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Note that if the observed data is consistent with (F ) = 0, then one can expect that almost 50% values of the data set lie above and below 0. This suggests to use the number of observations exceeding 0 as the test statistic. Formally this implies the use of the statistic\u00a0<\/span><span style=\"font-size: 1em\">S( 0) = Pn I(Xi 0 &gt; 0) Since S counts the number of positive signs among Xi 0; i =\u00a0<\/span><span style=\"font-size: 1em\">i=1\u00a0<\/span><span style=\"font-size: 1em\">1; 2; ::; n, the test based on S is called Sign test.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">2.3\u00a0 Sign test statistic: Another look<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Assume that\u00a0\u00a0 0\u00a0 = 0. Then\u00a0 (F ) &gt; 0 , F (0) &lt; :5 , that is P (X1\u00a0 &gt; 0) &gt; :5. Similarly,\u00a0(F ) &lt; 0 , F (0) &gt; :5 , that is P (X1 &lt; 0) &gt; :5. Thus (F ) &gt; 0(or &lt; 0) implies more positive(negative) observations. The following gures will make the idea clear.<\/span><\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<img class=\"size-full wp-image-122 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-36.png\" alt=\"\" width=\"490\" height=\"328\" \/>\r\n<p style=\"text-align: justify\">Consider the alternative H0 :\u00a0 &gt; 0. This suggests to use the number of positive observa- Pntions as our test statistic. Formally this implies the use of the statistic S =\u00a0\u00a0\u00a0\u00a0\u00a0 i=1 I(Xi &gt; 0).\u00a0Similarly, the form of the statistic for other alternatives can also be justi ed.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">3 Distribution of S<\/span><\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Assume that P (Xi = 0) = 0 for every i = 1; 2; ::; n. Since each I(Xi 0 &gt; 0) can be thought of a Bernoulli random variable, S can be looked upon as a sum of n Bernoulli ran-dom variables. Since observations are iid, I(Xi 0 &gt; 0) are iid random variables. Now the distribution of each I(Xi 0 &gt; 0) is Bernoulli with success probability P (X1 &gt; 0).Thus\u00a0<span style=\"font-size: 1em\">S\u00a0 is the sum of n iid Bernoulli random variables with success probability P (X1 &gt;\u00a0 0).<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">We see that, S has a Binomial(n; P (X1 &gt; 0) distribution. Naturally the success probability P (X1 &gt; 0) depends on the underlying F . However under the null hypothe-sis F ( 0) = 0:5 and hence S becomes a distribution free statistic.Therefore tests based on S are exactly nonparametric.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">4 Critical region<\/span><\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Since S Binomial(n; 12 ), under H0, E(S) = n2 . However, under any (F ), E(S) = n(1 F ( 0)). Suppose &gt; 0, then it is expected to have more than 50% observations exceeding 0. Thus S( 0) is expected to be larger under &gt; 0 than under = 0. Therefore, larger values of S( 0) indicates evidence against = 0.Naturally a right tailed test based on S( 0) seems appropriate for testing H0 : = 0 against Ha : &gt; 0.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Again less than 50% observations exceeding 0 are expected under &lt; 0. Thus S( 0) is expected to be smaller under &lt; 0 than under = 0. Thus a left tailed test based on S( 0) seems appropriate for the alternative Ha : &lt; 0. However, if 6= 0, then S( 0) is expected to be either smaller or larger than under = 0. Therefore, a two tailed test based on S( 0) is appropriate for the alternative Ha : 6= 0.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">5 Symmetry of S<\/span><\/strong><\/p>\r\n\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Since the distribution of S( 0) is Binomial(n,.5) under the null hypothesis, S( 0) has a sym-metric distribution about n2 . We explore the implication of the symmetric nature. Suppose we have observed Yi = 2 0 Xi for each i, instead of Xi. Under = 0, the median of the distributions of both Yi and Xi is 0. Then tests for the two sided alternative based on Yis and Xis are expected to give similar results. But test applied on Y's will give similar result to that applied on X's, if the statistic has a symmetric distribution. This gives the\u00a0<span style=\"text-align: initial;font-size: 1em\">justi cation of the requirement of symmetry.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong><span style=\"text-align: initial;font-size: 1em\">5.1 Di erent Tests<\/span><\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Since, S has a discrete distribution, tests based on it will be randomized. For the alternative Ha : &gt; 0, a size test can be expressed as 0 = I(S &gt; S ) + aI(S = S ), where S is such that EH0 0 = .<\/span><span style=\"text-align: initial;font-size: 1em\">For the alternative Ha : &lt; 0, a size test can be expressed as 0 = I(S &lt; S1 ) + aI(S = S1 ), where S1 is such that EH0 0 = .<\/span><\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-124 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-37.png\" alt=\"\" width=\"660\" height=\"101\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>5.2 Test based on p values<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Suppose Sobs is the observed value of S. For the alternative Ha : &gt; 0, the one sided p value is PH0 (S Sobs). We accept the null hypothesis if this p value exceeds . For the alternative Ha : &lt; 0, the one sided p value is PH0 (S Sobs). We accept the null hypothesis if this p value exceeds . However, for the two sided alternative Ha : 6= 0, the two sided p value is 2minfPH0 (S Sobs); PH0 (S Sobs)g. We reject the null hypothesis if this p value does not exceed .<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>6 Presence of ties<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">We have already assumed continuity of F so that P (Xi = 0) = 0 for every i = 1; 2; ::; n. But in practice, we can have observations equal to 0. Thus we get some zero's in S. Presence of a large number of 0's can give misleading results. The usual method, in this context<\/p>\r\n\r\n<\/div>\r\n<p style=\"text-align: justify\"><img class=\"size-full wp-image-125 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-38.png\" alt=\"\" width=\"659\" height=\"93\" \/><\/p>\r\n<p style=\"text-align: justify\">taken as our new statistic and tests based on it can be performed as earlier. These tests are known as conditional sign tests.<\/p>\r\n&nbsp;\r\n\r\n<strong>7 Optimality of Sign Test<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Consider testing H0\u00a0 :\u00a0 =\u00a0 0\u00a0 against Ha\u00a0 :\u00a0 \u00a0&gt; 0.\u00a0 De ne 0\u00a0 = fF : F ( 0) = 12\u00a0 and\u00a0a = fF : F ( 0) &lt; 12 . Then the above hypothesis testing can be equivalently expressed as\u00a0testing H0 : F 2 0 against Ha : F 2 a. Then H0 and Ha are both composite. It can be shown that the UMP size test for the above testing problem is nothing but the Sign test based on S. In a similar way the two sided Sign test is UMPU size (see, Fraser, 1957, for details).<\/p>\r\n&nbsp;\r\n\r\n<strong>8 Consistency of Sign test<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Consider testing H0 : = 0 against Ha : &gt; 0. Now Sign test can be equivalently expressed in terms of Sn . For simplicity assume 0 = 0. Since S has a binomial distribution, we have under any = (F ),<\/p>\r\n<p style=\"text-align: justify\"><img class=\"size-full wp-image-126 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-39.png\" alt=\"\" width=\"657\" height=\"207\" \/><\/p>\r\n<p style=\"text-align: justify\">Thus Sign test is consistent against the alternative Ha : &gt; 0. Consistency against the other alternatives can be proved also.<\/p>\r\n<p style=\"text-align: justify\"><\/p>\r\n\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Sign Test I<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/HqfBCZwhT9I\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/HqfBCZwhT9I\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"text-align: justify;font-size: 1em\">1 A motivating example<\/strong><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">We start with a motivating example. Consider the following data on the lifetime of an electric equipment:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">1046.541 1110.841 1259.690 1014.233 1156.425 1001.439 1299.962 1116.045<\/p>\n<p style=\"text-align: justify\">1022.895 1106.415 1023.236 1093.674 1103.354 1005.930 1202.124 1001.251<\/p>\n<p style=\"text-align: justify\">1129.546 1051.215 1043.066 1054.430.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Suppose interest is to test the null hypothesis that the mean lifetime is 1050 hours. The usual practice is to use Student&#8217;s t distribution for the purpose. But the question is natural &#8221;\u00a0\u00a0 Whether normality assumption holds?&#8221; We perform some exploratory data analysis. We provide below the histogram and Q-Q plot for the data.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-120 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-35.png\" alt=\"\" width=\"519\" height=\"319\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-35.png 519w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-35-300x184.png 300w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-35-65x40.png 65w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-35-225x138.png 225w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-35-350x215.png 350w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/p>\n<div>\n<p style=\"text-align: center\"><strong>Figure 1: Histogram and Q-Q plot of the data<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The histogram shows that the distribution of the data is far from symmetric. The QQ plot clearly reveals the non normality of data. Then t test is not appropriate.A test for this data will be appropriate , if the assumed distribution is appropriate. However, deciding an\u00a0<span style=\"font-size: 1em\">appropriate distribution su ers from subjectivity and no such thumb-rule is present. Thus, we need alternative procedures to test the hypothesis appropriately.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">2 What is Sign Test?<\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">This is a nonparametric analogue of Student&#8217;s t test for the mean(i.e. a location parameter) of the population. The t-test is based on the assumption of normality of the underlying population. Sign test is a nonparametric alternative to t test. This test does not require the assumption of normality. It also provides a test of location but uses quantiles of the distribution as the location parameter. Moreover, sign test is based on only the continuity of the underlying population.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">2.1 Assumptions &amp; the hypothesis<\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Suppose X1; X2; ::; Xn are iid observations from a population characterised by the DF F , where F is unknown but assumed to be continuous. Suppose (F ) is the quantile of order p, that is F ( (F )) = p for known p. Then in Sign test, the objective is to test H0 : (F ) = 0 against one of the alternatives Ha : (F ) &gt; 0 or Ha : (F ) &lt; 0 or Ha : (F ) 6= 0 for some known 0. For our discussion, we choose p = 0:5 so that (F ) reduces to the median.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">2.2 Sign test statistic-The intuitive argument<\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Note that if the observed data is consistent with (F ) = 0, then one can expect that almost 50% values of the data set lie above and below 0. This suggests to use the number of observations exceeding 0 as the test statistic. Formally this implies the use of the statistic\u00a0<\/span><span style=\"font-size: 1em\">S( 0) = Pn I(Xi 0 &gt; 0) Since S counts the number of positive signs among Xi 0; i =\u00a0<\/span><span style=\"font-size: 1em\">i=1\u00a0<\/span><span style=\"font-size: 1em\">1; 2; ::; n, the test based on S is called Sign test.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">2.3\u00a0 Sign test statistic: Another look<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Assume that\u00a0\u00a0 0\u00a0 = 0. Then\u00a0 (F ) &gt; 0 , F (0) &lt; :5 , that is P (X1\u00a0 &gt; 0) &gt; :5. Similarly,\u00a0(F ) &lt; 0 , F (0) &gt; :5 , that is P (X1 &lt; 0) &gt; :5. Thus (F ) &gt; 0(or &lt; 0) implies more positive(negative) observations. The following gures will make the idea clear.<\/span><\/p>\n<\/div>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-122 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-36.png\" alt=\"\" width=\"490\" height=\"328\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-36.png 490w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-36-300x201.png 300w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-36-65x44.png 65w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-36-225x151.png 225w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-36-350x234.png 350w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/p>\n<p style=\"text-align: justify\">Consider the alternative H0 :\u00a0 &gt; 0. This suggests to use the number of positive observa- Pntions as our test statistic. Formally this implies the use of the statistic S =\u00a0\u00a0\u00a0\u00a0\u00a0 i=1 I(Xi &gt; 0).\u00a0Similarly, the form of the statistic for other alternatives can also be justi ed.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">3 Distribution of S<\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Assume that P (Xi = 0) = 0 for every i = 1; 2; ::; n. Since each I(Xi 0 &gt; 0) can be thought of a Bernoulli random variable, S can be looked upon as a sum of n Bernoulli ran-dom variables. Since observations are iid, I(Xi 0 &gt; 0) are iid random variables. Now the distribution of each I(Xi 0 &gt; 0) is Bernoulli with success probability P (X1 &gt; 0).Thus\u00a0<span style=\"font-size: 1em\">S\u00a0 is the sum of n iid Bernoulli random variables with success probability P (X1 &gt;\u00a0 0).<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">We see that, S has a Binomial(n; P (X1 &gt; 0) distribution. Naturally the success probability P (X1 &gt; 0) depends on the underlying F . However under the null hypothe-sis F ( 0) = 0:5 and hence S becomes a distribution free statistic.Therefore tests based on S are exactly nonparametric.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">4 Critical region<\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Since S Binomial(n; 12 ), under H0, E(S) = n2 . However, under any (F ), E(S) = n(1 F ( 0)). Suppose &gt; 0, then it is expected to have more than 50% observations exceeding 0. Thus S( 0) is expected to be larger under &gt; 0 than under = 0. Therefore, larger values of S( 0) indicates evidence against = 0.Naturally a right tailed test based on S( 0) seems appropriate for testing H0 : = 0 against Ha : &gt; 0.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Again less than 50% observations exceeding 0 are expected under &lt; 0. Thus S( 0) is expected to be smaller under &lt; 0 than under = 0. Thus a left tailed test based on S( 0) seems appropriate for the alternative Ha : &lt; 0. However, if 6= 0, then S( 0) is expected to be either smaller or larger than under = 0. Therefore, a two tailed test based on S( 0) is appropriate for the alternative Ha : 6= 0.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong><span style=\"font-size: 1em\">5 Symmetry of S<\/span><\/strong><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Since the distribution of S( 0) is Binomial(n,.5) under the null hypothesis, S( 0) has a sym-metric distribution about n2 . We explore the implication of the symmetric nature. Suppose we have observed Yi = 2 0 Xi for each i, instead of Xi. Under = 0, the median of the distributions of both Yi and Xi is 0. Then tests for the two sided alternative based on Yis and Xis are expected to give similar results. But test applied on Y&#8217;s will give similar result to that applied on X&#8217;s, if the statistic has a symmetric distribution. This gives the\u00a0<span style=\"text-align: initial;font-size: 1em\">justi cation of the requirement of symmetry.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong><span style=\"text-align: initial;font-size: 1em\">5.1 Di erent Tests<\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Since, S has a discrete distribution, tests based on it will be randomized. For the alternative Ha : &gt; 0, a size test can be expressed as 0 = I(S &gt; S ) + aI(S = S ), where S is such that EH0 0 = .<\/span><span style=\"text-align: initial;font-size: 1em\">For the alternative Ha : &lt; 0, a size test can be expressed as 0 = I(S &lt; S1 ) + aI(S = S1 ), where S1 is such that EH0 0 = .<\/span><\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-124 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-37.png\" alt=\"\" width=\"660\" height=\"101\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-37.png 660w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-37-300x46.png 300w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-37-65x10.png 65w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-37-225x34.png 225w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-37-350x54.png 350w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>5.2 Test based on p values<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Suppose Sobs is the observed value of S. For the alternative Ha : &gt; 0, the one sided p value is PH0 (S Sobs). We accept the null hypothesis if this p value exceeds . For the alternative Ha : &lt; 0, the one sided p value is PH0 (S Sobs). We accept the null hypothesis if this p value exceeds . However, for the two sided alternative Ha : 6= 0, the two sided p value is 2minfPH0 (S Sobs); PH0 (S Sobs)g. We reject the null hypothesis if this p value does not exceed .<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>6 Presence of ties<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">We have already assumed continuity of F so that P (Xi = 0) = 0 for every i = 1; 2; ::; n. But in practice, we can have observations equal to 0. Thus we get some zero&#8217;s in S. Presence of a large number of 0&#8217;s can give misleading results. The usual method, in this context<\/p>\n<\/div>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-125 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-38.png\" alt=\"\" width=\"659\" height=\"93\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-38.png 659w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-38-300x42.png 300w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-38-65x9.png 65w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-38-225x32.png 225w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-38-350x49.png 350w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/p>\n<p style=\"text-align: justify\">taken as our new statistic and tests based on it can be performed as earlier. These tests are known as conditional sign tests.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>7 Optimality of Sign Test<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Consider testing H0\u00a0 :\u00a0 =\u00a0 0\u00a0 against Ha\u00a0 :\u00a0 \u00a0&gt; 0.\u00a0 De ne 0\u00a0 = fF : F ( 0) = 12\u00a0 and\u00a0a = fF : F ( 0) &lt; 12 . Then the above hypothesis testing can be equivalently expressed as\u00a0testing H0 : F 2 0 against Ha : F 2 a. Then H0 and Ha are both composite. It can be shown that the UMP size test for the above testing problem is nothing but the Sign test based on S. In a similar way the two sided Sign test is UMPU size (see, Fraser, 1957, for details).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>8 Consistency of Sign test<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Consider testing H0 : = 0 against Ha : &gt; 0. Now Sign test can be equivalently expressed in terms of Sn . For simplicity assume 0 = 0. Since S has a binomial distribution, we have under any = (F ),<\/p>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-126 aligncenter\" src=\"http:\/\/statp05.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-39.png\" alt=\"\" width=\"657\" height=\"207\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-39.png 657w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-39-300x95.png 300w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-39-65x20.png 65w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-39-225x71.png 225w, https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-content\/uploads\/sites\/130\/2018\/12\/Untitled-39-350x110.png 350w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/p>\n<p style=\"text-align: justify\">Thus Sign test is consistent against the alternative Ha : &gt; 0. Consistency against the other alternatives can be proved also.<\/p>\n<p style=\"text-align: justify\">\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Sign Test I<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/HqfBCZwhT9I\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"author":3,"menu_order":8,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["mr-taranga-mukherjee"],"pb_section_license":""},"chapter-type":[],"contributor":[59],"license":[],"class_list":["post-117","chapter","type-chapter","status-publish","hentry","contributor-mr-taranga-mukherjee"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/pressbooks\/v2\/chapters\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":6,"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/pressbooks\/v2\/chapters\/117\/revisions"}],"predecessor-version":[{"id":129,"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/pressbooks\/v2\/chapters\/117\/revisions\/129"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/pressbooks\/v2\/chapters\/117\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/pressbooks\/v2\/chapter-type?post=117"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/wp\/v2\/contributor?post=117"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/statp05\/wp-json\/wp\/v2\/license?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}