Exercise

# Nonparametric methods: Sign test

As you may have understood from the lecture, there are several reasons to use nonparametric methods instead of parametric methods. Let's summarise the main reasons first:

- The underlying probability distribution is unknown or deviates from what the parametric method requires
- The sample size may be very small so that is not possible to test whether the parametric assumptions are met
- The measurement level may be different from what the parametric methods requires. For instance, it could be ordinal.
- There may be no parametric method available to test your specific question.

The first nonparametric test that we will treat is the sign test. This is the nonparametric equivalent to the one-sample t test. This test calculates the probability of x successes or more on n trials if the true probability is p. For some these parameters may sound familiar. We have already come across them when we've been working with the binomial distributions. Let's take one step back though. Before we move on to doing a sign test in R, let's first get our hypotheses right. To do so, let's work with an example of the American elections. Let's consider only two democratic nominees: Hillary Clinton and Bernie Sanders. Choose the most appropriate set of hypotheses for a sign test using this example given the fact that we do not indicate directionality in our hypotheses.