Tutorials › VEE Mathematical Statistics › Deriving the Binomial Null Law of the Sign Test

VEE Mathematical Statistics · Sign and Wilcoxon Tests · Tutorial 834 of 880

Deriving the Binomial Null Law of the Sign Test

Learn how continuity, the median condition, and independence lead to the binomial null law for the sign count.

Intermediate 9 min read

What You'll Learn

  • Define the positive-sign indicator and the sign count under a hypothesized median.
  • Show why a continuous population with that median gives positive signs probability one-half.
  • Derive the binomial probability mass function from independent sign patterns.
  • Calculate sign-count probabilities and check their mean and variance.
  • Identify why ties, dependence, or an incorrect null probability can invalidate the binomial model.

Why a Sign Count Has a Probability Model

A sign-based location analysis reduces observations to a simple question: are they above or below a proposed center? To use the number above that center as a statistic, we need its probability distribution under the null condition. Under independence and a continuous population whose median is the null value, each observation is equally likely to fall on either side. The resulting positive-sign count has a binomial distribution.

The key is to separate three ideas: the population median, the probability of an individual positive sign, and the distribution of the total count. The median condition determines the probability for one observation; independence then determines how those signs combine. This derivation is aligned with the SOA VEE Mathematical Statistics syllabus.

Definition: Let \(X_1,\ldots,X_n\) be independent observations from a continuous population, and let \(\theta_0\) be the hypothesized median. Define \(I_i=1\) if \(X_i>\theta_0\), and \(I_i=0\) if \(X_i<\theta_0\). The positive-sign count is \(S=\sum_{i=1}^n I_i\). Under the null condition that the population median is \(\theta_0\), each \(I_i\) is Bernoulli with success probability \(1/2\), so \(S\sim\operatorname{Binomial}(n,1/2)\).

Continuity matters because it gives \(P(X_i=\theta_0)=0\): an observation equals the hypothesized value with probability zero. Thus each observation contributes either a positive or a negative sign, with probability one. In practice, rounded measurements can show ties even when an underlying measurement model is continuous; such recorded ties require care because they are not covered by the no-tie model as stated.

From the Median Condition to One Fair Sign

For a continuous random variable \(X\), a value \(\theta_0\) is a median when half the probability lies on each side. In cumulative distribution notation, continuity at \(\theta_0\) and the median condition give \(F_X(\theta_0)=1/2\). Since there is no probability mass at \(\theta_0\), the probability of being strictly above it is also one-half:

$$ P(X>\theta_0)=1-F_X(\theta_0)=\frac{1}{2}, \qquad P(X<\theta_0)=F_X(\theta_0)=\frac{1}{2}. $$

The same argument applies to paired data after forming differences. If the independent differences \(D_1,\ldots,D_n\) come from a continuous population with hypothesized median difference \(\theta_0\), count the \(D_i\) that exceed \(\theta_0\). In the common special case \(\theta_0=0\), these are the positive paired differences.

The null condition applies to the population, not to the observed sample proportion. A particular sample can have more positive than negative signs, or the reverse. The null model says that before observing the sample, each independent sign has probability one-half of being positive.

Worked Example: Counting Signs Under a Uniform Median

A hypothetical analyst samples eight independent measurements from a continuous uniform population on the interval from 10 to 18. The null value is 14. Find the probability of exactly three positive signs and the probability that the positive-sign count is between two and five, inclusive.

Method and model. For a uniform distribution, the median is the midpoint of the interval: \( (10+18)/2=14 \). The probability of a value above 14 is the length of the upper half divided by the full length: \( (18-14)/(18-10)=4/8=1/2 \). The observations are independent and continuous, so \(S\sim\operatorname{Binomial}(8,1/2)\).

Exactly three positives. There are \(\binom{8}{3}=56\) ways to choose which three observations are positive. Each particular sign pattern has probability \((1/2)^8=1/256\). Therefore,

$$ P(S=3)=\binom{8}{3}\left(\frac12\right)^3 \left(\frac12\right)^5 =\frac{56}{256} =0.21875 \approx 0.2188. $$

The probability is rounded to four decimal places. The factor \((1/2)^3(1/2)^5\) accounts for the three positive and five negative signs; together, the eight signs contribute \((1/2)^8\).

Between two and five, inclusive. Add the four disjoint count probabilities:

