I don't know probability, but could you clarify some things:

1. A random variable is a measurable function from a set (measure space) with unit measure to the reals, right?

2. How do you define the mean of the random variable?

This certainly looks more like an analysis problem so if you could use as little terms from probability the better (at least for me).