For some reason, in the context of random variables, the mean is often referred to as the expected value and is denoted as E(X). It is just the mean average. However, it would probably be more accurate to call it a 'weighted mean.'
Imagine you roll a 6-sided die 10 times and get the results: 1 5 4 3 5 6 5 4 2 1. The mean is easy here: 1+5+4+3+5+6+5+4+2+1/10.
However, with a little bit of algebra, we can take advantage of the fact that some of the numbers are repeated. Observe how I manipulate that equation:
1+5+4+3+5+6+5+4+2+1/10 = 2β
1+1β
2+1β
3+2β
4+3β
5+1β
6/10 = 0.2β
1+0.1β
2+0.1β
3+0.2β
4+0.3β
5+0.1β
6.
In that final sum, the first number in each term represents the probability that each number occurs. 1 happened twice, and so it is a 20% chance. But the number 3 only happened once, so it's a mere 10% chance.
Hopefully, this motivates why the mean, or expected value, of a random variable is the sum of probabilities multiplied by their values. It's simply a different way of phrasing a weighted mean, which is itself just a way of taking a mean more quickly.
E(X) = βP(x)x
Problem
Calculate the expected value (aka mean) of the following random variable X.
X P(X)
X=1 P(1) = 8/500
X=2 P(2) = 150/500
X=3 P(3) = 30/500
X=4 P(4) = 20/500
X=5 P(5) = 80/500
X=6 P(6) = 212/500
The expected value (aka mean) of a random variable X is E(X) = 1/2. Fill in the missing row:
X P(X)
X=5 P(5) = 0.2
X=8 P(8) = 0.52
? ?
X=2 P(2) = 0.13
X=21 P(21) = 0.08