A gambler bets on a roulette wheel in Las Vegas. A win nets him $35 dollars, while a loss lands him with -$1 dollars. What is the expected value of a spin of the wheel?
For convenience’s sake, we will say he bets on 00, the 38th place on the wheel. The sample space for this is then -1 repeated thirty-seven times and 35 appearing once.
\[ \sum_{x\epsilon\Omega}xm(x)=\sum_{x=1}^{37}\frac{-1}{38}+\frac{35}{38}=\frac{-2}{38}\approx-0.0526 \]
We can test this out in R, always showing a little less than -.05:
x<-sample(1:38,100000000,replace = T)
y<-length(which(x<38))
z<- 100000000-y
(z*35-y)/100000000
## [1] -0.05277268