What Is Variance of Random Variable?
The variance of a random variable measures how spread out its values are around the mean. It is the probability-weighted average of the squared distances from the mean.
You can compute it as E[X²] − μ², or directly as the sum of (x − μ)² times P(x). The calculator does both and shows that they agree.
It also gives the variance of aX + b. Adding b does not change the spread, and multiplying by a multiplies the variance by a².
How to Use the Variance of Random Variable Calculator
- Enter the values and their probabilities.
- Read the variance and standard deviation.
- Use a to get the variance of aX + b.
Variance of Random Variable Formula
Variance
Linear change
Variance of Random Variable Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| μ | Mean of X | Σ x·P(x) |
| E[X²] | Mean of the squared values | Σ x²·P(x) |
| Var(X) | Variance | E[X²] − μ² |
| σ | Standard deviation | √Var(X) |
Variance of Random Variable Worked Example
With the example values loaded in the calculator above, the steps are:
- Mean μ = Σ x·P(x) = 1.7.
- E[X²] = Σ x²·P(x) = 3.7.
- Var(X) = E[X²] − μ² = 3.7 − 2.89 = 0.81.
- Standard deviation = √0.81 = 0.9.
- Var(aX + b) = a² Var(X) = 4 × 0.81 = 3.24.
Result: Variance Var(X) = 0.81; Standard deviation = 0.9.
Worked example
Take X = 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.4, 0.2. The mean is 1.7 and E[X²] = 0 + 0.3 + 1.6 + 1.8 = 3.7.
Var(X) = 3.7 − 1.7² = 3.7 − 2.89 = 0.81, so the standard deviation is 0.9. For Y = 2X + 1, Var(Y) = 4 × 0.81 = 3.24.
Why a is squared
Scaling every value by a stretches the distances from the mean by a, and the variance uses squared distances. Adding b moves every value the same amount, so the spread does not change.
Where Variance of Random Variable Is Used
Probability homework
Find the variance and SD from a probability table.
Risk comparison
Compare the spread of two payoffs with the same mean.
Linear transforms
Find Var(aX + b) without recomputing the table.
Common Variance of Random Variable Mistakes to Avoid
- The shortcut formula is faster, but check it against the direct sum when learning.
- Report the standard deviation when you need the same units as X.
Variance of Random Variable Terms and Definitions
- Variance
- The expected squared distance of X from its mean.
- Standard deviation
- The square root of the variance.
Variance of Random Variable FAQs
How do you find the variance of a random variable?
Compute E[X²] and the mean, then subtract the mean squared from E[X²].
What is Var(aX + b)?
a² times Var(X). The constant b does not matter.
Can the variance be negative?
No. It is an average of squares.
How is it different from sample variance?
This is a population-style variance from known probabilities. Sample variance estimates it from data and divides by n − 1.