Find the expected value of a coin flipping game

AI Thread Summary
The discussion revolves around calculating the expected value of a coin-flipping game where players toss six coins. If the outcome yields 3 heads, players receive nothing; 4 or more heads result in receiving dollars equal to the number of heads, while 2 or fewer heads require a re-toss. Initial calculations led to confusion regarding the probabilities and expected values, particularly for the scenarios involving 3 heads and the adjustments made to the game's rules. Ultimately, the expected value was recalculated to approximately 3.46, highlighting the game's positive expectation when fewer than 3 heads are obtained initially. The conversation also touched on the potential for computer simulations to verify these outcomes.
docnet
Messages
796
Reaction score
488
Homework Statement
.
Relevant Equations
.
Screen Shot 2021-11-09 at 9.38.36 AM.png

summary: you toss six coins. if you have 3 heads, you don't get any money. if you have 4 or more heads, you get the number of heads amount of dollars. if you have 2 or less heads, you toss six coins again and get the number of heads amount of dollars.

the number of ways to get 0 head ##\frac{6!}{(6)!1!}=1##
the number of ways to get 1 head ##\frac{6!}{(6-1)!1!}=6##
the number of ways to get 2 heads ##\frac{6!}{(6-2)!2!}=15##
the number of ways to get 3 heads ##\frac{6!}{(6-3)!3!}=20##
the number of ways to get 4 heads ##\frac{6!}{(6-4)!4!}=15##
the number of ways to get 5 heads ##\frac{6!}{(6-2)!2!}=6##
the number of ways to get 6 heads ##\frac{6!}{(6-2)!2!}=1##

$$P(X<3)=\frac{22}{2^6}$$
$$P(X=3)=\frac{20}{2^6}$$
$$P(X>3)=\frac{22}{2^6}$$

$$E(X<3)=E(X)=3$$
$$E(X=3)=0$$
$$E(X>3)=\frac{15}{21}\cdot 4+\frac{6}{21}\cdot 5+\frac{1}{21}\cdot 6=\frac{32}{7}$$

the expected value of the game is
$$P(X<3)E(X<3)+P(X=3)E(X=3)+P(X>3)E(X>3)$$
$$=\frac{22}{2^6}\cdot 3 +\frac{20}{2^6}\cdot 0 + \frac{22}{2^6} \frac{32}{7}=\frac{583}{224}\approx 2.6$$
 
Physics news on Phys.org
If I was given this question, the first thing I would say is "what happens if you get exactly 3 heads?" The question doesn't say. You seem to be assuming this means you get nothing, but is that correct? I'd say the game is not fully specified.
PS in calculating E(X>3), the probabilities should be 15/22 etc., not 15/21 etc.
 
  • Like
Likes Master1022, docnet and FactChecker
mjc123 said:
If I was given this question, the first thing I would say is "what happens if you get exactly 3 heads?" The question doesn't say. You seem to be assuming this means you get nothing, but is that correct? I'd say the game is not fully specified.
PS in calculating E(X>3), the probabilities should be 15/22 etc., not 15/21 etc.
oops yes rhat was a mistake. It turns out my professor changed the prompt to "equal to greater than 3 heads".$$P(X\geq 3)=\frac{42}{2^6}$$
$$E(X\geq 3)=\frac{20}{22}\cdot 3+\frac{15}{22}\cdot 4+\frac{6}{22}\cdot 5+\frac{1}{22}\cdot 6=\frac{78}{11}$$

the expected value of the game is
$$\frac{22}{2^6}\cdot 3 +\frac{42}{2^6}\frac{78}{11}= \frac{2001}{352}\approx5.68$$
 
docnet said:
oops yes rhat was a mistake. It turns out my professor changed the prompt to "equal to greater than 3 heads".$$P(X\geq 3)=\frac{42}{2^6}$$
$$E(X\geq 3)=\frac{20}{22}\cdot 3+\frac{15}{22}\cdot 4+\frac{6}{22}\cdot 5+\frac{1}{22}\cdot 6=\frac{78}{11}$$

the expected value of the game is
$$\frac{22}{2^6}\cdot 3 +\frac{42}{2^6}\frac{78}{11}= \frac{2001}{352}\approx5.68$$
Can you write a computer simulation to check that?

In any case, that number must be too high. It means you're getting 5-6 heads almost every time.
 
  • Like
Likes docnet
PeroK said:
Can you write a computer simulation to check that?

In any case, that number must be too high. It means you're getting 5-6 heads almost every time.
ahhhhh! I forgot to divide everything in ##E(X\geq 3)## by 42 instead of 22 so ##E(x\geq 3)## is smaller.

$$E(X\geq 3)=\frac{20}{42}\cdot 3+\frac{15}{42}\cdot 4+\frac{6}{42}\cdot 5+\frac{1}{42}\cdot 6=\frac{26}{7}$$

the expected value of the game is
$$\frac{22}{2^6}\cdot 3 +\frac{42}{2^6}\frac{26}{7}\approx 3.46$$

And I have never tried writing a computer simulation to check my answers. I wouldn't know where to start, tbh.
 
  • Like
Likes PeroK
docnet said:
ahhhhh! I forgot to divide everything in ##E(X\geq 3)## by 42 instead of 22 so ##E(x\geq 3)## is smaller.

$$E(X\geq 3)=\frac{20}{42}\cdot 3+\frac{15}{42}\cdot 4+\frac{6}{42}\cdot 5+\frac{1}{42}\cdot 6=\frac{26}{7}$$

the expected value of the game is
$$\frac{22}{2^6}\cdot 3 +\frac{42}{2^6}\frac{26}{7}\approx 3.46$$

And I have never tried writing a computer simulation to check my answers. I wouldn't know where to start, tbh.

I think it's easier to observe that if you get fewer than 3 heads the first time, you play a game whose expected outcome is $3 and if you get at least 3 heads the first time you get an amount equal to the number of heads. So the expectation should be <br /> \frac{22}{2^6} \cdot 3 + \frac{1}{2^6}\left( 20 \cdot 3 + 15\cdot 4 + 6 \cdot 5 + 6 \right) which is your result.

However, rather than do that calculation I would say that the expected number of heads from flipping six coins is 3 and this game has a strictly higher expectation. So at $3 I know my expected outcome is positive.
 
pasmith said:
So the expectation should be <br /> \frac{22}{2^6} \cdot 3 + \frac{1}{2^6}\left( 20 \cdot 3 + 15\cdot 4 + 6 \cdot 5 + 6 \right).
That is the calculation that leads to ##3.46##.
 
another approach, binomial with ... n=6 ... k=0, 1, 2 ... p=0.5

P = [n! / (k! * (n-k)!)] * [(p**k) * (p**(n-k))]

2nd portion in square brackets will always be .01563 when p=0.5 and n=6

P(0) = [6! / (0! * 6!)] * .0156 = 1 * .0156 = .01563
P(1) = [6! / (1! * 5!)] * .0156 = 6 * .0156 = .09378
P(2) = [6! / (2! * 4!)] * .0156 = 15 * .0156 = .23445

P(3+) = 1 - 01563 - .09378 - .24445 = .65614
 
Last edited:
Back
Top