Probability Distribution Calculator
Validate a PMF or PDF, then find probabilities, the mean, and the variance with step-by-step working
What a Probability Distribution Is
A probability distribution assigns probability to every value a random variable can take. The form depends on whether the variable is discrete or continuous.
Discrete — probability mass function (PMF) . It is valid if and only if both conditions hold:
Continuous — probability density function (PDF) , valid when
For a PDF, is not a probability — it is a density, and it may exceed . Probability is area: , which also means for any single point.
The cumulative distribution function (CDF) is in both cases: a running sum for a PMF, an integral for a PDF.
Mean, Variance, and Building the Table
Discrete case
The right-hand form is the computational shortcut: build one column of and one of , total both, then subtract . The standard deviation is .
Continuous case
Building a distribution from scratch
- List every distinct value the variable can take — the values must be exhaustive and mutually exclusive.
- Assign each one its probability, usually by counting outcomes.
- Verify the total is exactly . If a probability is unknown, that equation solves for it.
- Only then compute , , or any .
A valid distribution requires no assumption about normality or sample size — those conditions belong to inference, not to the distribution itself.
Common Mistakes to Avoid
- Forgetting to check the sum. A table that totals or is not a distribution, and every mean or variance computed from it is meaningless.
- Allowing a negative probability. A formula such as may sum to yet still produce a negative value; both conditions must hold, not just one.
- Treating a density as a probability. For a continuous variable is perfectly legal. Only areas are probabilities, so always integrate.
- Using . That is the formula for raw data. For a distribution you weight by , not by .
- Subtracting before squaring in the shortcut. The identity is , never computed halfway.
- Mixing up and . For a discrete variable these differ by the whole of ; for a continuous one they are equal.
Examples
Frequently Asked Questions
A probability mass function gives the probability that a discrete random variable equals each specific value, written p(x) = P(X = x). It is valid only if every value is non-negative and all values together sum to exactly 1. Plotted, it looks like a bar or spike at each possible value.
A PMF applies to discrete variables and returns an actual probability at each point. A PDF applies to continuous variables and returns a density, so you must integrate over an interval to get a probability. That is why P(X = a) = 0 for a continuous variable but can be non-zero for a discrete one.
Test two things. First, the function must be non-negative everywhere in its domain. Second, the total must be exactly 1 — a sum for a PMF, an integral for a PDF. If a constant is unknown, setting the total equal to 1 is precisely the equation that determines it.
Add a column of x·p(x) and total it to get μ, then a column of x²·p(x) and total it to get E[X²]. The variance is σ² = E[X²] − μ². Do not divide by n — the probabilities are already the weights.
Related Solvers
Related Guides
Try AI-Math for Free
Get step-by-step solutions to any math problem. Upload a photo or type your question.
Start Solving