$$ \begin{aligned} P(2\leq S\leq 5) &=\sum_{k=2}^{5}\binom{8}{k}\left(\frac12\right)^8\\ &=\frac{\binom82+\binom83+\binom84+\binom85}{256}\\ &=\frac{28+56+70+56}{256} =\frac{210}{256} =0.8203125 \approx 0.8203. \end{aligned} $$

The probabilities for all possible counts sum to one because \(\sum_{k=0}^{8}\binom{8}{k}=2^8=256\). This checks the denominator and the binomial calculation. The common mistake avoided here is to treat the observed signs as if their count had to be exactly half the sample; the model assigns probabilities to every count from zero through eight.

Deriving the Binomial Null Law

For each observation, write \(I_i=1\) when it is above \(\theta_0\), and \(I_i=0\) otherwise. The median and continuity argument gives \(P(I_i=1)=P(I_i=0)=1/2\). Independence of the observations makes their indicators independent as well.

To obtain exactly \(k\) positive signs, choose which \(k\) of the \(n\) observations are positive. There are \(\binom{n}{k}\) such choices. For any one specified choice, independence gives probability \((1/2)^k(1/2)^{n-k}=(1/2)^n\). The events corresponding to different choices are disjoint, so their probabilities add.

$$ P(S=k) =\binom{n}{k}\left(\frac12\right)^k \left(\frac12\right)^{n-k} =\binom{n}{k}\left(\frac12\right)^n, \qquad k=0,1,\ldots,n. $$

This is the probability mass function of a binomial random variable with sample size \(n\) and success probability \(1/2\). More generally, independence is what makes the product probability for a sign pattern valid. Identical distributions are not essential if the observations are independent and each has probability \(1/2\) of being above the null value; under those conditions the same binomial result follows.

Theorem: If \(X_1,\ldots,X_n\) are independent, each has a continuous distribution with median \(\theta_0\), and \(S\) counts the observations greater than \(\theta_0\), then \(S\sim\operatorname{Binomial}(n,1/2)\). In particular, \(P(S=k)=\binom{n}{k}/2^n\), \(E[S]=n/2\), and \(\operatorname{Var}(S)=n/4\). The conclusion does not follow from the median condition alone if the signs are dependent or if the population has probability mass at the null value.

The mean and variance follow by writing \(S\) as the sum of \(n\) independent Bernoulli indicators. Each has mean \(1/2\) and variance \((1/2)(1/2)=1/4\). Therefore,

$$ E[S]=\sum_{i=1}^n E[I_i]=\frac n2, \qquad \operatorname{Var}(S)=\sum_{i=1}^n\operatorname{Var}(I_i)=\frac n4. $$

The variance sum has no covariance terms because the indicators are independent. This is a useful check on the scale of the count: its standard deviation under the null is \(\sqrt{n}/2\), not \(n/4\).

Worked Example: A Skewed Population With the Same Sign Law

Suppose independent measurements have the form \(X=E-(\ln 2)/2\), where \(E\) has an exponential distribution with rate 2. Four measurements are taken, and the hypothesized median is zero. Find the probability that all four signs are the same, either all positive or all negative.

Method and model. For an exponential random variable with rate 2, \(P(E>t)=e^{-2t}\) for \(t\geq0\). Its median \(m\) solves \(P(E>m)=1/2\), so \(e^{-2m}=1/2\), which gives \(m=(\ln 2)/2\). Subtracting this median makes the median of \(X\) equal to zero.

A measurement is positive exactly when \(E>(\ln 2)/2\). Hence

$$ P(X>0)=P\left(E>\frac{\ln 2}{2}\right) =e^{-2(\ln 2)/2} =e^{-\ln 2} =\frac12. $$

The exponential population is skewed, but continuity and the median condition still give a one-half probability for a positive sign. Independence therefore gives \(S\sim\operatorname{Binomial}(4,1/2)\).

All four positive. There is one sign pattern, so \(P(S=4)=(1/2)^4=1/16=0.0625\). All four negative. Similarly, \(P(S=0)=1/16=0.0625\). These events are disjoint, giving

$$ P(S=0\text{ or }S=4) =P(S=0)+P(S=4) =\frac{1}{16}+\frac{1}{16} =\frac18 =0.1250. $$

The result is checked by adding two equally likely extreme sign patterns out of \(2^4=16\) possible patterns. The common mistake avoided is assuming that the population must be symmetric for the sign probability to be one-half. A continuous population with the stated median is sufficient; symmetry is not required.

When the Binomial Model Does Not Apply

