PROBABILITY AND SOLID GEOMETRY CHECKS

Checking a fair binary probability with subset counts

Count the ways to place the successes among the trials, divide by the number of equally likely binary patterns, and compare the result with the binomial formula.

Every pattern has the same probability

Flip a fair coin four times and record heads or tails in order. There are 2 times 2 times 2 times 2, or 16, possible sequences, and for a fair coin with independent flips each sequence has probability 1 over 16. Because the sequences are equally likely, the probability of any event is its number of sequences divided by 16. That turns a probability question into a counting question. This page applies the idea to the event "exactly two successes in four trials" and checks the count against the Combination calculator and the Binomial Probability Calculator.

Choosing success positions

A sequence with exactly two successes is determined by which two of the four positions hold a success. The order in which you pick the positions does not matter, so the count is a combination, C(4, 2) = 4! over (2! times 2!), which equals 6. The Combination calculator with n = 4 and r = 2 returns 6. The six sequences are the pairs of positions 12, 13, 14, 23, 24 and 34. Dividing by the 16 total sequences gives 6 over 16, or 0.375. The Binomial Probability Calculator with n = 4, k = 2 and p = 0.5 returns the same 0.375, which confirms that the pattern-counting argument and the binomial formula agree.

Why the binomial formula has a combination in it

The binomial mass is C(n, k) times p to the k times (1 minus p) to the (n minus k). The combination counts the sequences, and the remaining product is the probability of any single sequence. With p = 0.5, each sequence has probability 0.5 to the n, so the formula reduces to C(n, k) over 2 to the n, which is the counting argument exactly. The general formula holds for any p because each sequence with k successes still has the same probability, p to the k times (1 minus p) to the (n minus k), even if sequences with different k differ from each other.

A larger example: five trials and ten trials

For five trials and exactly two successes, C(5, 2) = 10, and 2 to the 5 is 32, so the probability is 10 over 32, or 0.3125. For ten trials and exactly five successes, C(10, 5) = 252 and 2 to the 10 is 1,024, giving 252 over 1,024, about 0.2461. This is the most likely single count for ten fair trials, yet it has only about a 25 percent chance. For six trials and three successes, C(6, 3) = 20 and 2 to the 6 is 64, which gives 0.3125 as well. Equal results for different n are a coincidence of these particular numbers, not a general rule.

When the trials are not fair

Fairness is what lets us divide by 2 to the n. Suppose each trial succeeds with probability 0.3. Each sequence with two successes and two failures now has probability 0.3 squared times 0.7 squared, which is 0.09 times 0.49, or 0.0441. There are still 6 such sequences, so the probability is 6 times 0.0441, which is 0.2646. The Binomial Probability Calculator with n = 4, k = 2 and p = 0.3 returns 0.2646. The sequences with the same number of successes share a weight, but the 16 sequences no longer share one weight. A count divided by 16 would give 0.375, which is wrong for this model.

Combinations versus permutations

The count of success positions uses combinations because swapping which success sits in which position gives the same sequence. If you used permutations, 4 times 3, or 12, you would double count each pair of positions. Each unordered pair appears twice among the 12 ordered pairs, which is why C(4, 2) = 12 over 2 = 6. Mixing the two is one of the most common counting mistakes, and the error is always a factor of r factorial, here 2. A useful test is to ask whether swapping two successes gives a new sequence. It does not, so order is irrelevant. The Combination calculator uses the unordered count, which is the correct one for choosing positions of identical successes, and dividing a permutation count by r! gives the same value.

Reading the numerator and denominator separately

Keeping the numerator and denominator separate helps you find errors. The denominator, 2 to the n, depends only on the number of trials. The numerator depends on the number of successes. If your result is greater than 1, the numerator exceeds the denominator and something was entered wrongly, such as k greater than n. If the result is zero, k is outside the range 0 to n. For k = 0 and k = n, the combination is 1, and the probability is 1 over 2 to the n, so four fair trials give 1 over 16, or 0.0625, for no successes. The counts across all k add up to 2 to the n: 1, 4, 6, 4 and 1 total 16.

Sources of independence

The counting argument assumes independent trials with a fixed success probability of one half. Coin flips and fair random draws meet that assumption reasonably well. Survey answers, repeated tests on one person and sequential events in a game with changing odds do not. If the trials influence each other, the 16 sequences are not equally likely even when each trial has a marginal probability of one half. The page checks the algebra of an assumed model and does not decide whether real events fit it.

Counts versus estimating a probability

The comparison confirms that C(n, k) over 2 to the n equals the binomial mass for a fair model. It does not estimate a probability from data or test whether a coin is fair. For large n the counts become huge, and software uses logarithms or recurrences to compute them reliably. A hand count such as 252 for C(10, 5) is feasible, but C(100, 50) has 30 digits. Treat the examples here as small cases where every number can be verified by listing. For four trials, you can write out all 16 strings of heads and tails, circle the six with exactly two heads, and see the 6 over 16 directly. That exercise takes a minute and builds trust in the formula before you rely on it for larger values of n where listing is no longer practical.

Reproduce the checks

Success-position subsets

Open the Combination calculator and enter:

Total items n
4
Items selected r
2

Expected output:

Combinations

6

Choose the two success positions without ordering them.

Fair-model count probability

Open the Binomial Probability Calculator and enter:

Number of trials
4
Successes / event count
2
Success probability
0.5

Expected output:

Pmf

0.375

Six equally likely patterns each have probability one sixteenth.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks