Binomial Distribution
Maths: Statistics for machine learning
2 min read
This section is 2 min read, full guide is 105 min read
Published Oct 22 2025, updated Oct 23 2025
40
Show sections list
0
Log in to enable the "Like" button
0
Guide comments
0
Log in to enable the "Save" button
Respond to this guide
Guide Sections
Guide Comments
Machine LearningMathsNumPyPandasPythonStatistics
The Binomial Distribution represents the probability of getting k successes in n independent Bernoulli trials,
where each trial has the same probability of success p.
In simple terms:
“If you repeat a yes/no experiment n times, what’s the probability of getting exactly k yes outcomes?”
Formula: Probability Mass Function (PMF)

Where:
- X = number of successes
- n = number of trials
- k = specific number of successes (0 ≤ k ≤ n)
- p = probability of success
- number of ways to choose k successes:

The sum of all probabilities = 1:

Examples:
- Coin toss - number of heads in 10 tosses
- Email opens - number of users who open email
- Loan approvals - number of approvals
- Product purchase - number of buyers

A bar chart showing the probability of getting 0, 1, 2, …, n successes, with the highest bar near the mean (np).
Example (n=10, p=0.5):
- Mean = 5 → distribution is centred around 5 successes
- Symmetrical since p=0.5
- Shape becomes skewed when p ≠ 0.5 (right- or left-skewed)
In Machine Learning
- Modelling count of successes - e.g., number of customers who convert
- Feature probability modelling - Discrete count features (e.g., binary outcomes repeated n times)
- Bernoulli → Binomial extension - Multiple independent binary outcomes
- Evaluation metrics - Used in hypothesis testing and confidence intervals for proportions














