(September 30, 2017 at 2:37 am)pool the matey Wrote: Ohh so that's the problem.
In that case, I want to show an example.
So you make 12 coin toss. You get 3 heads and 9 tails. So your question is how can we make this fair as in instead of getting 3 heads and 9 tails how can we get 6 heads and 6 tails.
Isn't that a bit easy then?
I made 12 tosses so first I divide it by 2. Now I have 6.
Then I do two subtract operation: 6-3=3 and 6-9=-3
So that means I have to flip 3 tails to heads because there is less heads so that becomes 3+3=6 heads or I can flip 3 tails to heads because there is more tails so that becomes 9-3=6 tails.
So now I have 50% heads and 50% tails...
I think you've misunderstood the problem. You want to simulate a single fair coin toss, not 12. Besides, how do you know that tails will always come up 9 times out of 12. Maybe if you'd tossed 12 more coins, you would end up with 12 heads in a row. The point is you don't know the probability of flipping heads or tails.