# The Sign Test

#### What is the purpose of the sign test?

To test if the population median equals a given value (e.g. the sample median).

#### What are the assumptions made?

• Independence: Each sample is independent of the others.
• Identical Distributions
• Continuity: There are no ties
• Needed for the hypothesis test
• Means there is exactly one point x such that F(x) =1/2 and that point is the median ($theta$

#### How do you use it?

1. Setup the null hypothesis:
\begin{aligned} H_0 &: m = m_0 \end{aligned}
$m$ is the true median, $m_0$ is the proposed median.
1. Setup the alternative hypothesis as one of:
\begin{aligned} H_a &: m \neq m_0\\ H_a &: m > m_0\\ H_a &: m < m_0 \end{aligned}
2. Collect a random sample from the population.
3. Assign a 1 or 0 to each value in the data:
• $sign = 0 \; if value < m_0$
• $sign = 1 \; if value > m_0$
• remove value from sample if $value = m_0$
4. Sum all the signs to get $k$:
\begin{aligned} x &= \sum_{i=0}^{n-1} sign(value_i) \end{aligned}
5. Find $k$ on the binomial distribution:
• $n$ is the current sample size
• $p = 0.5$ (If $H_0$ is true, half are above, half are below)
6. Find the p-value:
• if $H_a$ uses <, add probabilities for $x \leq k$
• if $H_a$ uses >, add probabilities for $x \geq k$
• if $H_a$ uses $neq$, $p = 2 \times sum(x \geq k)$
7. Draw a conclusion:
If $p-value < alpha$ (0.05 for 95%), reject $H_0$. Otherwise don't reject.