MATLAB: Expectation of random numbers

demandexpectationexpected valuehelpmeanquestionrandomvariablesvariance

Hi community,
I want to make an expectation of the next value to come with respect to a probability distribution function of my random demand vector D.
However, I have no clue what so ever how to do this in a Matlab code.
As for now I have demand vector D
D=rand(1,8)*100;
round(D)
I would want to make an expectation of the next value of D based on its previous values. Does anyone know how to do this?
thankyou,

Best Answer

You can't do it. The D(i) are statistically independent, and so offer no information about what comes next.