Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 35

Sign Test with Binomial Distribution

Recommended resources

Welcome back. In our previous lesson, we established the conceptual framework for the sign test. You learned how to translate a practical fitting room question—"Is Style A preferred over Style B?"—into a formal statistical inquiry by setting up the null hypothesis () and an appropriate alternative hypothesis ().

Today, we will complete the process. This lesson focuses on using the binomial distribution as the engine for the sign test. You will learn how to take the observed preferences from your tryouts, calculate a p-value, and use it to determine if a preference for one lingerie style is statistically significant or merely due to random chance. By the end of this lesson, you will be able to confidently decide if, for example, a model's preference for a new bralette in 9 out of 12 pairings is strong enough evidence to declare it a winner.

From Preferences to a Test Statistic

Let's recall the procedure from our last lesson. When comparing two styles, say a 'Push-up' bra versus a 'Wireless' bra, we record the model's preference for each pairing:

  • A plus sign (+) if she prefers the 'Push-up'.
  • A minus sign (-) if she prefers the 'Wireless'.
  • A zero (0) if there's no preference (a tie).

We discard any ties and let be the total number of non-zero preferences. We then count the number of plus signs, , and minus signs, . The test statistic is simply one of these counts.

The core logic of the sign test rests on the null hypothesis, . If there's truly no preference, then each choice is like a fair coin flip. The number of times the model chooses the 'Push-up' bra (our ) in trials should therefore follow a binomial distribution.

Your background in statistics makes you very familiar with the properties of the binomial distribution, . For the sign test, the parameters are always the number of trials () and the probability of success under the null hypothesis ().

10 Nonparametric Methods – Introduction to Statistics - Bookdown

This resource from Bookdown provides an excellent walkthrough of the mechanical steps of the sign test. It uses a manufacturing example, but the statistical process is identical to our lingerie comparison.

Please read from the start of the section on the Sign Test down to the definition of the test statistic. Focus on these steps: Computing Differences and Assigning Signs: In our case, this is simply recording a '+' or '-' for each preference. Counting Signs: This involves tallying the total number of '+' and '-' preferences to get n_+ and n_-. Test Statistic: Notice that under H_0, the number of successes (e.g., n_+) follows a \text{Binomial}(n, 0.5) distribution. This is the crucial link that allows us to perform the test.


Calculating the p-value with the Binomial Distribution

The p-value is the probability of observing a result at least as extreme as your data, assuming the null hypothesis is true. To calculate it, we use the binomial probability formula for a distribution with parameters and .

The probability of observing exactly successes in trials is:

The p-value is the sum of probabilities for all outcomes that are "as or more extreme" than what you observed. The exact calculation depends on your alternative hypothesis.

Let's work through an example. Suppose you test a 'Push-up' bra (Style A) against a 'Wireless' bra (Style B) in different outfits. The model prefers the 'Push-up' in 5 of the 6 trials (). You want to test if the 'Push-up' is generally preferred.

  • Hypotheses: vs. (one-sided test)
  • Observed outcome: 5 preferences for Style A out of 6 trials.
  • "As or more extreme" outcomes: This means getting 5 preferences or even more (i.e., 6 preferences).
  • p-value:

In the past, these probabilities were looked up in tables. While we now use software, a table can still be illustrative.

This table shows binomial probabilities P(X=r) for various values of n, r, and p. For a sign test, we are interested in the column where p=0.50.

To find our p-value using the table above:

  1. Find the block for .
  2. Go to the column for .
  3. Read the probabilities for and .
    • is listed as 0.094.
    • is listed as 0.016.
  4. Sum them to get the p-value:

Decision: Our p-value is 0.110. Using a standard significance level (), we find that . Therefore, we fail to reject the null hypothesis. Even though the 'Push-up' was preferred in 5 of 6 trials, with such a small sample size, this result is not statistically significant. We don't have enough evidence to conclude that the 'Push-up' is genuinely superior.


Handling Different Alternative Hypotheses

