Hongmu Notes

Calculation of the number of combinations in probability problems

The calculation of the number of combinations in probability questions is used to find the numerator and denominator: the number of favorable situations and the number of total situations are calculated using the number of combinations respectively, and divided to obtain the probability.
100% Browser local processing 0 Data upload

🎲 Factorials, permutations and combinations

💡 Instructions for use

  • If only n is filled in and r is not filled in, only the factorial is output; if both are filled in, the number of permutations and combinations will be given at the same time, which is suitable for checking together.
  • The input is calculated precisely with large integers: the factorial of 1000 has over two thousand digits, without scientific notation or loss of precision.
  • The result area will automatically check two identities: the factorial of the combination number multiplied by r is equal to the permutation number; C(n,r) is equal to C(n,n-r).
  • r must not be greater than n, otherwise the input error will be prompted; when n is 0, the factorial is 1, which conforms to mathematical conventions.

The calculation of the number of combinations in probability questions is used to find the numerator and denominator: the number of favorable situations and the number of total situations are calculated using the number of combinations respectively, and divided to obtain the probability.

Typical steps

  1. Find the total number of cases using the number of combinations, e.g. 2 out of 10 balls is C(10,2).
  2. Use the number of combinations to calculate the number of situations that meet the conditions. For example, getting 2 red balls is C(4,2).
  3. Divide the two to get the probability, and the result can be kept as a fraction or converted to a decimal.

When to use combination and when to use permutation

In the classical concept, if several elements are taken out at one time without distinguishing order, the numerator and denominator are both combined numbers. If it involves sorting, numbering or step-by-step extraction, permutation numbers must be used instead, and the calibers of the numerator and denominator must be consistent, otherwise wrong results will be obtained. The tool can calculate the number of combinations and permutations respectively, making it easy to compare the two calibers.

Common examples include touching the ball, drawing lots, lottery, grouping and selecting representatives. The methods are to first determine the caliber and then calculate the number of two combinations.

In probability calculations, the numerator is the number of situations that meet the conditions, and the denominator is the number of all equally possible situations. Both of them are often calculated by permutation or combination, so these types of questions are usually tested together.

The key to judging whether to use permutation or combination is "whether the order is treated as different results." The numerator and denominator must be of the same caliber, and mixing them is the most common source of error in this type of calculation.

The calibers of the numerator and denominator must be consistent. Mixing permutations and combinations is a typical error.

The calibers of the numerator and denominator must be unified: when the numerator uses a combination number, the denominator must also use a combination number.

📖 Glossary

factorial
The continuous product from 1 to n, written n!, stipulates that 0! is equal to 1.
arrange
Take r elements from n different elements and arrange them in a column in order. Different results will be calculated in different orders.
combination
Select r elements from n different elements, only looking at which ones are selected, not the order.
Number of permutations A(n,r)
The number of permutations is equal to the factorial of n divided by the factorial of (n-r), which can also be written as the multiplication of r consecutive numbers starting from n.
Number of combinations C(n,r)
The number of combinations is equal to the factorial of n divided by the factorial of r and the factorial of (n-r), often written as a binomial coefficient.
Symmetry
The number of combinations satisfies C(n,r) = C(n,n-r): there is a one-to-one correspondence between selecting r and leaving n-r.
recursion formula
C(n,r) = C(n-1,r-1) + C(n-1,r), which is the generation rule of Yang Hui's triangle.
Yang Hui triangle
A triangular number table obtained by arranging the combination numbers in n rows. The two ends of each row are 1, and the middle is the sum of the two numbers above.
Full arrangement
The arrangement when r is equal to n, the number of species is the factorial of n, represents the number of options to queue all elements.
large integer
An integer outside the range of ordinary floating point precision. The factorial grows extremely fast, and starting from n 21 is beyond the range that can be accurately represented by double precision.

🔗 All keywords and tutorials

Keywords page of the tool12a

Return to tool home page

❓ FAQ

There are several ways to get 2 out of 10 balls.?
45 species, namely C(10,2). You can get it by filling in n as 10 and r as 2. At the same time, you can calculate the probability of getting 2 specific balls.
Why can’t we use permutation numbers to calculate probability??
It can be used, but the numerator and denominator must use permutation numbers. Mixing two calibers will cause the number of permutations to be a sequential multiple greater than the number of combinations, resulting in distorted results.