PROBABILITY MODEL CHECKS

Checking a repeated label through the all-distinct complement

The probability that at least one label repeats equals one minus the probability that all labels are distinct. Count the all-distinct ordered draws and divide by the total number of ordered draws.

Counting the easy event instead of the hard one

Asking for the chance that some label appears at least twice sounds like a long case analysis: exactly one pair, two pairs, a triple, and so on. The complement is far simpler. The only way to avoid a repeat is for every draw to land on a different label, and that single pattern can be counted directly. Subtracting its probability from 1 gives the probability of a repeat in one step. This page applies the idea to three independent uniform draws from five labels, using the permutation calculator, the power calculator and the complement calculator, one for each stage of the argument.

The total number of ordered outcomes

Each draw has 5 equally likely labels, and the draws are independent, with replacement. The number of ordered sequences of three draws is 5 × 5 × 5 = 5³ = 125. The power calculator gives this directly with base 5 and exponent 3. Every sequence has the same probability, 1/125, which is why counting works as probability. The phrase "ordered" matters: the sequence A, B, A is treated as different from B, A, A, because the positions are different draws. Counting the all-distinct case must use the same convention, or the ratio will mix two kinds of outcome.

The all-distinct ordered outcomes

For all three labels to differ, the first draw has 5 choices, the second must avoid the first label and has 4, and the third must avoid both and has 3. That gives 5 × 4 × 3 = 60 sequences, which is the permutation count P(5, 3) = 5! / 2!. The permutation calculator returns 60. The probability of no repeat is 60 / 125 = 0.48. Because the numerator and the denominator are both counts of ordered sequences, the ratio is a valid probability under the stated model of equally likely labels.

The complement is the repetition probability

The probability of at least one repeated label is 1 − 0.48 = 0.52. The complement probability calculator performs exactly that subtraction: input 0.48, output 0.52. A little more than half of the three-draw sequences contain a repeat, even though only three draws were made from five labels. People often expect this to be smaller, because the three draws seem unlikely to collide when there are five choices. With few labels, each new draw has a large chance of matching an earlier one, and the chances add up faster than intuition suggests.

Dice and other small label sets

Roll a six-sided die three times. The number of ordered outcomes is 6³ = 216, and the all-distinct outcomes number P(6, 3) = 120. The probability of no repeat is 120 / 216 ≈ 0.5556, and the probability of a repeat is about 0.4444. With ten labels and four draws, the totals are 10⁴ = 10000 and P(10, 4) = 5040, so no repeat has probability 0.504 and a repeat has 0.496. Each example uses the same three steps: count all ordered outcomes, count the ordered distinct outcomes, and subtract the ratio from 1.

The birthday-style growth

The same logic produces the well-known birthday result. With 365 equally likely birth dates and 23 people, the probability that all dates are distinct is 365 × 364 × … × 343 / 365²³, about 0.4927, so the probability of a shared date is about 0.5073. Few people expect a better-than-even chance with only 23 people. The explanation is the number of pairs: 23 people form 253 pairs, and each pair is a chance for a match. The model assumes 365 equally likely dates, so it ignores leap days and uneven birth patterns. The result illustrates the method rather than describing a particular group.

Where the uniform model breaks down

The count ratio requires every label to be equally likely and the draws to be independent. If some labels are more common, the sequences no longer share one probability, and repeats become more likely than the uniform calculation says. If the draws are made without replacement, repeats are impossible by construction. Sequences generated by a person, such as chosen names or passwords, are rarely uniform. The calculation therefore applies to the idealized model only. It makes no claim about security, and it does not tell you how many characters or digits an identifier system should use.

The general product formula

For n labels and r draws with replacement, the probability that all draws are distinct is n × (n − 1) × … × (n − r + 1) / nʳ, which is P(n, r) / nʳ. The probability of at least one repeat is 1 minus that ratio. Written as a running product, it is the product of (1 − i/n) for i from 0 to r − 1, where each factor is the chance that draw number i + 1 avoids the i labels already used. For n = 5 and r = 3 the factors are 1, 0.8 and 0.6, whose product is 0.48. Seeing the formula as a product of shrinking factors explains why the repeat probability climbs quickly once r reaches about the square root of n, a rule of thumb that matches the birthday result.

Checking the arithmetic

Three quick checks help. The distinct count must not exceed the total, so 60 ≤ 125. The probability of no repeat, 0.48, plus the probability of a repeat, 0.52, must total 1. And if the number of draws exceeds the number of labels, the distinct count must be zero, so a repeat is certain: four draws from three labels always repeat. Entering r larger than n in the permutation calculator is not a valid selection, so the tool rejects it, which agrees with the rule. These checks catch the common slip of using combinations, which ignore order, where permutations are needed. Using C(5, 3) = 10 for the distinct count would give 10 / 125 = 0.08, a probability of no repeat that is far too small, because each unordered set of three labels corresponds to 3! = 6 orderings. Multiplying 10 by 6 returns the correct 60. The reverse slip is counting unordered sets in the denominator of a replacement model, where sets such as two A labels and one B label would not be equally likely. Stay with ordered outcomes on both sides of the ratio, because only ordered sequences share one probability in this model. A final habit worth keeping is to write the draw count and label count beside the result, since 0.52 means nothing without the 3 and the 5.

Reproduce the checks

All-distinct ordered outcomes

Open the Permutation calculator and enter:

Total items n
5
Positions r
3

Expected output:

Permutations

60

Each later draw avoids the previously used labels in the complement event.

All ordered replacement outcomes

Open the Power calculator and enter:

Base
5
Exponent
3

Expected output:

Power

125

Each draw has all five label choices.

Repetition probability

Open the Complement Probability Calculator and enter:

Event probability
0.48

Expected output:

Probability event does not occur

0.52

Subtract the distinct-outcome probability from one.

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