Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Binomial Distribution Calculator

Enter the number of trials n, the probability of success on each trial p, and the number of successes k. You get the probability of exactly k successes, the cumulative probabilities of at most k and at least k, the mean, variance and standard deviation, and a bar chart of the whole distribution.

Enter the probability p as a decimal from 0 to 1 (for 25%, enter 0.25) or as a fraction such as 1/4. n is a whole number from 1 to 50, and k is a whole number from 0 to n.
Result and graph
Enter the number of trials and the probability in the fields on the left and press "Calculate". The result and a bar chart of the distribution will appear here.

What you can do on this page

  • Enter just 3 numbers to find "the probability that something with probability \(p\) happens exactly \(k\) times in \(n\) tries", \(P(X = k) = {}_{n}\mathrm{C}_{k}\, p^{k} (1-p)^{n-k}\), on the spot
  • The answer is shown both as a fraction in lowest terms such as \(\dfrac{3}{8}\) (the exact value) and as a decimal and percent. You can also see the steps for the number of combinations \({}_{n}\mathrm{C}_{k}\)
  • It also finds the cumulative probabilities, "at most \(k\) times" \(P(X \le k)\) and "at least \(k\) times" \(P(X \ge k)\), at the same time
  • It shows the expected value \(E(X) = np\), the variance \(V(X) = np(1-p)\) and the standard deviation \(\sigma\), and checks the rule of thumb for using the normal approximation
  • The whole distribution, from 0 up to \(n\) successes, is drawn as a bar chart, so you can see at a glance which counts are most likely
This works for repeated trials where the probability is the same every time and the results do not affect each other (they are independent). It does not work when the probability changes from one try to the next, such as drawing tickets without putting them back.

What is this calculation used for?

Estimating "k wins out of n" for loot boxes and prize draws (games)

If you open 100 loot boxes (or gacha pulls) with a 1% drop rate, the number of rare drops follows the binomial distribution \(B(100,\ 0.01)\) (assuming, as published, that each try has the same chance and is independent). The chance of getting nothing at all is \(0.99^{100} \approx 36.6\%\), so the distribution shows that the gut feeling "100 tries at 1% is almost a sure thing" is risky.
Estimating "the expected value \(np\) plus the spread" when you plan how much to spend is exactly the calculation on this page.

Designing acceptance rules for sampling inspection (manufacturing and quality control)

Instead of checking every item, factories use acceptance sampling: "take \(n\) items from a lot, and accept the lot if there are \(c\) or fewer defects". The chance that a lot with a defect rate \(p\) is accepted is exactly the cumulative binomial probability \(P(X \le c)\). For example, if you take 20 items from a lot with a 1% defect rate and accept it only with 0 defects, the chance of acceptance is \(0.99^{20} \approx 81.8\%\).
This calculation is used to design inspection rules that accept good lots with high probability and reject bad ones.

Estimating lucky guesses on multiple-choice tests (education and exams)

If you guess on all 20 questions of a test with 4 choices each, the number of correct answers follows the binomial distribution \(B(20,\ 0.25)\), and the expected value is \(20 \times 0.25 = 5\) questions. The chance of getting 8 or more right by luck is only about 10%, which confirms with probability that guessing alone rarely reaches a passing score.
Test makers also keep this distribution in mind when they set the number of questions and the passing score, so that it is hard to pass by luck.

Reading the ups and downs of sports stats (basketball and more)

When a 70% free-throw shooter takes 10 shots, the chance of making exactly 7 is only \({}_{10}\mathrm{C}_{7} \times 0.7^{7} \times 0.3^{3} \approx 26.7\%\) (treating each shot as independent with a fixed success rate). A 70% shooter making exactly 7 of 10 is not as ordinary as it sounds. Making 6 or 8 happens all the time.
The binomial distribution helps you tell how much of a "hot streak" or "slump" is just normal random variation.

