Scenario: Coin bag of 8 weighted coins containing coins weighted for heads (0.5, 0.5, 0.6, 0.6, 0.7, 0.9, 0.5, 0.5) so thats 8 coins. I want to know the probability of picking HHT, picking one out at a time without replacement.

I've calculated a theoretical probability of 12.7%

BUT I've got some VBA knowledge so in excel I wrote some code to do the experiment and every time it comes out around 14.6% even when i've left it running for 500,000 tries it still never works out to be what I expect.

Is there something wrong with my code or is my calculation wrong?

Any help would be appreciated.

Lew