The solution would be like this for this specific problem:
(8*18 + -8*20) / 38
= -0.421
The expected value for playing roulette if you bet $8 on red is -$0.42.
I am hoping that this answer has satisfied your query and it will be able to help you in your endeavor, and if you would like, feel free to ask another question.