I actually don't really know if this post belongs to this community but I think it is about failure in my code rather than my calculations.(If it doesn't belong here I will move this post to another community)
I got assignment in my Probability course to demonstrate the expected value of the following random variable .
I need to write a code in matlab that getting N
random real between [0,1]
and calculating the following value for each and show why the sequence of values converges to the the value
I wrote the following code in matlab:
but the value of E(i) converges to 0.46 instead of the real expected value.
What have I done wrong in my code?
Thank you, Michael
Aucun commentaire:
Enregistrer un commentaire