Tossing a coin 3 times: Is it a fair game?

  • Context: High School 
  • Thread starter Thread starter humanino
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the fairness of a game where two players, Nicolas and George, toss a coin to achieve their respective configurations of Heads and Tails (HTT for Nicolas and HTH for George). The conversation explores the implications of the game mechanics, the probability of winning, and the average number of tosses required to achieve each configuration.

Discussion Character

  • Debate/contested
  • Mathematical reasoning
  • Exploratory

Main Points Raised

  • Some participants suggest that the game is fair since all sequences of three flips are equally probable.
  • Others argue that while the configurations may appear equally likely, the average number of tosses required to achieve HTH is 10, while HTT takes only 8, indicating a potential imbalance.
  • A participant mentions that the wording of the original problem may be misleading, as it does not clarify whether overlapping patterns count as multiple wins.
  • Some participants propose simulating the game to gather empirical data on the outcomes and average tosses required for each configuration.
  • There is a suggestion that if the game allows for overlapping patterns, it could skew the fairness, favoring certain configurations over others.
  • A participant shares their simulation results, claiming both configurations win evenly on average, though others challenge the validity of these results.
  • Technical discussions arise regarding the implementation of simulations in different programming environments and the interpretation of results.

Areas of Agreement / Disagreement

Participants do not reach a consensus on whether the game is fair. There are competing views regarding the implications of the average number of tosses and the interpretation of the game's rules, leading to ongoing debate.

Contextual Notes

Some participants express uncertainty about the wording of the problem and its implications, indicating that assumptions about overlapping patterns and their effects on winning conditions remain unresolved.

Who May Find This Useful

This discussion may be of interest to those exploring probability theory, game theory, and the nuances of statistical simulations in competitive scenarios.

  • #31
All right...
Code:
#define HEAD 1
#define TAIL 0

int toss1, toss2, toss3;
int Nicolas, Henry;
int LNicolas, LHenry; 
int BNicolas, BHenry; 

int nowinner(int Tosses) 
{
        if (!BNicolas && toss1 == HEAD && toss2 == TAIL && toss3 == TAIL)
        {       
                Nicolas++;
                LNicolas += Tosses; 
                BNicolas = 1;
                return 0;
        }       
        if (!BHenry && toss1 == HEAD && toss2 == TAIL && toss3 == HEAD)
        {       
                Henry++;
                LHenry += Tosses; 
                BHenry = 1;
                return 0;
        }       
        return 1;
}

int main(int argc, char* argv[]) 
{
        Nicolas = Henry = LNicolas = LHenry = 0;
        int Ngames=100000, Tosses; 

        for(int game=0;game<Ngames;game++)
        {       
                BNicolas=0;
                BHenry=0;
                toss1 = rand() % 2;
                toss2 = rand() % 2;
                toss3 = rand() % 2;
         
                Tosses = 3;

                /* while(!BNicolas&&!BHenry) */ /* will give 5 and 5 */
                while(!(BNicolas&&BHenry)) /* will give 8 and 10 */
                {       
                        nowinner(Tosses++);
                        toss1 = toss2;
                        toss2 = toss3;
                        toss3 = rand() % 2;
                }       
        }       
        printf("Probabilities to win : Nicolas=%2.6f Henry=%2.6f\n",float(Nicolas)/Ngames,float(Henry)/Ngames);
        printf("Number of tosses to victory : Nicolas=%2.6f/ Henry=%2.6f\n",float(LNicolas)/Nicolas,float(LHenry)/Henry);
        return 0;
}
 
Mathematics news on Phys.org
  • #32
Actually, it's so confusing... The original observation I had was "the average distance between both configurations in the limit of an infinitely long chain of tossing". I came up with the game, but that was plain wrong as I said. Sorry about that. I still think the observation is kind of interesting :rolleyes:
 
  • #33
humanino said:
for each game, you toss until you have found both configurations. "stop" counts how many configurations have been found for each game.

Why do you look for the second? First configuration found, game over.
 
  • #34
Borek said:
Why do you look for the second? First configuration found, game over.
I see that. As I said, it works in an infinite chain of tosses, as the average number of tosses between configurations. I did that as well, it gives the same results as searching for the second. The difference is in between the number of tosses until the configuration ignoring the other configuration.