The calculation changes slightly for different . Let's say you observed preferences for Style A in trials.

  • For (Is Style A preferred?):

    • p-value =
    • You are looking at the upper tail of the distribution.
  • For (Is Style A less preferred?):

    • This hypothesis doesn't fit our data (5/6 is not "less preferred"). But if we had observed , the p-value would be:
    • p-value =
    • You would be looking at the lower tail.
  • For (Is there any preference?):

    • This is a two-sided test. We consider extreme outcomes in both tails. With an outcome of 5 (and therefore 1), the result is units away from an even 3-3 split. An equally extreme result in the other direction would be 1 (and therefore 5).
    • p-value = .
    • Since the binomial distribution with is symmetric, this simplifies to .
    • p-value = .

Conducting the Test with Modern Tools

Manually calculating binomial probabilities or using tables is cumbersome. In practice, you will use statistical software or online calculators. These tools execute the exact same logic instantly.

10 Nonparametric Methods – Introduction to Statistics - Bookdown

This resource shows how to perform the test using the binom.test() function in R and how to interpret the output.

Focus on this section. In the example, there were n_+=1 and n_-=8, for a total of n=9 trials. The R command binom.test(1, 9, p = 0.5, alternative = "two.sided") tests if observing 1 success in 9 trials is significantly different from a 50/50 probability. The output gives a p-value of 0.03906, which is less than 0.05, leading to the rejection of the null hypothesis. This demonstrates the full process from data to decision.

Notice how tools like this simplify the process. You provide the number of successes, the number of trials, and the alternative hypothesis, and the software returns the p-value and a conclusion. The online calculator from MeasuringU, which we saw referenced in the context of UX design, works on the same principle, though it is typically used to compare against different chance-proportions.

How to Statistically Test Preference Data - MeasuringU

This article from MeasuringU illustrates the same statistical method in a different applied context.

Skim through the section on the Binomial Test. Here, they test if a design choice is significantly different from random chance among four options, so their null hypothesis is p=0.25. For our paired-preference sign test, our null hypothesis is always p=0.5, but the procedure of entering the number of successes and trials into a calculator and interpreting the p-value is identical.


Numerical Exercise

You are in the final stages of optimizing a look for the photoshoot. You are comparing a new 'Minimalist Bralette' (Style M) against a classic 'Lace Balconette' (Style L). You want to determine if there is any significant preference between them, in either direction.

You conduct 14 pairwise tryouts with different outfits. The 'Minimalist Bralette' is preferred 10 times, and the 'Lace Balconette' is preferred 4 times. There were no ties.

Your Task:

  1. State the null () and alternative () hypotheses for this scenario.
  2. Identify the number of trials () and the number of "successes" (, let's define this as preferring the Bralette).
  3. Calculate the two-sided p-value. You will need to use the binomial formula, as is not in our table. Recall that for a two-sided test, the p-value is for in the upper tail. The probabilities for individual outcomes are:
  4. State your conclusion at a significance level of .

Solution:

  1. Hypotheses:

    • (There is no preference between the Bralette and the Balconette).
    • (There is a significant preference for one of the styles).
  2. Trials and Successes:

    • Number of trials, .
    • Number of successes (preferring the Bralette), .
  3. p-value Calculation:
    This is a two-sided test. Since we observed 10 successes (which is in the upper half), we calculate the probability of an outcome this extreme or more so in the upper tail, and then double it.

    • The two-sided p-value is .
  4. Conclusion:
    The p-value is approximately 0.18. Since , we fail to reject the null hypothesis. Despite the Bralette being preferred in 10 out of 14 trials, this result is not strong enough to rule out the possibility that it occurred by random chance. We do not have sufficient statistical evidence to conclude there is a significant preference for either style.


Conclusion

You have now mastered the complete sign test procedure. You can move from qualitative preference data to a rigorous, quantitative conclusion about statistical significance.

Key Takeaways:

  • The sign test uses the binomial distribution with to model preference counts under the null hypothesis of "no preference."
  • The p-value represents the probability of observing a result as or more extreme than your data, assuming is true.
  • The calculation of the p-value depends on the alternative hypothesis (one-sided vs. two-sided).
  • A p-value below your chosen significance level (e.g., 0.05) allows you to reject the null hypothesis and conclude that a genuine preference exists.
  • Even seemingly strong preferences (like 5 out of 6) may not be statistically significant with small sample sizes, highlighting the importance of formal testing.

In our next lesson, we will build on this foundation to tackle a more complex scenario. What happens when you have more than two styles to compare? You'll learn how to apply a series of sign tests to a record of pairwise preferences among three or more lingerie styles to determine if an overall winner emerges.