Discrete Probability Distribution Calculator
A discrete random variable takes countable outcomes: the number of heads in two coin tosses, the defects in a batch, the goals in a match. Give this calculator each outcome and its probability, and it returns the distribution’s mean (expected value), variance, and standard deviation, with a check on whether your probabilities add up the way they must.
The pre-filled example is the classic two coin toss distribution, with outcomes 0, 1, and 2 heads at probabilities 0.25, 0.50, and 0.25. One click on Calculate turns it into a mean of 1.0000, a variance of 0.5000, and a standard deviation of 0.7071.
Enter probabilities as decimals, so 25% is 0.25, not 25. The tool summarizes a distribution you supply: it does not generate binomial, Poisson, or other named distribution probabilities for you, and it holds at most 6 outcome pairs.
Quick Answer
Key takeaways
- A discrete distribution is a list of countable outcomes with a probability for each one. Two rules make it valid: every probability sits between 0 and 1, and all of them sum to exactly 1.
- The mean is a probability weighted average, not a plain average. Outcomes count in proportion to how likely they are.
- Variance and standard deviation measure spread around that mean. Standard deviation is the more readable of the two because it is in the same units as your outcomes.
- This calculator summarizes a distribution you build yourself, for 3 to 6 outcomes. It does not generate probabilities from a named distribution such as the binomial or Poisson.
- Quick Answer
- What counts as a discrete probability distribution
- Using the calculator in four steps
- The three formulas behind the results
- Worked example: heads in two coin tosses
- Errors that quietly break a distribution
- What competing distribution calculators miss
- What this calculator does not do
- Frequently Asked Questions
- Add This Calculator to Your Website
What counts as a discrete probability distribution
A discrete probability distribution describes a random variable that takes separate, countable values: whole numbers of heads, defects, arrivals, or goals. Each value carries a probability, and the full list of value and probability pairs is called the probability mass function, or PMF.
Two conditions decide whether a PMF is legitimate, and the NIST/SEMATECH e-Handbook of Statistical Methods states them the standard way: no probability may fall below 0 or above 1, and the probabilities together must total exactly 1, because one of the listed outcomes is certain to happen. The calculator's probability sum line exists to police the second rule. If your entries total 0.90, an outcome is missing or a probability is mistyped, and the mean that follows describes an incomplete distribution.
Discrete is the opposite of continuous here. A person's height is continuous, because it can fall anywhere in a range; the number of heads in two tosses can only be 0, 1, or 2, with nothing in between. If your variable is countable in that sense, this is the right summary tool. Probabilities for a specific experiment, such as the chance of a given run of coin flips, come before this step: a coin flip probability calculator works out the individual chances that you would then type into a distribution like the worked example below.
Using the calculator in four steps
The workflow is short, and the only step people routinely skip is the validity check at the end.
Choose the number of values. Pick 3, 4, 5, or 6 pairs. The entry grid rebuilds with a fresh example each time you change the count, so set the count before typing your own numbers.
Enter each outcome and its probability as a pair. Value X1 sits beside P(X1), and so on. Outcomes can be any numbers, including negatives and decimals, which is what game payouts and profit or loss scenarios need.
Enter probabilities as decimals. A 25% chance is 0.25. Typing 25 instead is the most common error with this kind of tool, and it shows up at once in the probability sum.
Calculate, then read the probability sum before the mean. A sum of 1.0000 marked Valid means the summary describes a complete distribution. Any other total means the mean and variance are arithmetic on incomplete inputs, and the entries need fixing first.
The three formulas behind the results
All three outputs come from the same pair list, in a fixed order: mean first, then spread around that mean. These are the standard definitions taught for discrete random variables in Chapter 4 of OpenStax Introductory Statistics 2e.
Expected value is a long run average, and that framing matters. It is not a prediction for the next trial, and it does not have to be an outcome that can actually occur. A fair die has a mean of 3.5, a value no single throw can produce, a point that also comes up when you summarize dice outcomes with the dice average calculator. What 3.5 promises is only this: average thousands of throws and the running average settles near it.
Variance does the opposite job. Two distributions can share a mean and behave nothing alike: one clustered tightly around it, one swinging between extremes. Variance, and its square root the standard deviation, put a number on that difference. When outcomes are conditioned on extra information, the same machinery applies to the reduced set of possibilities, which is the territory of the conditional expected value calculator and, for the probabilities themselves, the conditional probability calculator.
Worked example: heads in two coin tosses
Tossing two fair coins gives three possible head counts. Exactly one order produces 0 heads (tails, tails), two orders produce 1 head, and one order produces 2 heads, out of four equally likely orders, hence the probabilities 0.25, 0.50, and 0.25. Here is the full calculation the calculator performs, column by column.
| x (heads) | P(x) | x × P(x) | (x − μ)² × P(x) |
|---|---|---|---|
| 0 | 0.25 | 0.00 | 0.2500 |
| 1 | 0.50 | 0.50 | 0.0000 |
| 2 | 0.25 | 0.50 | 0.2500 |
| Total | 1.00 | μ = 1.0000 | σ² = 0.5000 |
The standard deviation is the square root of 0.5000, which is 0.7071. Read together, the three numbers say: the center of this distribution is 1 head, and a typical result sits about 0.71 heads from that center, which matches intuition for outcomes that can only land at 0, 1, or 2.
A second, less symmetric example shows why the weighting matters. Take outcomes 1, 2, and 3 with probabilities 0.20, 0.30, and 0.50, like a die weighted toward 3. The calculator returns a mean of 2.3000, not the plain average of 2, because the most likely outcome pulls the center toward itself. The variance is 0.6100 and the standard deviation 0.7810. Run both examples after changing the pre-filled values and the outputs match these figures exactly.
Errors that quietly break a distribution
The formulas are unforgiving about inputs, and three mistakes account for nearly every wrong result.
Probabilities entered as percentages. Typing 25, 50, and 25 instead of 0.25, 0.50, and 0.25 produces a probability sum of 100.0000 and a wildly wrong mean. The tool does not convert for you, and it does not reject a probability above 1, so the sum line is your only warning. Always read it.
A missing outcome. If a variable can take four values and you list three, the probabilities total less than 1 and every output is understated. The fix is to list every outcome the variable can take, even ones with a probability of 0.
How the validity check works. Your probabilities must total exactly 1, and the checker allows one billionth of slack for binary floating point arithmetic. Computers add decimals in binary, so an honest set such as 0.10, 0.20, 0.40, 0.20, 0.10 totals 1.0000000000000002 inside the machine; a strict equality test would flag that valid set as wrong. This tool therefore compares the total against 1 with a 0.000000001 tolerance, so rounding artifacts pass and genuine shortfalls are still caught: a set totalling 0.9999 is labelled (Should = 1), with a verdict line telling you to fix the probabilities before trusting the mean.
What competing distribution calculators miss
The strongest rival tools in this space are expected value calculators that add a per-outcome breakdown table, a median, and several input modes for games and lotteries. Those are genuine strengths, and a student who needs a cumulative probability column or a chart of the PMF will find more machinery there. Many competitors also allow unlimited outcomes, while this tool stops at 6 pairs.
Against that, most rivals share two weaknesses this page addresses directly. First, validation is often silent or cosmetic: probabilities that total 0.83 still produce a confident looking mean, with the warning buried or absent. Here the probability sum is a headline output with an explicit Valid or Should = 1 label and a verdict line in the result box. Second, strict equality checkers punish honest rounding: a set that totals 1 on paper can fail a naive equality test in binary arithmetic, leaving users convinced they cannot add up. The section above explains the one-billionth tolerance this tool allows, so a correct distribution is never flagged for a rounding artifact. Add four decimal place output throughout, and outcomes that may be negative or fractional for payout problems, and the tool earns its place for the common textbook and decision analysis cases.
What this calculator does not do
Within that scope the tool is exact, and the scope itself is the most common real need: a probability table from a textbook, a course, a game, or a business forecast, and a fast, checkable summary of its center and spread.
Frequently Asked Questions
It is a complete list of the countable values a random variable can take, each with its probability. Every probability must lie between 0 and 1, and the probabilities must sum to exactly 1. The number of heads in two coin tosses, with values 0, 1, and 2 at probabilities 0.25, 0.50, and 0.25, is a small complete example.
Multiply each outcome by its probability and add the products: mean = sum of [x times P(x)]. For the coin toss example that is (0 times 0.25) + (1 times 0.50) + (2 times 0.25) = 1.0000. The result is the long run average over many repetitions, not a prediction for a single trial.
Variance weights each squared distance from the mean by its probability: variance = sum of [(x minus mean) squared times P(x)]. In the coin example it is 0.5000. Standard deviation is the square root of the variance, 0.7071 here, and it is the easier figure to interpret because it uses the same units as the outcomes.
Yes, for the summary to describe a real distribution. This calculator still computes the mean and variance when the total differs, and it labels the sum (Valid) only when the total is 1 within a one-billionth rounding tolerance, so always read the probability sum line before trusting the other outputs.
Not from rounding alone. The checker allows a tolerance of one billionth, because binary floating point makes a set such as 0.10, 0.20, 0.40, 0.20, 0.10 total 1.0000000000000002 inside the computer, and that set passes as (Valid). If you still see (Should = 1), the entered probabilities genuinely miss 1 by more than rounding, usually a typo or a missing outcome. The mean and variance are still computed, but fix the probabilities before trusting them.
Yes. Outcome values accept any number, including negatives and fractions, which suits profit and loss or game payout problems: a game paying -5, 0, and 10 is a valid set of outcomes. Probabilities are the restricted side: each one should be a decimal between 0 and 1.
Between 3 and 6 outcome and probability pairs, chosen with the Number of values selector. Changing the selector rebuilds the grid with a fresh example, so choose the count before typing your own figures. Distributions with more than 6 outcomes need a spreadsheet or a larger tool.
No. It summarizes a distribution you enter yourself and has no named distribution modes. A binomial or Poisson problem needs its own formula to produce each probability first; once you have those probabilities, enter them here to get the mean, variance, and standard deviation.
Add This Calculator to Your Website
References
- OpenStax, Rice University, "Introductory Statistics 2e", Chapter 4, Discrete Random Variables - the textbook source for the expected value, variance, and standard deviation formulas used on this page. OpenStax: Introductory Statistics 2e. Accessed October 2026.
- National Institute of Standards and Technology, "NIST/SEMATECH e-Handbook of Statistical Methods" - the federal reference for probability distributions and their validity conditions. NIST/SEMATECH e-Handbook of Statistical Methods. Accessed October 2026.
- Wolfram MathWorld, "Discrete Distribution" - the reference definition of a distribution over countable outcomes. MathWorld: Discrete Distribution. Accessed October 2026.
- Wolfram MathWorld, "Expected Value" - the definition of expectation as a probability weighted sum over outcomes. MathWorld: Expected Value. Accessed October 2026.
- LibreTexts, "Statistics" library, Discrete Random Variables - an open textbook treatment of probability mass functions, mean, and variance with worked examples. LibreTexts: Statistics. Accessed October 2026.
