Distribution Variance Calculator
Enter the values and their probabilities to find the variance.
Result
How it is calculated
Enter the possible values of the random variable and their probabilities as two comma-separated lists of equal length, in the same order. Use a dot for decimals, because the comma separates the items. The tool computes the mean μ = Σ p·x, the variance σ² = Σ p·(x − μ)² straight from the definition, and the standard deviation σ = √σ², all shown to four decimals.
Inputs it rejects, showing no result: lists of different length, entries that are not numbers, any probability below 0 or above 1, and probabilities whose sum is not within 0.001 of 1. The tolerance lets rounded values like 0.3333, 0.3333, 0.3333 through, but they are used as typed, not rescaled, so the mean comes out as 0.9999 rather than 1. Values themselves can be any real numbers.
Worked example
A discrete variable takes the values 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.4, 0.2, which add up to 1. Mean: 0×0.1 + 1×0.3 + 2×0.4 + 3×0.2 = 0.3 + 0.8 + 0.6 = 1.7. Squared deviations from 1.7 are 2.89, 0.49, 0.09, 1.69. Weighted by the probabilities: 0.289 + 0.147 + 0.036 + 0.338 = 0.81. So the variance is 0.8100, the standard deviation is √0.81 = 0.9000, and the mean is 1.7000. A typical outcome is therefore about 0.9 away from the expected value of 1.7.
Common mistakes
- Giving counts or percentages as probabilities. Counts like 10, 30, 40, 20 or percentages like 50, 50 are above 1 and the tool returns nothing; divide by the total first (0.1, 0.3, 0.4, 0.2).
- Using a decimal comma, as in 0,3. The comma is the separator, so write 0.3. Separating items with spaces or semicolons instead of commas gives no result either.
- Lists of different lengths, such as five values and four probabilities, or a missing probability for one outcome.
- Confusing this with sample variance. The values here are the whole distribution with its probabilities, so there is no n − 1 correction, and it is not calculated from a list of observed data points.
- Rounding probabilities so they no longer add up. 0.33, 0.33, 0.33 sum to 0.99, which is outside the 0.001 tolerance and gives no result; use 0.3333 or fractions that really sum to 1.
About this calculator
For a discrete random variable X with possible values x_i and probabilities p_i, the expected value (mean) is μ = Σ x_i·p_i, and the variance is Var(X) = Σ p_i·(x_i − μ)² — equivalently E[X²] − μ² using the shortcut formula. The standard deviation is simply the square root of the variance, expressed in the same units as X.
These three numbers describe both the center and the spread of a distribution: variance and standard deviation quantify how much outcomes typically deviate from the expected value, which is central to risk analysis, insurance pricing, quality control, and any statistics or probability coursework covering random variables.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
There is a handy cross-check: the variance also equals the mean of the squares minus the square of the mean. For values 1, 2, 3 with probabilities 0.2, 0.5, 0.3 the mean of squares is 4.9, the mean is 2.1, and 4.9 minus 4.41 gives the 0.4900 shown. What kind of distribution are you working with, a die, a survey or a payoff?