You have

coins in a bag. `NUM_COINS`

of them are unfair in that they have a `NUM_UNFAIR_COINS`

chance of coming up heads when flipped (the rest are fair coins). You randomly choose one coin from the bag and flip it `PERCENT_CHANCE_UNFAIR_HEADS`\%

times.`NUM_FLIPS`

What is the probability, written as a percentage, of getting

heads? Round your answer to the nearest hundredth of a percent.`NUM_FLIPS`

`ANSWER`

You can only pick a fair coin or pick an unfair coin. There is no other outcome.

What chance do you have of picking an unfair coin? How about a fair coin?

An unfair coin occurs

of the time.`UNFAIR_COIN_FRACTION_STRING`

A fair coin occurs the rest of the time, or

of the time.`FAIR_COIN_FRACTION_STRING`

For that

of the time that you pick an unfair coin,
what is the chance of flipping `UNFAIR_COIN_FRACTION_STRING`

heads using that unfair coin?`NUM_FLIPS`

The chance is

, or
`UNFAIR_HEADS_PERCENT_FORMULA`

.`UNFAIR_HEADS_DECIMAL_FORMULA`

Now, then, your chance of both picking the unfair coin and also flipping

heads--the chance that both these events occur--is what?`NUM_FLIPS`

It is

.`UNFAIR_COIN_FRACTION_STRING` \times `UNFAIR_HEADS_DECIMAL_FORMULA`

Now, the other possibility, picking the fair coin and flipping

heads is what?`NUM_FLIPS`

It is

.`FAIR_COIN_FRACTION_STRING` \times `FAIR_HEADS_DECIMAL_FORMULA`

How do you combine these two mutually exclusive events to find the chance that either occurs?

Add them! So your answer is

+
`UNFAIR_COIN_FRACTION_STRING` \times `UNFAIR_HEADS_DECIMAL_FORMULA`

, or
`FAIR_COIN_FRACTION_STRING` \times `FAIR_HEADS_DECIMAL_FORMULA`

.`ANSWER`\%