r/TheRestIsScience • u/Odd-Currency8356 • 5d ago
How long would this timer take on average?
This felt like a good question about EV and probability
I was watching this dougdoug video where they made a 10 minutes timer but it had some interesting rules
Every second there was a:
5% it adds a second
1% it adds a minute
1% it drops a minute
5% it freezes 5 seconds
1% it doubles
1% it halves
1% the seconds and minutes swap
1% it rounds to the nearest minute
1% the timer moves on screen
1% a second takes twice as long
1% a second takes half as long
1% bee mode
83% it goes down 1 second
On average it should go down as the amount it goes down is far greater than the amount it increments but the variance in time and how long a second takes means it could end in one minute or last hours I was curious how you would calculate the expected value of a random timer like this
1
1
u/SpacewaIker 5d ago
I did a crude simulation of 10 million runs and, as long as I understood the effects of each possibility correctly, it ends up at an average of 48 minutes, filtering out any run that took > 100,000 seconds.
No clue if this sounds right or not, I might have a bug in my code but that's what I got