This video is going to be a sweet one, I'll explain that in a minute. But first, a raw and unassuming ingredients. Imagine in your experiment, you have a sample of size eight. And moreover, the variable of interest has an ordinal measurement scale. Still, you'd like to compare an average of your observations against what you expect in theory. Clearly, the assumptions for t-test are not met. So, what can you do? The answer is a sign test. It offers a nonparametric alternative to a one sample t-test and it's one of the simplest nonparametric tests, but also a versatile one. In this video, I'll explain how it works and where it can applied. Your friend really loves wine gums and while sharing some sweets with you, confesses that she usually eats the green ones first, because these are the sweetest. You can't really discern a difference between the red, orange, green or yellow ones, but your friend is absolutely certain of her case. So, you decide to get to the bottom of it and find ten volunteers for an experiment. You give each of the volunteers a green wine gum and one of another color in random order and you ask them to indicate which one of the two is sweeter or whether they're equally sweet. This is a table with results. Each row gives the opinion of one person. If that person thinks the green wine's going to be sweeter, a plus is shown in the results column. If the other color tastes sweeter, a minus is shown. And if they are equally sweet, a zero is shown. As you see, six of the ten people think the green one is sweeter. Two out of ten think there's no difference and the other two think that another color than the green one can be sweeter. Clearly, the majority of the persons thinks the green wine gums are sweeter, but how much does tell about what people will taste in general? After all, it's just a small sample that you've drawn. I'm going to explain how you can make a general statement based on this result. First of all, let's consider this category of undetermined cases, the ties. These are not really informative, because people couldn't make up their mind. So we take them out of the table, we are left with eight cases. Let's consider the situation, why the green wine gums would in fact, taste just as sweet as any other color. This is the null hypothesis for our experiment. And in that case, half of the people would think it's sweeter and the other half would think it was less sweet. So then, you would expect the fraction of 0.5 pluses and any value higher than 0.5 would mean that the green wines are being perceived as sweeter. But wait a minute, we've now translated this problem in one of comparing an observe ratio against a value of 0.5 and there's a for that, the one-sample binomial test. It gives the probability that you would encounter X successes or more in n trials if the true probability were P. In this experiment, you've got six successes in eight trials while the probability under the null hypothesis is 0.5. If we calculate this probability, it turns out to be 0.035. So in less than 5% of the cases, you encounter this result under the null hypothesis. That is if the green wine gums are perceived to be just as sweet as the others. This is unlikely and at the 5% significance level, you would reject the null hypothesis. In general, people find the green wine gum sweeter. In the example, we translated the direction of the difference between two observations not necessarily a numerical difference into a variable with two categories. And subsequently, applied a one-sample t-test for a proportion. It is called a sign test. It is particularly useful for situations where quantitative measurement is impossible, but where ranking, a pair of observations is feasible. The null hypothesis tested by the sign test is that the probability that X is larger than Y for any case, I is equal to a given proportion, P. Here, X could be the judgment or score on the one condition or before a treatment and Y, the judgment or score under the other condition or after a treatment. Usually, a value of 0.5 is chosen for the proportion P, but it can be any value between 0 and 1. You could, for example, test whether X is larger than Y in 10% of the cases and set P to 0.1. In addition, you could adjust the hypothesis to test, for example, that the probability of X bigger than Y is smaller than P or the two-sided hypothesis that the probability of X bigger than Y is unequal to P. Finally you could also replace Y with a constant, so that you would measure the proportion or X exceeds a constant. In any of these cases, you would use the cumulative binomial distribution to find the probability of finding your result if your null hypothesis were true. If this probability is small, for example, smaller than 0.05, you would reject your null hypothesis. If the number of cases is larger than 35, the binomial distribution can be approximated by a normal distribution. So then, the z test can be used instead. The beauty of the sign test is that you don't have to make any assumptions about the measurement level of your data. It may be ordinal or numerical and it may also follow up any probability distribution. Furthermore, there are no requirements on the sample size and the power of this test is relatively high for small samples. Say, fewer than 20 cases. At the downside, the power decreases rapidly from bigger sample sizes. Let me summarize what I have explained in this video. The sign test can be used to test whether a sample quantile differs from a hypothetical population quantile. Testing for the difference in medians and comparing whether paired samples are systematically different are special cases of this more general question. The test statistic in the sign test is the proportion of observations in the sample with values greater than the values specified in null hypothesis. This proportion is tested with a binomial test when the sample is small and the normal approximation to the binomial when it's sufficiently large. When testing the difference between pair observations, the values or ranks of the pairs can be subtracted and the proportion of negative values act as a test statistic. It's compared with the value of 0.5 and the null hypothesis of no differences between the pairs.