logo

Combinations Formula: Examples, Order and Probability

Five conceptual financial research tickets with two selected together, illustrating an unordered pair.
20

The combinations formula counts how many ways you can select k distinct items from n distinct items when order does not matter and items are not replaced. It is C(n, k) = n! / [k!(n − k)!], also written n choose k.

Use it for questions about groups or subsets. Use a permutation formula when different orders count as different results. Before assigning a probability to either count, also define which outcomes are feasible and how likely they are.

What Does the Combinations Formula Count?

Suppose five items are labeled A, B, C, D, and E, and you want a group of two. The pair AB is the same group as BA. Choosing B first does not create an additional subset.

That is the distinction behind combinations. The labels identify distinct items, and the selection ignores their order. The MIT teaching slides on permutations and combinations present the counting relationship between ordered and unordered selections.

The formula assumes that each item can appear at most once in the group. It also assumes you know the number of eligible items. If two rows in your dataset represent the same underlying item, counting them as distinct changes the question.

These assumptions matter in financial examples. Choosing two events to research, two securities for a watchlist, and two orders to execute in sequence are different tasks, even when all three involve the number two.

How to Calculate n Choose k

For nonnegative integers with 0 ≤ k ≤ n:

C(n, k) = n! / [k!(n − k)!].

The factorial n! multiplies the integers from n down to 1. By convention, 0! = 1. The formula gives C(n, 0) = 1 because there is exactly one empty subset, and C(n, n) = 1 because there is exactly one way to select every item.

For five items taken two at a time:

C(5, 2) = 5! / (2! × 3!) = 120 / 12 = 10.

A shorter calculation cancels the common factorial terms:

C(5, 2) = (5 × 4) / (2 × 1) = 10.

The same symmetry gives C(5, 3) = 10. Choosing three items is equivalent to deciding which two to leave out. That is why C(n, k) and C(n, n − k) have the same value.

If k exceeds n, there are no such subsets without replacement. Some software returns zero for that case; other tools require valid inputs within the stated range. A negative or fractional item count needs a different mathematical interpretation than this ordinary counting problem.

Worked Example: Choose Two Events From Five

Imagine you have time to research two of five hypothetical events, labeled A through E. The eligible pairs are:

Starts with Pairs
A AB, AC, AD, AE
B BC, BD, BE
C CD, CE
D DE

The rows contain 4 + 3 + 2 + 1 = 10 pairs. Listing them gives an independent check on the formula.

This count does not tell you which pair deserves your attention. The events can differ in importance, available evidence, deadlines, or the time needed to understand them. Counting alternatives and evaluating alternatives are separate tasks.

It also does not mean that each pair has a 10% chance of being selected. That probability follows only if your selection method chooses uniformly from the ten pairs. A deliberate research process will usually apply some other rule.

The event labels are invented and do not refer to currently offered markets or a recommendation to trade a particular combination.

Ten unordered pairs from five labels: AB, AC, AD, AE, BC, BD, BE, CD, CE and DE.
The ten unordered pairs from A, B, C, D, and E verify C(5, 2) = 10. Each pair is counted once; reversing its labels does not create another combination.

Combinations Versus Permutations

A permutation counts ordered selections. Without replacement, the formula is:

P(n, k) = n! / (n − k)!.

For the same five items and two positions, P(5, 2) = 5 × 4 = 20. The ordered result AB differs from BA.

Question Count
Two-item group 10
First and second 20

For each unordered pair, there are 2! = 2 possible orders. Dividing the 20 ordered selections by two produces the ten groups. In general, dividing by k! removes the orderings within each selected group.

Ask whether swapping the selected items changes the result. If it does, order matters. If it does not, an unordered count is more likely to fit the question.

Do not confuse execution sequence with the eventual set of positions. Two sequences can lead to the same final holdings while producing different execution costs or risks along the way.

What Changes When Repetition Is Allowed?

If an item can be selected more than once, ordinary C(n, k) no longer describes the task.

For ordered selections with replacement, there are nᵏ possibilities. With five labels and two draws, that gives 5² = 25, including AA, BB, and other repeated pairs.

For unordered selections with repetition allowed, the number of multisets is C(n + k − 1, k). With five labels and two selections, that becomes C(6, 2) = 15.

The 15 unordered outcomes are not automatically equally likely if they arise from two independent uniform draws. AB can arise in two orders, while AA arises in only one. A count must be connected to the actual selection process before it becomes a probability.

This is a useful warning when spreadsheets combine groups, sequences, and repeated selections without distinguishing them. The formulas can all be correct while answering different questions.

From Counting Outcomes to Calculating Probability

For five independent binary events with the same success probability p, the probability of exactly two successes is:

P(exactly two) = C(5, 2) × p² × (1 − p)³.

The combination factor counts which two event positions contain the successes. It is not the probability by itself.

If p = 0.60 in a hypothetical model, the calculation is 10 × 0.60² × 0.40³ = 0.2304, or 23.04%. The site's binomial distribution guide explains the model and its assumptions.

Do not reuse that expression just because five market prices look similar. Market prices need not be your event probabilities, and events can be related. A shared announcement or a logical connection can violate independence.

The joint probability guide discusses combined events, while the hypergeometric distribution guide covers a different sampling situation without replacement.

Avoid Double-Counting and Impossible States

Start by writing one outcome in words. If selecting A and B is the same outcome as selecting B and A, do not count both. If an item cannot be selected twice, exclude AA before choosing a formula.

Also distinguish selecting two events from predicting two successful outcomes. The number of possible research pairs can remain ten even if the events are dependent. Their probabilities require more information.

Five binary labels have 2⁵ = 32 formal YES/NO patterns before restrictions are applied. That does not establish that all 32 patterns are possible. If some events are mutually exclusive or one implies another, the feasible set is smaller.

In a spreadsheet or program, use an integer combinatorics function when available. Computing enormous factorials separately can overflow or lose precision unnecessarily. For the small example, the direct list of ten pairs is an especially useful verification.

Count Roles Separately From Membership

Suppose the research task changes: select two events for full analysis and one different event as a backup. There are ten choices for the main pair. After choosing it, three events remain eligible as the backup, producing 10 × 3 = 30 role-specific selections.

Simply choosing three events from five gives ten groups, a different count. Each three-event group has three possible choices for which member is the backup. The additional role changes the outcome definition.

Write that definition before calculating. In a financial workflow, a primary holding, a hedge, and a reserve candidate can have different roles even if their labels come from the same list. A formula for unassigned membership will not automatically count those assignments.

Frequently Asked Questions

Why Do You Divide by k Factorial?

An unordered group of k distinct items has k! possible internal orders. An ordered count includes all those arrangements. Dividing by k! counts each group once.

Are Combinations Always Equally Likely?

No. The formula gives a count. Equal probabilities require a selection process or model that makes the counted outcomes equally likely. A weighted choice, a constrained process, or repeated draws can produce different probabilities.

Does the Formula Assume the Events Are Independent?

Counting subsets of distinct labels does not require their underlying events to be independent. Independence becomes relevant when you assign probabilities by multiplying individual event probabilities, as in the binomial example.

Author
Dale Hanson
Dale HansonCommunity Manager. X @InHansonWeTrust
Categories