A fun little probability puzzle for you.

I think I get what you’re asking for, right, okay.

I’ll do it that way. I don’t think it will make a difference, but I’ll do it that way.

When you flip a normal coin, it’s probably a coin that’s been flipped before. So if you flip 3 in a row, it’s not the first 3 flips that coin has ever experienced in its life, it’s part of a really long sequence of flips. It’s very silly that you think this matters.

But I’ll humour you anyway, I like programming.

You need to write one that repeats 250000 times a scenario where 3 heads have been flipped.

And nothing in between.

I will humour your misguided intuitions, no problem.

aaaxaaaxaaax and so on infinitely. Or up to 250000 repetitions.

jsfiddle.net/rp6e8f7v/2/

There you go, 4 separate flips every time. I only count the heads/tails of the 4th flip, only when it was preceded by 3 heads.

I said nothing in between homie.

The odds that you are going to eventually get a tails are different than those for whether you are going to get tails on the next bet. The odds for the next bet are identical to the odds for the last bet.

Just common sense tells you that if you had better odds after 3 heads - all you have to do is go to a casino - wait to see 3 blacks on roulette - then place a big bet - more often than not you would win and the casino would go out of business (because everyone would be doing that same thing).

I have no idea what that means homie. I think there’s a good chance that what you’re asking for doesn’t even make sense.

I once had a boss that was telling me how to design something. He said “give me a rectangle”, so I did. And he said “make it as tall as it is wide”, and so I did.

And then he said “Wait a minute, that’s a square!”

You’re giving me those vibes right now origami.

Think about it this way.

If FJ here writes a program like the one I am asking, one mmillion coin flips where all first, second and third results are heads, such that aaa, and the fourth is random, such that aaax, and you had a 50-50 distribution of x=a and x=b, then you would get a total amount of a that is greater than 50, by a lot. About 25 more I guess. So the flip would not be 50-50.

You’re not asking for something that makes sense. Maybe you’ve never written software before, or directed someone to write software before, but conceptually what you’re saying doesn’t add up.

It’s not necessarily easy to be in the right headspace for good software design, so if it’s not a skill you’ve practiced before, that’s fine, but what you’re asking for doesn’t make sense.

Let’s say aaaxaaaxaaaxaaaxaaaxaaaxaaaxaaax where x can either be a or b, you would not expect to find 4 b’s. You would expect to find, basically 8 b’s.

I’ve written the software in 2 different ways.

One way where it’s just a bunch of flips, not grouped into 4s, and I only record a flip after it was preceded by exactly 3 heads.

Then I changed it up and did it in groups of 4.

The experiment’s over. Your intuition was not correct mate. 3 heads is just as likely to be followed by another heads as it is a tails. Both versions of the software bare that out.

If reality says one thing and your program another, then your program is wrong.

aaxaaxaaxaax.

If the coin is not a trick coin, how many of those x’s should be b?

I knew it would be a waste of time showing you experimentally that you’re wrong lmao!

No amount of evidence or reason could convince you. Goddamnit, what a waste of time. This place is full of people with big talk but even experimental evidence won’t change their mind.

Your experiment is wrong, and this is why. Listen.

In the programs you wrote, both of them, there were a large number of non aaax combinations that gave arbitrary amounts of a’s and b’s that offset the the need for x=b.

If you modified the first program to remove all aaax instances, you would not get a 50 50 distribution of a’s and b’s. Does that scan?

No, it doesn’t “scan”. It’s a fucking coin flip mate. Of course there’s a large number of non “aaax” combinations. It’s fucking random.

If I could guarantee they’d all be aaax combinations, it wouldn’t be random.

But I’m only COUNTING the aaax combinations. I’m only counting the X if it was preceded by 3 As.

Is that not the right way to do it?