The Sample Sign is a non-parametric hypothesis test is used to test if the median of a distribution is equal to a specific value.

For run this test it’s important that:


In this case the hypothesis are like in case of two tail test:

  • H0: The median is equal to a specific value;
  • H1The median is diffferent to the specific value.


In this case the hypothesis are like in case of one tail left test:

  • H0: The median is equal to a specific value;
  • H1The median is lower than the specific value.


In this case the hypothesis are like in case of one tail right test:

  • H0: The median is equal to a specific value;
  • H1The median is higher than the specific value.


The way to conduct the hypothesis test is like the one-sample t-tests, but we use another statistics.


For small number of observation (n <= 25) you can compute the statistics in

  • Set the specific median value;
  • Set for each observation less than the specific median value a sign -, if equal or above a sign +
  • Count the number of + and the number of -. You have y= the min number between this.


If you have a big number of observation (n > 25) you need to plug you y value in the formula of image1.

image1 – statistics for n > 25


Now you need to calculate a binomial distribution with X = y (the min number of sign, if N > 25 X=z); N = number of observation and probability =0,5. Finaly you need to compare the value of the binomial distribution with alpha to look if you can reject H0.


For instance if you have alpha = 0,05; n=10; 3 sign +; 7 sign -, and you want to calculate a two-tail test you have:

The smaller number between 7 and 3 is 3. You’re working on a two tail test so you calculate BN(X<= 3;P=0,5; n=10) = 0,171 and BN(X>= 3;P=0,5;n=10)=0.9453125. If you multiple for 2 the minor value you have 0,342 that is > 0,05. So you fail to reject H0

Share on: