Your friend tosses 3 coins and you roll a single die. If the number on the die you roll is less than or equal to the number of heads that your friend tosses, you win $X. If not, you lose $1. How large should X be in order for this to be a fair game?

Htt tHt ttH

HHt tHH HtH
HHH
ttt

Each of these probabilities is 1/8

Now multiple each by the probability of getting the die equal or less..

example:
HHt*2/6=2/48
HtH=2/48
and so on Add all the cases, and add the probabilities. That is the probability of winning.

Expected value= Probability of winning*X-(1-Prwinnig)1

So you have to calculate X so that the expected value is =0 for a fair game.