I have a continuous random variable $X$ (positive). I want to simulate its distribution with a discrete distribution and calculate $E[X]$ from that discrete distribution. So, the obvious approach is to divide the range of the random variable into step size of $h$; let the CDF values at the points $0,h,2h,\ldots,Nh$ be $P_0,P_1,P_2,\ldots,P_N$.
Thus, $\text{Prob}(0 < X \leq h)=P_1-P_0$, $\text{Prob}(h < X \leq 2h)=P2-P1$ and so on.
Now these probability masses are associated with a interval. We need to find a representative point of each interval, and here lays my problem.
For an interval $(a,b]$ which point should we take as the representative point? Leftmost point, rightmost point, the mid point?
Basically, given the following relation F'(t)=P(X<=t)=$1-(1-F(t))^{n}$ I need to find the expectation of X i.e E[X] where F(t) is CDF of some other random variable Y. The expression for F(t) is not known to me. I have only access to a black box that gives me a value of F(t) as output when I give a value of t as input. That's why the question of "approximating" the continuous distribution with a discrete distribution comes.
Another question is how to choose an appropriate h value (step size) given an error bound "epsilon" on the expected value. Is there any standard method already?