Binomial Distribution

Maths: Statistics for machine learning

2 min read

Published Oct 22 2025, updated Oct 23 2025


40
0
0
0

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)

Binomial PMF Formula

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:
Binomial Number Ways Formula

The sum of all probabilities = 1:

Binomial sum all ways Formula

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

Binomial Distribution

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

Products from our shop

Docker Cheat Sheet - Print at Home Designs

Docker Cheat Sheet - Print at Home Designs

Docker Cheat Sheet Mouse Mat

Docker Cheat Sheet Mouse Mat

Docker Cheat Sheet Travel Mug

Docker Cheat Sheet Travel Mug

Docker Cheat Sheet Mug

Docker Cheat Sheet Mug

Vim Cheat Sheet - Print at Home Designs

Vim Cheat Sheet - Print at Home Designs

Vim Cheat Sheet Mouse Mat

Vim Cheat Sheet Mouse Mat

Vim Cheat Sheet Travel Mug

Vim Cheat Sheet Travel Mug

Vim Cheat Sheet Mug

Vim Cheat Sheet Mug

SimpleSteps.guide branded Travel Mug

SimpleSteps.guide branded Travel Mug

Developer Excuse Javascript - Travel Mug

Developer Excuse Javascript - Travel Mug

Developer Excuse Javascript Embroidered T-Shirt - Dark

Developer Excuse Javascript Embroidered T-Shirt - Dark

Developer Excuse Javascript Embroidered T-Shirt - Light

Developer Excuse Javascript Embroidered T-Shirt - Light

Developer Excuse Javascript Mug - White

Developer Excuse Javascript Mug - White

Developer Excuse Javascript Mug - Black

Developer Excuse Javascript Mug - Black

SimpleSteps.guide branded stainless steel water bottle

SimpleSteps.guide branded stainless steel water bottle

Developer Excuse Javascript Hoodie - Light

Developer Excuse Javascript Hoodie - Light

Developer Excuse Javascript Hoodie - Dark

Developer Excuse Javascript Hoodie - Dark

© 2025 SimpleSteps.guide
AboutFAQPoliciesContact