Suppose we have a bag with 10 slips of paper in it. Eight slips have a 3 on them and the other two have a 9 on them. How many 9's do we have to add to make the expected value equal to 8?
We must add 45 slips with a 9 on them to make the expected value equal to 8.
(8*3 + 2*9 + n*9)/(n + 10) = 8
You can find the number of slips, n, from this.