Mean of Random Variable Calculator

This mean of random variable calculator finds the expected value of a discrete random variable from its values and probabilities.

Checks on your data

  • The probabilities add to 1, so the distribution is valid.
  • The mean does not have to be a value X can take. It is a balance point, not a likely outcome.

Results

Mean E[X]
1.7
E[2X + 1]
4.4
Number of values
4
Most likely value (mode)
2
Probability distribution
00.10.20.30.40: 0.100.11: 0.310.32: 0.420.43: 0.230.2
Calculation table
xP(x)x·P(x)
00.10
10.30.3
20.40.8
30.20.6
Show step-by-step solution
  1. The values add to probability 1, so this is a valid distribution.
  2. E[X] = Σ x · P(x) = 0×0.1 + 1×0.3 + 2×0.4 + 3×0.2 = 1.7.
  3. Linear rule: E[aX + b] = a·E[X] + b = 2 × 1.7 + 1 = 4.4.
MeanE[X] = Σ x·P(x)
LinearE[aX+b] = a·E[X] + b
Probabilitiesmust add to 1

What Is Mean of Random Variable?

The mean of a random variable is the average of its possible values, each weighted by its probability. It is also called the expected value, E[X] or μ.

Enter the values of X and their probabilities, which must add to 1. The calculator multiplies and adds, shows the table, and also gives the mean of aX + b using the rule E[aX + b] = a·E[X] + b.

The mean is the long-run average over many repeats. It does not have to be a value that X can actually take.

How to Use the Mean of Random Variable Calculator

  1. Enter the possible values of X.
  2. Enter the matching probabilities. They must add to 1.
  3. Read E[X], and set a and b if you need the mean of a linear change.

Mean of Random Variable Formula

Mean

μ=E[X]=∑x P(X=x)\mu=E[X]=\sum x\,P(X=x)

Linear change

E[aX+b]=a E[X]+bE[aX+b]=a\,E[X]+b

Mean of Random Variable Variables Explained

SymbolMeaningNotes
XThe random variable
P(x)Probability of the value xAll must add to 1
E[X]Expected value, the meanΣ x·P(x)
a, bConstants in Y = aX + bE[Y] = a·E[X] + b

Mean of Random Variable Worked Example

With the example values loaded in the calculator above, the steps are:

  1. The values add to probability 1, so this is a valid distribution.
  2. E[X] = Σ x · P(x) = 0×0.1 + 1×0.3 + 2×0.4 + 3×0.2 = 1.7.
  3. Linear rule: E[aX + b] = a·E[X] + b = 2 × 1.7 + 1 = 4.4.

Result: Mean E[X] = 1.7; E[2X + 1] = 4.4.

Worked example

Let X take 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.4, 0.2. Then E[X] = 0 × 0.1 + 1 × 0.3 + 2 × 0.4 + 3 × 0.2 = 1.7.

For Y = 2X + 1 the mean is 2 × 1.7 + 1 = 4.4.

What the mean tells you

If you repeat the experiment many times, the average of the results gets close to E[X]. Any single result can be far from it.

Where Mean of Random Variable Is Used

Probability homework

Find the expected value from a probability table.

Games and decisions

Work out the average payoff of a game.

Linear transforms

Find the mean after scaling or shifting a variable.

Common Mean of Random Variable Mistakes to Avoid

  • Check the probabilities add to 1 first.
  • Use the linear rule instead of recomputing for Y = aX + b.

Mean of Random Variable Terms and Definitions

Random variable
A variable whose value depends on chance.
Expected value
The probability-weighted average of the possible values.

Mean of Random Variable FAQs

How do you find the mean of a random variable?

Multiply each value by its probability and add the products.

Is the mean the same as the expected value?

Yes. For a random variable they are the same thing.

What is the mean of aX + b?

a times the mean of X, plus b.

Can the mean be a value X cannot take?

Yes. A fair die has a mean of 3.5 but never shows 3.5.

Related calculators

Last updated 2026-11-09. See our disclaimer.