Where the margin of error in polls and TV ratings comes from (surveys)

In approval rating polls and TV ratings, the number of people out of the \(n\) surveyed who give a certain answer is treated as following a binomial distribution. The "plus or minus a few points" margin of error is calculated from the standard deviation \(\sqrt{np(1-p)}\) and the normal approximation.
Deciding how many people to survey to get the margin of error down to a target size is based directly on the properties of the binomial distribution.

Formulas and graphs

Binomial probability (probability of exactly \(k\) successes)
Graph
Standard notation (the usual math form)
\(P(X = k)\) \(=\) \({}_{n}\mathrm{C}_{k}\) \(\times\) \(p\) \(k\) \(\times\) \((1 - p)\) \(n - k\)
In words (symbols replaced with words)
⑥ \(P(X = k)\): probability of exactly \(k\) successes \(=\) ⑤ \({}_{n}\mathrm{C}_{k}\): ways to choose which trials succeed \(\times\) ① \(p\): probability of success ② \(k\): number of successes \(\times\) ③ \(1 - p\): probability of failure ④ \(n - k\): number of failures
The formula in words
① Take the \(p\): probability of success
② and multiply it by itself as many times as the \(k\): number of successes
③ then take the \(1 - p\): probability of failure
④ and multiply it by itself as many times as the \(n - k\): number of failures
⑤ multiply the results by the \({}_{n}\mathrm{C}_{k}\): ways to choose which trials succeed
⑥ and you get the \(P(X = k)\): probability of exactly \(k\) successes
Quick example
If you flip a coin (probability of heads \(\dfrac{1}{2}\)) 4 times, the probability of exactly 2 heads is
probability of exactly 2 \(P(X = 2)\) \(=\) number of orders \({}_{4}\mathrm{C}_{2}\) \(\times\) heads \(\dfrac{1}{2}\), twice \(\times\) tails \(\dfrac{1}{2}\), twice
\({}_{4}\mathrm{C}_{2} = \dfrac{4 \times 3}{2 \times 1} = 6\)
\(P(X = 2) = 6 \times \left(\dfrac{1}{2}\right)^{2} \times \left(\dfrac{1}{2}\right)^{2} = \dfrac{6}{16} = \dfrac{3}{8}\ \ (37.5\%)\)
Key idea
The probability of one particular order with \(k\) successes and \(n-k\) failures is \(p^{k} (1-p)^{n-k}\). There are \({}_{n}\mathrm{C}_{k}\) such orders (ways to choose which trials are the successes), so multiplying by that number gives the answer. The distribution that collects the probability of every possible count \(X\) (0, 1, …, \(n\) successes) is called the binomial distribution and is written \(B(n,\ p)\). The calculator on this page draws the whole distribution as a bar chart.
Cumulative probability (at most \(k\) and at least \(k\) successes)
Standard notation (the usual math form)
\(P(X \le k)\) \(=\) \(P(X=0) + P(X=1) + \cdots + P(X=k)\)
\(P(X \ge k)\) \(=\) \(1\) \(-\) \(P(X \le k - 1)\)
In words (symbols replaced with words)
② \(P(X \le k)\): probability of at most \(k\) \(=\) ① sum of the probabilities of exactly 0 through exactly \(k\)
⑤ \(P(X \ge k)\): probability of at least \(k\) \(=\) ③ \(1\): total probability \(-\) ④ probability of at most \(k-1\)
The formula in words
① Add up all the probabilities of exactly 0, exactly 1, …, exactly \(k\)
② and you get the \(P(X \le k)\): probability of at most \(k\)
③ For "at least \(k\)", the complement gives a shorter calculation. Start from the \(1\): total probability
④ subtract the \(P(X \le k-1)\): probability of at most \(k-1\)
⑤ and you get the \(P(X \ge k)\): probability of at least \(k\)
Quick example
If you flip a coin 4 times, the probability of at most 2 heads and the probability of at least 2 heads are
probability of at most 2 \(P(X \le 2)\) \(=\) sum for 0, 1 and 2
\(P(X \le 2) = \dfrac{1}{16} + \dfrac{4}{16} + \dfrac{6}{16} = \dfrac{11}{16}\ \ (68.75\%)\)
\(P(X \ge 2) = 1 - P(X \le 1) = 1 - \dfrac{5}{16} = \dfrac{11}{16}\ \ (68.75\%)\)
Key idea
"At most" and "at least" include the number itself (at most 2 means 0, 1 or 2). The standard approach is to simply add up the exact probabilities for "at most \(k\)", and to subtract "at most \(k-1\)" from the total of 1 for "at least \(k\)" (using the complement). "The probability that it happens at least once" is \(P(X \ge 1) = 1 - P(X = 0)\). This is the most common use of the complement.
Mean, variance and standard deviation of the binomial distribution
Standard notation (the usual math form)
\(E(X)\) \(=\) \(n\) \(\times\) \(p\)
\(V(X)\) \(=\) \(n\) \(\times\) \(p\) \(\times\) \((1 - p)\)
\(\sigma\) \(=\) \(\sqrt{V(X)}\)
In words (symbols replaced with words)
③ \(E(X)\): expected value (average number of successes) \(=\) ① \(n\): number of trials \(\times\) ② \(p\): probability of success
⑤ \(V(X)\): variance (how spread out) \(=\) \(n\): number of trials \(\times\) \(p\): probability of success \(\times\) ④ \(1 - p\): probability of failure
⑦ \(\sigma\): standard deviation (typical spread) \(=\) ⑥ square root of the variance \(V(X)\)
The formula in words
① Multiply the \(n\): number of trials
② by the \(p\): probability of success
③ and you get the \(E(X)\): expected value (average number of successes)
④ Multiply this further by the \(1 - p\): probability of failure
⑤ and you get the \(V(X)\): variance (how spread out)
⑥ The square root of the variance \(V(X)\) is the
⑦ \(\sigma\): standard deviation (typical spread)
Quick example
For the number of 1s when you roll a die 30 times (\(n = 30\), \(p = \dfrac{1}{6}\)):
expected value \(E(X)\) \(=\) number of trials \(30\) \(\times\) probability of a 1 \(\dfrac{1}{6}\)
\(E(X) = 30 \times \dfrac{1}{6} = 5\)
\(V(X) = 30 \times \dfrac{1}{6} \times \dfrac{5}{6} = \dfrac{25}{6}\)
\(\sigma = \sqrt{\dfrac{25}{6}} = \dfrac{5}{\sqrt{6}} = \dfrac{5\sqrt{6}}{6} \approx 2.04\)
Key idea
The expected value \(np\) matches your intuition exactly: "Do something with probability \(\dfrac{1}{6}\) 30 times, and on average it happens about \(30 \times \dfrac{1}{6} = 5\) times." The variance and standard deviation tell you how far the actual count tends to be from the expected value. With a standard deviation of about 2, you can read the result as "usually somewhere around 3 to 7 times" rather than "exactly 5 times". For the same \(n\), the variance \(np(1-p)\) is largest when \(p = \dfrac{1}{2}\) (when success and failure are equally likely, the result is hardest to predict).
Normal approximation (rule of thumb: \(np \ge 5\) and \(n(1-p) \ge 5\))
Graph
Standard notation (the usual math form)
In words (symbols replaced with words)
\(B(n,\ p)\) \(\approx\) \(N(np,\ np(1 - p))\)
① \(B(n,\ p)\): binomial distribution \(\approx\) ② normal distribution with mean \(np\) and variance \(np(1-p)\)
The formula in words
① The \(B(n,\ p)\): binomial distribution can be roughly replaced, when \(np \ge 5\) and \(n(1-p) \ge 5\) (the rule of thumb), by the
② \(N(np,\ np(1-p))\): normal distribution with mean \(np\) and variance \(np(1-p)\)
Quick example
The number of heads when you flip a coin 20 times (\(n = 20\), \(p = \dfrac{1}{2}\)) is
binomial distribution \(B(20,\ \dfrac{1}{2})\) \(\approx\) normal distribution \(N(10,\ 5)\)
\(np = 20 \times \dfrac{1}{2} = 10 \ge 5,\quad n(1 - p) = 20 \times \dfrac{1}{2} = 10 \ge 5\)
\(B\left(20,\ \dfrac{1}{2}\right) \approx N(10,\ 5)\)
Key idea
As \(n\) grows, the bar chart of the binomial distribution gets closer to a symmetric bell shape, almost the same as the normal distribution. So when \(n\) is large, you can replace the long sums of the binomial distribution with the normal distribution table (or z-scores). This is the normal approximation, and \(np \ge 5\) and \(n(1-p) \ge 5\) is the common rule of thumb for when to use it. Inside \(N(np,\ np(1-p))\), the order is "mean, variance". After approximating, you can find things like "the probability of at least a certain count" on our Normal Distribution Probability Calculator page.
The binomial distribution is the distribution of "how many times something with probability \(p\) happens in \(n\) tries". The probability of exactly \(k\) successes is \(P(X = k) = {}_{n}\mathrm{C}_{k}\, p^{k} (1-p)^{n-k}\), the expected value is \(np\), and the variance is \(np(1-p)\). When \(n\) is large, it can be approximated by the normal distribution \(N(np,\ np(1-p))\).

