Home / Maths for AI / Symbols / Probability and statistics

Binomial coefficient

Say it: "n choose k"

What it means

The number of ways to choose kk items from nn, ignoring order: (nk)=n!k! (n−k)!\binom{n}{k} = \frac{n!}{k!\,(n-k)!}.

Example

(52)=5!2! 3!=10\binom{5}{2} = \frac{5!}{2!\,3!} = 10

Pairs that can be made from 5 people.

In code

import math
print(math.comb(5, 2), math.comb(52, 5))

Output

10 2598960

Where it appears in machine learning

Probabilities of k successes in n tries (the binomial distribution), and counting feature combinations.

Related symbols

Learn it properly in the free lesson Probability & Distributions, with practice questions that check your answers.