Let's suppose we can toss a fair coin as many times as we want (i.e. a coin that gives heads and tails both with probability equal to 1/2).

The first player chooses a triplet (e.g. THH), afterwards the second player chooses another triplet (e.g. HTH). The coin is tossed until one of the chosen triplets appears. The player whose triplet appears first wins.

With the choices above, if the sequence of tosses is HTTTHTTHH, then the first player wins because the triplet HTH did not show up, while the triplet THH appears in the last three tosses. Instead, if the sequence of tosses is HTTHTH, the second player wins.

Keep in mind that when we start the game, we have no way of knowing how many tosses will be needed to end the game.

Coins tossing
→ I The game

A single game
:
here you can practice with the game rules.

- I-1 A single game
- I-2 You choose first
- I-3 The computer chooses first
- I-4 Let's work on the strategy

Coins tossing
→
I The game
→ I-1 A single game

We will start playing 5 games. You choose a triplet, afterwards the computer chooses its triplet.

You choose first (5 games)
: Choose a triplet.

- I-1 A single game
- I-2 You choose first
- I-3 The computer chooses first
- I-4 Let's work on the strategy

Coins tossing
→
I The game
→ I-2 You choose first

Whatever triplet you choose, the computer will always be able to choose one with a higher probability of winning than yours.

Remember this is a random experiment: even if the computer have chosen a triplet with a higher probability than yours, still luck matters. The computer could actually turn out to be unlucky and lose the game.

Have a look at the long run: let's play 20 games.

You choose first (20 games)
: Let's play 20 games.

You can play many times trying to understand the strategy the computer uses to choose its triplets.

Also, you can try to find the triplets that can better challenge the computer's luck (and maybe you can even win).

You choose first (20 games)
: Let's play 20 games and afterwards let's
have a look at all the outcomes.

Now the computer will make the first choice. If you have understood which are the ``weakest'' triplets, in this way you can try to identify the triplet that best responds to the computer's choice.

The computer chooses first (5 games)
:
The computer first chooses a triplet and you can respond by choosing yours. Try to find out which triplet can beat the one chosen by the computer.

Have a look at the long run: let's play 20 games.

The computer chooses first: (20 games) : let's play 20 games.

The computer chooses first: (20 games) : let's play 20 games.

- I-1 A single game
- I-2 You choose first
- I-3 The computer chooses first
- I-4 Let's work on the strategy

Coins tossing
→
I The game
→ I-3 The computer chooses first

Now we will try to figure out how to make educated guesses in playing the game. Let's recap a bit of facts about probability.

We will start with the easiest tasks and then we will work on more intriguing problems.

- I-1 A single game
- I-2 You choose first
- I-3 The computer chooses first
- I-4 Let's work on the strategy

Coins tossing
→
I The game
→ I-4 Let's work on the strategy

Let's start with the computation on the easier probabilities

Probability of a triplet

Comparing probabilities

a coin tossing game.

: probability, interactive mathematics, interactive math, server side interactivity

Please take note that WIMS pages are interactively generated; they are not ordinary HTML files. They must be used interactively ONLINE. It is useless for you to gather them through a robot program.

- Description: a coin tossing game. interactive exercises, online calculators and plotters, mathematical recreation and games
- Keywords: interactive mathematics, interactive math, server side interactivity, mathematics,, probability