Symbols and terms

Symbols

\(X\) X The random variable for the number of successes. By convention, numbers decided by chance are written with capital letters from the end of the alphabet, such as \(X,\ Y,\ Z\).
\(P(X = k)\) P of X equals k The probability that the number of successes \(X\) is exactly \(k\). \(P\) stands for "probability".
\({}_{n}\mathrm{C}_{k}\) n choose k The number of combinations of \(k\) items chosen from \(n\). \(C\) stands for "combination". Many textbooks write it as \(\dbinom{n}{k}\) instead.
\(n\) en The number of trials (how many times you repeat it). The letter \(n\), for "number", is often used for counts.
\(p\) pee The probability of success on one trial. It comes from "probability", and the lowercase letter is often used for the probability of a single try.
\(1 - p\) one minus p The probability of failure on one trial (not succeeding). Either success or failure always happens, so it is what is left after subtracting \(p\) from the total of \(1\). It is also written \(q\).
\(k\) kay The number of successes, a whole number from \(0\) to \(n\). The letter \(k\) is often used to say "how many times".
\(P(X \le k)\) P of X less than or equal to k The probability of at most \(k\) successes (any of 0 through \(k\)). It is a cumulative probability, the exact probabilities added up through \(k\).
\(P(X \ge k)\) P of X greater than or equal to k The probability of at least \(k\) successes (any of \(k\) through \(n\)). Subtracting \(P(X \le k-1)\) from the total of \(1\) (the complement) shortens the sum.
\(E(X)\) E of X The expected value (the average number of successes). \(E\) stands for "expectation". For the binomial distribution, \(E(X) = np\). It is also called the mean and written \(\mu\).
\(V(X)\) V of X The variance (how spread out the results are). \(V\) stands for "variance". For the binomial distribution, \(V(X) = np(1-p)\). It is also written \(\mathrm{Var}(X)\) or \(\sigma^2\).
\(\sigma\) sigma The standard deviation. It is the lowercase Greek letter sigma, the Greek "s" as in "standard deviation". It is the square root of the variance, \(\sigma = \sqrt{V(X)}\), and shows the typical distance from the expected value.
\(B(n,\ p)\) B of n, p The binomial distribution with \(n\) trials and probability of success \(p\). \(B\) stands for "binomial". "\(X\) follows a binomial distribution" is written \(X \sim B(n,\ p)\).
\(N(\mu,\ \sigma^2)\) N of mu, sigma squared The normal distribution with mean \(\mu\) and variance \(\sigma^2\). \(N\) stands for "normal". By convention, the order inside the parentheses is "mean, variance".
\(\approx\) approximately equal to The symbol for "approximately equal". On this page it shows that the binomial distribution can be roughly replaced by the normal distribution.

