this post was submitted on 22 May 2024
17 points (94.7% liked)

Daily Maths Challenges

206 readers
1 users here now

Share your cool maths problems.



Complete a challenge:


Post a challenge:


Feel free to contribute to a series by DMing the OP, or start your own challenge series.

founded 9 months ago
MODERATORS
17
Coin-flipping game (lemmy.world)
submitted 8 months ago* (last edited 8 months ago) by zkfcfbzr@lemmy.world to c/dailymaths@lemmy.world
 

We're playing a game. I flip a coin. If it lands on Tails, I flip it again. If it lands on Heads, the game ends.

You win if the game ends on an even turn, and lose otherwise.

Define the following events:

A: You win the game

B: The game goes on for at least 4 turns

C: The game goes on for at least 5 turns

What are P(A), P(B), and P(C)? Are A and B independent? How about A and C?

all 13 comments
sorted by: hot top controversial new old
[–] Enkers@sh.itjust.works 4 points 8 months ago* (last edited 8 months ago) (2 children)

Are all games played to completion? Assuming yes,

answer

P(A) = Sum[1/4^n,{n,1,∞}] = 0.333...
P(B) = 1/8
P(C) = 1/16

One of A,B or A,C is dependent, as it'd flip the polarity of the remaining games, the other is independent, as it wouldn't. I'm not too worried about which is which, as it's just an off-by-one error. xD

Assuming no, You'd have to know the distribution of when games were abandoned, I'd think.

[–] zkfcfbzr@lemmy.world 5 points 8 months ago* (last edited 8 months ago) (1 children)

Games are always played to completion, though if you wanna make it (barely) more challenging you can add in a 5% chance for both players to get bored and give up on each round (before flipping), leading to a loss. Though it seems unlikely - after flipping a quarter 20 times and getting Tails every time, I'd be inclined to keep flipping if anything.

responseThese are correct. It is possible to reason out which of B and C is independent of A without going into the numbers.

[–] Enkers@sh.itjust.works 3 points 8 months ago

after flipping a quarter 20 times and getting Tails every time, I'd be inclined to keep flipping if anything.

It's a sunk cost fallacy, it's never too late to get bored and give up. ;)

[–] el_psd@sh.itjust.works 3 points 8 months ago (1 children)

I read the other answers in the thread, and I definitely would have gotten this wrong without that. This answer stands a chance at least

IndependenceA and C are independent, A and B are not. Since you have a chance to win on turn 4 that you do not have on turn 1, P(A|B) = 1/2 + 1/16 + 1/64... = 7/12 != P(A). Conversely, P(A|C) = 1/4 + 1/16 + 1/64... = 1/3 = P(A)

[–] zkfcfbzr@lemmy.world 3 points 8 months ago (1 children)

responseThis is the correct answer, although P(A|B) should actually be 2/3 rather than 7/12 - I think you meant 1/2 + 1/8 + 1/32 + ...?

The reasoning is good, either way. Since past flips won't affect future flips, if the player has made it to turn 5, an odd turn, then their future prospects are no different than they were on turn 1, another odd turn - so A and C are independent. Similarly, A and B are dependent because your chances of winning and losing effectively flip: If you've made it to an even turn, then you now win if it takes an odd number of flips from there to get Heads.

So it should be an almost paradoxical-seeming situation: You win 1/3 games overall, you win 2/3 games that make it to turn 2, you win 1/3 games that make it to turn 3, you win 2/3 games that make it to turn 4, 1/3 that make it to turn 5, etc.

[–] el_psd@sh.itjust.works 3 points 8 months ago

responseThanks for the catch! Once I noticed that the probability of winning on the initial flip was the difference between the two, I stopped thinking about the other terms...

[–] mathemachristian@lemm.ee 2 points 7 months ago* (last edited 7 months ago)

solutionSay Omega = N\{0}, sigma algebra is power set of N and the probability mass function is p(n)=2^-n .

Then A is all the even numbers, B all numbers at least 4, C all numbers at least 5.

P(A)=sum{2^-n^ | n is even} = sum{2^-2n^ | n is at least 1} = sum{4^-n^ | n is at least 1} = 1/(1-1/4)-1=1/3

P(B) = P(N\{1,2,3}) = 1 - 1/2 - 1/4 - 1/8 = 1/8

P(C) = 1/16 similarly

P(A and B) = P(A\{2}) = 1/3 - 1/4 = 1/12 =/= P(A)P(B) therefore not independent

P(A and C) = P(A\{2,4}) = P(A)P(C) with a similar calculation and therefore independent