| Value x | Probability P(x) | x · P(x) | x − μ | (x − μ)² | (x − μ)² · P(x) |
|---|
Distribution Graph
The chart shows probabilities and each point’s contribution to variance.
Calculator Input
Enter up to twelve random variable values and probabilities. Probabilities should total 1 for a valid discrete distribution.
Example Data Table
This sample distribution can be tested directly with the example button.
| Value x | Probability P(x) | x · P(x) |
|---|---|---|
| 1 | 0.10 | 0.10 |
| 2 | 0.20 | 0.40 |
| 3 | 0.30 | 0.90 |
| 4 | 0.25 | 1.00 |
| 5 | 0.15 | 0.75 |
| Total | 1.00 | 3.15 |
Formula Used
Variance measures how far values spread around the expected value.
Expected value: μ = Σ[x · P(x)]
Variance: Var(X) = Σ[(x − μ)² · P(x)]
Standard deviation: σ = √Var(X)
The calculator first finds the weighted mean. Next, it measures each value’s squared distance from that mean. Then, it weights each squared distance by probability and sums everything.
How to Use This Calculator
- Enter each possible random variable value in the x fields.
- Enter the matching probability for every listed value.
- Keep probabilities between 0 and 1.
- Make sure all probabilities sum to 1.
- Click Calculate Variance to generate results.
- Review mean, variance, standard deviation, table, and chart.
- Use CSV or PDF buttons to export the output.
Frequently Asked Questions
1. What does variance tell me?
Variance shows how widely a random variable’s values spread around the expected value. A larger variance means outcomes are more dispersed. A smaller variance means outcomes cluster more tightly near the mean.
2. Can I use decimals for probabilities?
Yes. Decimal probabilities work well here. Just keep each probability between 0 and 1, and make sure their total equals 1 for a valid discrete probability distribution.
3. What happens if probabilities do not sum to 1?
The calculator still computes results and shows the probability total. However, the output only represents a proper random variable distribution when the total probability equals 1 exactly or very closely.
4. Why is standard deviation included?
Standard deviation is the square root of variance. It expresses spread in the same units as the original variable, which often makes interpretation easier than using squared units.
5. Is this for discrete or continuous variables?
This page is designed for discrete random variables. You enter separate possible values and their probabilities. Continuous variables usually require integration and a density function instead.
6. Can negative values be used?
Yes. Random variable values may be negative, zero, or positive. The variance remains nonnegative because the calculator squares each distance from the mean before weighting it.
7. What does the graph show?
The graph displays the probability distribution and each value’s weighted variance contribution. This helps you see which outcomes contribute most to the overall spread.
8. When is variance useful?
Variance is useful in statistics, risk analysis, quality control, forecasting, and decision models. It helps compare uncertainty, consistency, and expected spread across different random processes.