Terms

binomial distribution The probability distribution of "how many times something with probability \(p\) happens in \(n\) tries". The name comes from the fact that the \({}_{n}\mathrm{C}_{k}\) in the formula is the same as the binomial coefficient (the coefficients in the binomial theorem). In the US it is usually taught in high school Statistics or AP Statistics.
random variable A variable whose value is decided by chance. On this page, the number of successes is the random variable. It takes the values 0 up to n, each with its own probability.
trial One run of an experiment or observation whose result is decided by chance, such as one coin flip or one draw of a ticket.
repeated trials Repeating the same trial with the same probability each time, where the results do not affect each other (independently). They are also called Bernoulli trials. The binomial distribution is the distribution of the number of successes in repeated trials.
independent When the result of one trial does not affect the result of another. The first and second rolls of a die are independent, but drawing tickets without putting them back is not (the earlier results change how many winning tickets are left).
combination A way to choose \(k\) of \(n\) items where order does not matter. The total number of them is \({}_{n}\mathrm{C}_{k}\). In the binomial distribution, it counts the ways to choose which of the \(n\) trials are successes.
cumulative probability The exact probabilities added up to a certain count. The probability of at most \(k\), \(P(X \le k)\), is the typical example.
complement The event that something does not happen. The probabilities always add up to 1, so a probability like "at least \(k\)" is easy to find by subtracting the opposite side (at most \(k-1\)) from 1.
expected value The average value when you repeat the trials many times. For the binomial distribution it is the average number of successes, given by the simple formula \(np\).
variance A measure of how far the actual values tend to be from the expected value (the spread). It is defined as the average of the squared differences.
standard deviation The square root of the variance. The variance is in squared units, so taking the square root brings it back to the original unit (here, the number of successes) as a measure of spread.
normal distribution A symmetric, bell-shaped distribution where values near the mean are most likely and values farther away are less likely. Many real-world quantities, such as heights and measurement errors, come close to this shape, and the binomial distribution also gets close to it when \(n\) is large.
normal approximation Replacing the binomial distribution with the normal distribution \(N(np,\ np(1-p))\) when \(n\) is large. The common rule of thumb is \(np \ge 5\) and \(n(1-p) \ge 5\).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over the topics in this table is the fastest way forward.

