Suppose I have a bag with 10 slips of paper in it. Eight of these have a 2 on them and the other two have a 4 on them. How many 4's do I have to add before the expected value is at least 3.5?
\(E[X] = 2 \cdot \dfrac{8}{n}+4\cdot \dfrac{n-8}{n} = \\ \dfrac{16}{n}-\dfrac{32}{n} + 4 = \\ 4 - \dfrac{16}{n}\)
\(3.5 = 4 - \dfrac {16}{n}\\ \dfrac{16}{n} = \dfrac 1 2\\ n = 32\\ \text{Thus we must add }32-10 = 22 \\ \text{4's to the bag}\)
Call the number of additional slips showing a '4", x
So we have
2 [ 8 / (10 + x) ] + 4 [ 2 + x ] / [ 10 + x ] = 3.5 simplify
16 / (10 + x) + [ 8 + 4x] / (10 + x) = 3.5
16 + 8 + 4x = 3.5 ( 10 + x)
24 + 4x = 35 + 3.5x
.5x = 11
x = 22