Once again, the original game description simply does not work.
 
  • #35
Attached are the distributions of the number of tosses, in the case of an infinite chain (or if you keep tossing after having found the first one), and in the case where you stop tossing as soon as you found one of the two.
 

Attachments

  • avg_inf.gif
    avg_inf.gif
    9.4 KB · Views: 344
  • avg_till_firg.gif
    avg_till_firg.gif
    8.8 KB · Views: 474
  • #36
From what I gather, the original problem should have specified that each player tosses his own coin.
 
  • #37
Incidentally, it's not difficult to work these things out algebraically with matrix arithmetic.

For example, if your question is "how long before you get HTH?", you can solve it as follows.

There are four relevant states, determined by the last few flips of the coin
. TT
. HT
. TTH
. Victory
. HH

After three flips, the distribution on these states is given by the vector
<br /> v_3 = \left[ \begin{array}{c} 1/4 \\ 1/4 \\ 1/4 \\ 1/8 \\ 1/8 \end{array} \right]<br />

And after each individual flip, the transition matrix is
<br /> A = \left[ \begin{array}{ccccc}<br /> 1/2 &amp; 1/2 &amp; 0 &amp; 0 &amp; 0 \\<br /> 0 &amp; 0 &amp; 1/2 &amp; 0 &amp; 1/2 \\<br /> 1/2 &amp; 0 &amp; 0 &amp; 0 &amp; 0 \\<br /> 0 &amp; 1/2 &amp; 0 &amp; 1 &amp; 0 \\<br /> 0 &amp; 0 &amp; 1/2 &amp; 0 &amp; 1/2<br /> \end{array} \right]<br />
(e.g. the first column says that TT transitions to each of TTH and TT with probability 1/2)

The distribution on these states after n flips is given by
<br /> v_{n} = A^{n-3} v_{3}<br />

from which you can compute whatever you want. For example, the probability of not winning on or before the n-th flip is

<br /> \left[ \begin{array}{ccccc} 1 &amp; 1 &amp; 1 &amp; 0 &amp; 1 \end{array} \right] A^{n-3} v_3<br />

and the probability that you win on the n-th flip is (for n \geq 4):

<br /> (1/2) \left[ \begin{array}{ccccc} 0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 \end{array} \right] A^{n-4} v_3 \right]<br />


If you think about it more, I'm sure you can come up with a more economical selection of states. Maybe use a new symbol "S" for the starting state, so you can start the analysis at 0 flips instead of 3.
 
Last edited:
  • #38
Borek said:
Why do you look for the second? First configuration found, game over.
Looking for the second win (and by the other person) changes the problem significantly. The two players have an equal probability of winning. Moreover, the expected value of the number of tosses before a win is equal for the two players: five throws. Making it so that the coin tosses continue until a winning configuration is found for each player is a different problem.
 
  • #39
D H said:
Looking for the second win (and by the other person) changes the problem significantly. The two players have an equal probability of winning. Moreover, the expected value of the number of tosses before a win is equal for the two players: five throws. Making it so that the coin tosses continue until a winning configuration is found for each player is a different problem.

That's exactly what I was pointing at, humanino was just solving completely different question :smile:
 
  • #40
Borek said:
That's exactly what I was pointing at, humanino was just solving completely different question :smile:
I just thought initially there was something interesting going on. At this point, the problem has been explained by several methods, and I take the opportunity to thank Hurkyl for his contribution. I said several times that it was a pity I misstated the initial problem.
 
  • #41
Yes, definitely Hurkyl's post is very interesting. Sometimes selection of good formalism to describe the problem is half of the succes.
 
  • #42
The problem becomes more interesting if the choices are htt vs. ttt. The odds are not even close to 50/50.
 
  • #43
Redbelly98 said:
The problem becomes more interesting if the choices are htt vs. ttt. The odds are not even close to 50/50.
What do you get ?
87.5/12.5 ?
 
  • #44
Yes, 87.5/12.5 favoring htt.

The reason:

For ttt to win, it must win on the very 1st 3 coin tosses (1/8 chance of that). Otherwise, htt must happen before ttt. I.e., if ttt does not occur until after the 1st 3 tosses then it will be preceded by an "h", in which case htt wins.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 20 ·
Replies
20
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 45 ·
2
Replies
45
Views
6K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K