Basic probability (Grade 7)
  • Knowing that a probability shows how likely something is as a number from 0 to 1 (including reading 0.25 as 25%)
  • Knowing that the probabilities of all possible outcomes always add up to 1
Working with fractions (Grades 5–6)
  • Being able to multiply fractions (\(\dfrac{1}{2} \times \dfrac{1}{2} = \dfrac{1}{4}\)), simplify them and find common denominators
  • Being comfortable keeping answers as fractions (and turning \(\dfrac{3}{8}\) into 0.375)
Powers and exponents (Grades 6–8, Algebra 1)
  • Knowing that the small number at the upper right (the exponent) tells how many times to multiply, as in \(p^{3} = p \times p \times p\)
  • Being able to raise a fraction to a power, as in \(\left(\dfrac{1}{2}\right)^{4} = \dfrac{1}{16}\)
Counting and combinations (high school, Algebra 2 or Statistics)
  • Knowing that \({}_{n}\mathrm{C}_{k}\) is "the number of ways to choose \(k\) of \(n\) items when order does not matter"
  • Being able to calculate it, as in \({}_{4}\mathrm{C}_{2} = \dfrac{4 \times 3}{2 \times 1} = 6\)
Probability of repeated trials and the complement (high school, Statistics)
  • Understanding the setup of repeated trials, "repeated independently with the same probability each time"
  • Being able to use the complement to find "at least once" as \(1 - P(X = 0)\)