The binomial null law depends on its assumptions. A median condition alone does not guarantee that every observation produces a fair positive-versus-negative sign if the population has a point mass at the hypothesized value. Also, even fair individual signs do not produce the stated binomial count if the signs are dependent. The following example shows why ties can matter.

Worked Example: A Median With a Point Mass at the Null

A hypothetical discrete population assigns probability 0.20 to \(-1\), probability 0.60 to 0, and probability 0.20 to 1. The hypothesized median is zero. For five independent observations, find the probability of exactly two positive observations among all five. Then find the conditional probability of exactly one positive sign if exactly two observations are nonzero and the zero observations are omitted.

Method and model. Zero is a median because the probability at or below zero is \(0.20+0.60=0.80\), and the probability at or above zero is \(0.60+0.20=0.80\). But the probability of a strictly positive observation is only \(0.20\), not \(0.50\). The continuous-population theorem does not apply.

Let \(S\) count positives among all five observations. Each observation is positive with probability 0.20, independently, so \(S\sim\operatorname{Binomial}(5,0.20)\). Thus,

$$ P(S=2)=\binom52(0.20)^2(0.80)^3 =10(0.04)(0.512) =0.2048. $$

Now let \(N\) be the number of nonzero observations. Each is nonzero with probability \(0.20+0.20=0.40\). Conditional on being nonzero, an observation is positive with probability \(0.20/0.40=1/2\). Given that exactly two observations are nonzero, their signs are independent and equally likely to be positive or negative. Therefore, the conditional probability of exactly one positive among those two is

$$ P(\text{one positive}\mid N=2) =\binom21\left(\frac12\right)^1\left(\frac12\right)^1 =\frac12. $$

The two calculations answer different questions: the first counts positives among all five original observations, while the second conditions on two nonzero observations and counts signs only among those. The common mistake avoided is applying a binomial distribution with probability \(1/2\) to the total count when ties have positive probability and are included as nonpositive observations.

Assumptions and Exam Traps

Before using the binomial null law, identify the observations whose signs are being counted and verify the conditions for the model. In a paired location question, the observations are usually the paired differences, not the two original measurements treated as independent data. The null value is the proposed median of those differences.

  • Using the observed fraction as the null probability. The null sign probability is \(1/2\) under the stated continuous-median assumptions. It is not replaced by the fraction of positive signs observed.
  • Counting ties without checking the model. A truly continuous population has zero probability of an exact tie at the null value. A point mass or rounded measurement can create ties, and the simple no-tie derivation no longer directly describes the count.
  • Assuming a median implies fair signs in every population. With a discrete population, a median can have substantial probability mass at the null, so the probability of a strictly positive value need not be \(1/2\).
  • Ignoring dependence. The probability of a specified pattern is a product only when the signs are independent. Correlated observations can have fair individual signs but a non-binomial total count.
  • Confusing a sign count with an average. \(S\) counts positive signs; it is not the sample mean or the sum of the original measurements.

The derivation is useful because it identifies exactly what justifies the reference distribution: a continuous population gives equal probabilities on either side of its median, and independence combines those probabilities into a binomial count. If either ingredient is missing, the distribution must be reconsidered rather than assumed.

Check Your Understanding

For each problem, identify the sign-count model before calculating. Give probabilities to four decimal places when needed.

  1. Five independent observations come from a continuous uniform population on the interval from 40 to 60. The null median is 50. Find the probability of exactly two positive signs. (Answer: \(0.3125\))
  2. Under the continuous-median null, seven independent observations are recorded. Find the probability of at least six positive signs. (Answer: \(0.0625\))
  3. Let \(X=E-(\ln 2)/1.5\), where \(E\) is exponential with rate 1.5. For six independent observations, find the probability of exactly three positive signs relative to null median zero. (Answer: \(0.3125\))
  4. A discrete population assigns probabilities 0.25, 0.50, and 0.25 to \(-2\), 0, and 3, respectively. In four independent observations, find (a) the probability of exactly one positive among all four and (b) the probability of exactly one positive given that exactly two observations are nonzero. (Answer: (a) \(0.4219\); (b) \(0.5000\))
  5. Three independent observations have different continuous distributions, but each distribution has the same median \(\theta_0\). Let \(S\) count observations above \(\theta_0\). Find \(P(S=1)\), and state why the binomial model is still valid. (Answer: \(0.3750\); each independent observation has positive-sign probability \(1/2\), so \(S\sim\operatorname{Binomial}(3,1/2)\))
Clinical Biostats