Read it again any time, including while you work through the exercises.
At a funfair, a stall runs a wheel: some sectors win you 5 euros, others 1 euro, others nothing. Chance picks the sector, but what you care about is the NUMBER you win. A random variable is exactly that: a machine that attaches a number to each outcome of a random experiment. We usually write it X.
To describe X completely, we build the table of its probability distribution: on the first row, all the possible values of X; on the second, the probability of each. Mandatory check: the probabilities must add up to exactly 1. If they do not, a value was forgotten or a calculation is wrong.
Then comes the thousand-euro question: how much do you win ON AVERAGE? That is the expected value of X, written E(X). Formula: multiply each value by its probability, then add everything up. E(X) = x1 × p1 + x2 × p2 and so on. It is a weighted mean: very likely values weigh a lot, rare values weigh little.
Mind the interpretation, this is where everyone stumbles: the expected value does NOT predict the result of one game. It tells you what the average gain per game becomes when you play a very large number of times. An expected value of 1.5 euros guarantees nothing about the next game, but over a thousand games, your average gain will get close to it.
The expected value lets you judge a game: if X stands for the net gain (winnings minus stake), then E(X) > 0 means the game favours the player, E(X) < 0 means it does not, and E(X) = 0 means a fair game. Guess which category real lotteries fall into... Your job to check it by calculation!