Random variables, expected value and variance (high school, AP Statistics)
  • Knowing what a random variable (a variable whose value is decided by chance) and a probability distribution are
  • Knowing that the expected value is the average, and the variance and standard deviation show the spread
The normal distribution (high school, AP Statistics)
  • Knowing that the normal distribution is a symmetric, bell-shaped distribution where values near the mean are most likely (you need this for the normal approximation card)
  • Knowing that the order inside \(N(\mu,\ \sigma^2)\) is "mean, variance"

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the probability of exactly k successes
Number of trials n 4
Probability of success p 0.5
Number of successes k 2
Probability of exactly k P(X=k) =BINOM.DIST(B3,B1,B2,FALSE)
Table to find the cumulative probabilities (at most k, at least k)
Number of trials n 4
Probability of success p 0.5
Number of successes k 2
Probability of at most k P(X≤k) =BINOM.DIST(B3,B1,B2,TRUE)
Probability of at least k P(X≥k) =1-BINOM.DIST(B3-1,B1,B2,TRUE)
Table to find the mean, variance and standard deviation
Number of trials n 30
Probability of success p =1/6
Mean E(X) = np =B1*B2
Variance V(X) = np(1-p) =B1*B2*(1-B2)
Standard deviation σ =SQRT(B4)
Table to check the rule of thumb for the normal approximation
Number of trials n 20
Probability of success p 0.5
np =B1*B2
n(1-p) =B1*(1-B2)
Rule of thumb met? =AND(B3>=5,B4>=5)
After pasting, the upper rows (n, p and k) are your inputs and the lower rows are calculated automatically.
BINOM.DIST is the binomial distribution function. Its arguments are, in order, "number of successes, number of trials, probability of success, cumulative or not". FALSE at the end gives the exact probability, and TRUE gives the cumulative probability of that count or fewer.
The first table is the example of exactly 2 heads in 4 coin flips, and the answer is 0.375 (= 3/8).
Both answers in the second table are 0.6875. "At least k" is found by subtracting "at most k−1" from 1 (this formula gives an error if k is 0, but the probability of 0 or more is always 1).
The third table is the number of 1s in 30 rolls of a die: mean 5, variance 4.1667 and standard deviation 2.0412.
The fourth table shows TRUE when both np and n(1−p) are 5 or more (the rule of thumb for the normal approximation is met), and FALSE otherwise.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the probability of exactly k successes
Number of trials n 4
Probability of success p 0.5
Number of successes k 2
Probability of exactly k P(X=k) =BINOMDIST(B3,B1,B2,FALSE)
Table to find the cumulative probabilities (at most k, at least k)
Number of trials n 4
Probability of success p 0.5
Number of successes k 2
Probability of at most k P(X≤k) =BINOMDIST(B3,B1,B2,TRUE)
Probability of at least k P(X≥k) =1-BINOMDIST(B3-1,B1,B2,TRUE)
Table to find the mean, variance and standard deviation
Number of trials n 30
Probability of success p =1/6
Mean E(X) = np =B1*B2
Variance V(X) = np(1-p) =B1*B2*(1-B2)
Standard deviation σ =SQRT(B4)
Table to check the rule of thumb for the normal approximation
Number of trials n 20
Probability of success p 0.5
np =B1*B2
n(1-p) =B1*(1-B2)
Rule of thumb met? =AND(B3>=5,B4>=5)
In Google Sheets, the function is called BINOMDIST (the arguments are in the same order as Excel's BINOM.DIST: "number of successes, number of trials, probability of success, cumulative or not"). Copy the whole table, paste it into cell A1, and replace n, p and k with your own numbers.
As in Excel, the "at least k" formula gives an error if k is 0 (the probability of 0 or more is always 1).

How to calculate it in Python

from fractions import Fraction
from math import comb, sqrt

trial_count = 4                  # number of trials n
success_prob = Fraction(1, 2)    # probability of success p (a decimal such as 0.3 also works)
success_count = 2                # number of successes k

failure_prob = 1 - success_prob

# probability of exactly k successes P(X=k) = nCk × p^k × (1−p)^(n−k)
exact_prob = (comb(trial_count, success_count)
              * success_prob ** success_count
              * failure_prob ** (trial_count - success_count))
print(f"Probability of exactly {success_count}: {exact_prob} = {float(exact_prob)}")

# cumulative probabilities (at most k, at least k)
prob_le = sum(comb(trial_count, i) * success_prob ** i * failure_prob ** (trial_count - i)
              for i in range(success_count + 1))
prob_ge = 1 - prob_le + exact_prob
print(f"Probability of at most {success_count}: {prob_le} = {float(prob_le)}")
print(f"Probability of at least {success_count}: {prob_ge} = {float(prob_ge)}")

# mean, variance and standard deviation
mean = trial_count * success_prob
variance = mean * failure_prob
print(f"Mean: {mean}  Variance: {variance}  Standard deviation: {sqrt(variance)}")
Runs with the standard library only. The fractions module keeps the calculation as exact fractions, with no decimal rounding errors (comb is the number of combinations nCk). This example is exactly 2 heads in 4 coin flips. Running it shows the probability 3/8 = 0.375, 11/16 = 0.6875 for both at most 2 and at least 2, and mean 2, variance 1 and standard deviation 1.0. Change the three numbers n, p and k and run it.

How to write it in LaTeX and other math languages (copy and paste)

Binomial probability (probability of exactly \(k\) successes)
P(X = k) = nCk pᵏ (1 − p)ⁿ⁻ᵏ
P(X = k) = \binom{n}{k} p^{k} (1 - p)^{n - k}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>P</mi><mo>(</mo><mi>X</mi><mo>=</mo><mi>k</mi><mo>)</mo>
    <mo>=</mo>
    <mrow>
      <mo>(</mo>
      <mfrac linethickness="0"><mi>n</mi><mi>k</mi></mfrac>
      <mo>)</mo>
    </mrow>
    <msup><mi>p</mi><mi>k</mi></msup>
    <msup>
      <mrow><mo>(</mo><mn>1</mn><mo>&#x2212;</mo><mi>p</mi><mo>)</mo></mrow>
      <mrow><mi>n</mi><mo>&#x2212;</mo><mi>k</mi></mrow>
    </msup>
  </mrow>
</math>
P(X = k) = C(n,k) p^k (1-p)^(n-k)
PDF[BinomialDistribution[n, p], k]
binomial(n, k)*p^k*(1-p)^(n-k);
binopdf(k, n, p)
P(X=k) = C(n,k) p^k (1-p)^(n-k)
Cumulative probability (at most \(k\) and at least \(k\) successes)
P(X ≤ k) = Σ[i=0→k] nCi pⁱ (1 − p)ⁿ⁻ⁱ
P(X \le k) = \sum_{i=0}^{k} \binom{n}{i} p^{i} (1 - p)^{n - i}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>P</mi><mo>(</mo><mi>X</mi><mo>&#x2264;</mo><mi>k</mi><mo>)</mo>
    <mo>=</mo>
    <munderover>
      <mo>&#x2211;</mo>
      <mrow><mi>i</mi><mo>=</mo><mn>0</mn></mrow>
      <mi>k</mi>
    </munderover>
    <mrow>
      <mo>(</mo>
      <mfrac linethickness="0"><mi>n</mi><mi>i</mi></mfrac>
      <mo>)</mo>
    </mrow>
    <msup><mi>p</mi><mi>i</mi></msup>
    <msup>
      <mrow><mo>(</mo><mn>1</mn><mo>&#x2212;</mo><mi>p</mi><mo>)</mo></mrow>
      <mrow><mi>n</mi><mo>&#x2212;</mo><mi>i</mi></mrow>
    </msup>
  </mrow>
</math>
P(X <= k) = sum_(i=0)^k C(n,i) p^i (1-p)^(n-i)
CDF[BinomialDistribution[n, p], k]
add(binomial(n, i)*p^i*(1-p)^(n-i), i = 0..k);
binocdf(k, n, p)
P(X≤k) = Σ_(i=0)^k C(n,i) p^i (1-p)^(n-i)
Mean, variance and standard deviation of the binomial distribution
E(X) = np,  V(X) = np(1 − p),  σ = √(np(1 − p))
E(X) = np, \quad V(X) = np(1 - p), \quad \sigma = \sqrt{np(1 - p)}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>E</mi><mo>(</mo><mi>X</mi><mo>)</mo><mo>=</mo><mi>n</mi><mi>p</mi>
    <mo>,</mo>
    <mi>V</mi><mo>(</mo><mi>X</mi><mo>)</mo><mo>=</mo>
    <mi>n</mi><mi>p</mi>
    <mrow><mo>(</mo><mn>1</mn><mo>&#x2212;</mo><mi>p</mi><mo>)</mo></mrow>
    <mo>,</mo>
    <mi>&#x3C3;</mi><mo>=</mo>
    <msqrt><mi>n</mi><mi>p</mi><mrow><mo>(</mo><mn>1</mn><mo>&#x2212;</mo><mi>p</mi><mo>)</mo></mrow></msqrt>
  </mrow>
</math>
E(X) = np, V(X) = np(1-p), sigma = sqrt(np(1-p))
{Mean[BinomialDistribution[n, p]], Variance[BinomialDistribution[n, p]], StandardDeviation[BinomialDistribution[n, p]]}
n*p; n*p*(1-p); sqrt(n*p*(1-p));
[m, v] = binostat(n, p); s = sqrt(v);
E(X) = np, V(X) = np(1-p), σ = √(np(1-p))
Normal approximation (rule of thumb: \(np \ge 5\) and \(n(1-p) \ge 5\))
B(n, p) ≈ N(np, np(1 − p))
B(n,\ p) \approx N(np,\ np(1 - p))
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>B</mi><mo>(</mo><mi>n</mi><mo>,</mo><mi>p</mi><mo>)</mo>
    <mo>&#x2248;</mo>
    <mi>N</mi><mo>(</mo><mi>n</mi><mi>p</mi><mo>,</mo>
    <mi>n</mi><mi>p</mi>
    <mrow><mo>(</mo><mn>1</mn><mo>&#x2212;</mo><mi>p</mi><mo>)</mo></mrow>
    <mo>)</mo>
  </mrow>
</math>
B(n, p) ~~ N(np, np(1-p))
NormalDistribution[n p, Sqrt[n p (1 - p)]]
Normal(n*p, sqrt(n*p*(1-p)));
pd = makedist('Normal', 'mu', n*p, 'sigma', sqrt(n*p*(1-p)));
B(n, p) ≈ N(np, np(1-p))

How to have ChatGPT  do the calculation

You are a calculation assistant for math (probability and statistics). Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

You enter a prize draw 10 times, and each entry has a 1/6 chance of winning. For the binomial distribution of the number of wins, find:
1. The probability of winning exactly 2 times, P(X=2) (as a fraction in lowest terms and as a decimal)
2. The probability of at most 2 wins, P(X≤2), and of at least 2 wins, P(X≥2)
3. The mean E(X), variance V(X) and standard deviation σ
4. Whether the rule of thumb for the normal approximation, np ≥ 5 and n(1−p) ≥ 5, is met

In Python, calculate exactly with fractions and math.comb from the standard library, and show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.