Suppose that you pay $1024 to enter a coin tossing game. A biased coin with head
probability 0.3 is tossed 10 times independently. The amount will be doubled every time a
head is obtained and halved every time a tail appears. Denote X as the number of heads
obtained and Y as the amount of money you end up with.
(a) Express Y in terms of X.
(b) Determine the expected value of Y. Is this a fair game?

thank for the explanation. but still dont know how to incorporate "The amount will be doubled every time a head is obtained and halved every time a tail appears" in part a). could you elaborate a bit more. Thanks!