liveBook · Manning

Binomial coefficient

As explained in Grokking Bayes

A binomial coefficient is the number of ways to choose a specified number of items from a larger set, conventionally written as “n choose k.”

A binomial coefficient counts how many ways to choose a specified number of items from a larger group. “Five choose three” counts the possible groups of three people selected from five, regardless of their order. section 2.10

Written as “n choose k,” the binomial coefficient supplies the counting multiplier in a binomial likelihood. If exactly k successes occur among n trials, it counts the different arrangements that produce that result. section 2.10 section 3.4

Tea preferences

Suppose three of five surveyed people prefer tea. The coefficient “5 choose 3” counts every possible set of three tea drinkers. Multiplying this count by the probability of each arrangement gives the likelihood for observing three preferences when the tea-loving proportion is p. section 2.10

For computation, SciPy’s comb helper evaluates the coefficient directly. The result can be multiplied by p**k and (1-p)**(n-k) to calculate likelihoods across competing values of p. section 2.11

Use the equation to connect the counting term with the binomial likelihood. section 2.10

How Grokking Bayes covers it

How deep it goes
Defines the counting role, connects it to binomial expansion, and implements it with SciPy without developing combinatorics further.
Examples
Uses three tea preferences among five people and a SciPy likelihood calculation as concrete examples.
What it assumes
Assumes only basic counting and introduces the connection between selections, likelihoods, and binomial trials.
What you can do after
Apply it via SciPy’s comb function to calculate binomial likelihoods for observed successes.
How it connects
Connects combinatorics with binomial likelihood, binomial distribution, Bayesian inference, and binomial expansion.

Also explained in

Compare how 4 books explain binomial coefficient →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Bayes. The section links point to the parts of the book it draws on.