Huh?
my gut say half N, so for a regular dice, 3 to 4.
How long to roll a 6?
First roll - 1/6 chance of a 6, 5/6 of not.
Second roll, no 6 - ditto - (5/6)(5/6)=25/36 = 0.69
Third roll, no 6 - (5/6)(5/6)*(5/6)=125/216=0.57 Pretty close to half.
Fourth - 5^4/6^4=625/1296=0.482
So by the fourth roll there is a better than 50% chance it includes a 6, and a 0.48 chance there is still no 6.
ETA OK, I think what you are getting at is: the MEDIAN number of rolls to get a 6 is 4. Half the time it will be less than that, and half the time it will take more. But that is not what is meant by the expectation.
You are missing that the odds of it taking a relatively long time to get a 6 aren’t really that low. This is the “fat tail” mentioned above.
For example, the odds you don’t get a 6 in the first 10 rolls is 16%. The odds you don’t get one in 20 rolls is nearly 3%. It’s summing up all of those “long streaks” that makes the mean number of rolls 6 (or N for an N-sided die).
Also, if you set (1-p)^x = 1/2 you get x=-\log 2/\log(1-p), not N/2. Though if p is small then N\log 2 is a good approximation. (But log(2) is much bigger than 1/2, around 0.69.)
I read your post anyway . I think it’s an excellent observation. It’s not quantitative, but does give good intuition why the average would be biased toward a higher value in the independent roll case.
It’s easy to see in an artificial situation. Suppose you have a magic coin that flipped an alternating H-T. The required flips to get an H is (1+2)/2=1.5 on average.
Now suppose you get the repeating sequence H-H-T-T. Same frequency, same average gap length. But now the required flips becomes (1+1+3+2)/4=1.75. The average went up because even though you’re doing better if you land in the middle of the H-H run, you’re much worse if you’re in a T-T run. You pay the cost not just of having a long gap, but also the increased odds of being in that gap. It’s sort of an N^2 factor in there.
Independent rolls are clearly going to have a wider distribution of gap lengths than a fixed permutation of rolls. The average will be the same, but as you noted, the longer runs hurt you more than the short runs help you.
Whether it’s possible to tweak the idea into something that gives you E=N exactly, though, I couldn’t say.
For the rest of the crowd who weren’t alerted and so didn’t get a chance to see the ephemeral post, here is an improved version after I had a chance to recheck my thinking complete with proof.
Imagine that we have a massive sequence of N-sided die rolls, I call a “streak” to be a sequence of consecutive rolls with less than N, followed by a final “hit” where the roll is N. By the discussion above, the average length of a streak will be N, but some will be smaller and some will be longer. I pick a random point in this long sequence plop down a pin, and count the number of rolls up to and including the next time I get a hit.
Now if I were to pick a streak at random and then pick a random point in that streak then the intuition that if the average length of a streak is N, and a random point in that streak could be any where along it, then the intuition would be correct and distance to the end would be about half the length of the streak, or N/2.
But I didn’t pick a random streak, I picked a random point on my list, my pick is more likely to hit a long streak than a small streak.
As shown above the probability of a given streak being of length k is k*p(1-p)^k where p=1/N, but then this streak ends up counting k times in my list, so relative to other streaks a streak of length k will a a probability proportional to k*p(1-p)^k. To normalize it so the total probability is one we simply divide by the total sum ∑k*p(1-p)^k which from above we know is equal to N So if we divide the values above by N we get the probability of hitting a sequence of length k to be k/N*p(1-p)^{k-1}
OK now suppose I land in a streak of length K, how long until I get the next hit. Well if I hit the first point in the sequence it will be k-1 steps before I hit an N, if I hit the second it will be k-2 etc until the k-1st which will have one step, but if I hit the last one I will have to start over a whole new sequence to get to the next hit, and so will have an average of N hits.
So after the final average number of rolls to the end will be \frac{1}{k}\left(\sum_{i=1}^{k-1}i\ +N\right) which after some algebra is (k-1)/2+N/k
So now all we need to do is sum up the probabilities of k-streaks multiplied by their average length,
I was running out of steam in terms of transcribing equations at the end so using the summation equalities here to get between the second and third line is left as an exercise for the reader.
Ah. That’s an important point and a lot of apparent paradoxes involve that kind of issue: If a thousand customers come up to a clerk in a day and 999 require a second of interaction but one requires 7.5 hours of interaction, the average time the clerk spends with a customer is small, but if you come into the store at a random time, the odds are that the clerk will be dealing with the current customer for a long time.
Here is a completely different take on it. Make a game in which you have to pay
$1 a roll to roll a die and I pay you off $p whenever you roll a 3. What should p be to make the game fair? Well, if we continue to play the game, it is clear that p = 6 is the unique value that makes it fair. So that must be the expected value here.
Well, only valid in that range if the definition you’re using for an infinite sum is the limit of finite partial sums. Other definitions exist, and I believe (though I’m not certain) that @Dr.Strangelove 's observation is correct under those definitions.
The reason for the duck emojis above was to avoid the inevitable bricks being thrown at my head .
But yes, that sum, among others (such as 1-1+1-1+...=\frac{1}{2} and 1+2+3+4+...=-\frac{1}{12}), are perfectly reasonable as long as we don’t demand pesky things like convergence for the result.
And as it happens, these sums aren’t just some mathematical trickery. They have real-world significance, such as when calculating the strength of the Casimir force.
And in particular, 1+2+4+8+16+… = -1 is an accurate reflection of how most computer systems store integers. Or maybe how they store integers is an accurate reflection of that sum, or something.
Yep. Though it seems the universe is indifferent to the base. 9 + 90 + 900 + \ldots=-1 as well.
The results show up in physics when there is some kind of “renormalization” at play, which is basically a way of pretending that a special kind of infinity is equal to 0. The sums behave nicely because they are just offsets from this “infinity”.
Maybe it is better to be more precise about this. If you want 1+2+4+8+\cdots to converge to -1 in the ordinary sense, you need to do something like work in the field of 2-adic numbers. If you do that, then 9+90+900+\cdots is merely another series with the same limit.