Discrete Random Variable Calculator – Expected Value & Variance
Discrete Random Variable E(X), V(X)
Fill in the distribution table: the top row holds the values of X, the bottom row their probabilities. You can enter fractions such as 3/8 or decimals such as 0.375. The probabilities must add up to 1.
The calculator above reads a probability distribution table and computes the expected value, variance, and standard deviation of the random variable X.
Formulas used
E(X) = Σ xᵢ pᵢ
V(X) = Σ xᵢ² pᵢ − E(X)², σ = √V(X)
- Every pᵢ must be between 0 and 1.
Worked example
X takes 0, 1, 2 with probabilities 0.25, 0.5, 0.25:
E(X) = 1, V(X) = 0.5
Enter the same values in the calculator above to see every step of the solution.
How to use the calculator
- Enter the values xᵢ and their probabilities pᵢ (the probabilities must sum to 1).
- Press the calculate button. The result appears instantly.
- Read the step-by-step solution, rendered with KaTeX, to check your own work.