Ah very cool... This set me off on the right track. I think I found an inductive type explanation which I will try to go through.
So supposing we find ourselves in a given state, there is a chance, p, that we will transition to the other state and hence end up with length of 1. On the other hand there is 1-p chance that we will stay, and have a length 1 + L' where L' is the length of whatever happens after that. So the length, L, of our sequence is then:
L = 1(p) + (1-p)(1+L')
But L' is just the next iteration of the same kind of process that produces L, and so their expected values should be the same, so L = L' leaving:
L = 1/p
Which gels with what I found above... But on the other a little learning is a dangerous thing so I am not 100% confident that it is up to scratch.
Incidentally, my class was the last set who did not have intro statistics as a core course... Instead we did electromagnetism, used approximately never in the rest of the curriculum. Meanwhile statistics knowledge is something we had to cobble together over time as required. Each time the activation energy of finding a textbook and doing it properly from the start was just a little bit too high for what was at stake. It makes me wonder about the different roles of structured or formalised learning compared to figuring it out yourself. Knowing where to start looking is one of the big types of knowledge that a curriculum affords you I think.
Considering the circumstances, now is probably as good a time as any to bury the hatchet and dive into khanacademy or whatever. Personally that is probably what I will do as this has felt like a big hole in my competency for a while now. But on a general level, I wonder about when the right way is to dive in, mess around, fail, learn by doing etc. vs. deciding that you should rather let someone else guide the process, even if it means starting at a very basic level. I'm sure we go back and forth between these, and it's probably not meaningful to try and say that there is a "optimum" way...