Sign Test Calculator

Compare signs above, below, or across pairs. See ties, exact probabilities, confidence levels, and charts. Make defensible nonparametric decisions using transparent calculations and exports.

Calculator Form

Ties are removed automatically.

Exact p-values use the binomial model when feasible.

Large samples also show a normal approximation.

Example Data Table

This paired example compares two measurements for the same ten cases.

Case Sample A Sample B Difference Sign
112102+
215141+
31819-1-
4981+
514122+
616151+
720182+
8111100
91314-1-
1017152+

Formula Used

The sign test converts each difference into a direction.

For paired data, compute d = A - B.

For one-sample testing, compute d = x - m0.

If d > 0, assign a positive sign. If d < 0, assign a negative sign. If d = 0, treat it as a tie and remove it.

Let n be the number of non-tied observations. Let X be the number of positive signs.

Under the null hypothesis, X follows a binomial distribution:

X ~ Binomial(n, 0.5)

Two-sided exact p-value:

p = 2 × P(Binomial(n, 0.5) ≤ min(X, n - X))

Upper-tail exact p-value:

p = P(Binomial(n, 0.5) ≥ X)

Lower-tail exact p-value:

p = P(Binomial(n, 0.5) ≤ X)

The large-sample approximation uses:

z = (X - n/2 ± 0.5) / √(n/4)

The interval shown on this page is a Wilson interval for the positive sign proportion.

How to Use This Calculator

  1. Select paired mode for before-after or matched observations.
  2. Select one-sample mode to compare values against a hypothesized median.
  3. Pick the alternative hypothesis and alpha level.
  4. Paste numbers using commas, spaces, or new lines.
  5. Submit the form to see the summary, graph, and detailed sign table.
  6. Download CSV for spreadsheet work or PDF for reporting.

FAQs

1. What does the sign test measure?

It tests whether positive and negative differences are balanced. In paired work, it checks whether the median difference is zero. In one-sample work, it checks whether the population median matches a chosen reference value.

2. When should I use the sign test?

Use it when data are paired, ordinal, skewed, or resistant to strong distribution assumptions. It is useful when only direction matters more than the size of the difference.

3. How are ties handled?

Ties are observations with zero difference. The sign test removes them because they do not support either direction. The usable sample size becomes the count of non-tied observations.

4. Why are there exact and normal p-values?

The exact value comes from the binomial distribution and is preferred for small and moderate samples. The normal approximation is a convenient large-sample estimate and serves as a backup summary.

5. What is the positive sign proportion?

It is the share of non-tied observations with positive differences. Under the null hypothesis, that proportion should be near 0.5. Strong imbalance suggests evidence against the null.

6. Can I use this for before-and-after studies?

Yes. Enter the before values in Sample A and the after values in Sample B, or reverse the order if your alternative direction needs it. Interpretation follows the sign of A minus B.

7. Does the sign test use magnitudes?

No. It only uses direction. A very large positive difference and a tiny positive difference both count as one positive sign. That makes the method robust but less informative than rank-based tests.

8. What does “fail to reject” mean here?

It means the observed sign imbalance is not strong enough at the chosen alpha level. It does not prove the null hypothesis is true. It only means the sample evidence is insufficient.

Related Calculators

F-Test Statistic CalculatorMultiple Regression Summary Calculatorgoodness of fit calculatorempirical rule calculatorroot mean square calculatorpoisson distribution calculatorcritical value calculatorspearman rank calculatorz table calculatorconfidence level calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.