Link shortening service bit.ly allows you to, as you might expect, shorten URLs. URLs get shortened using a 7-character string. The alphabet of this string consists of a-z, A-Z and 0-9.
Today, Dutch police have used bit.ly for a tweet about the finding of a body of a girl that was missing for two weeks. Unfortunately, the bit.ly string contained the word "Dead": https://twitter.com/PolitieUtrecht/status/918507900452077568.
That got me wondering: what is the probability that this exact 4-character string will appear in a 7-character string (generated with an alphabet of 62 characters)?
Or, more generally, what is the probability that a defined string $\alpha$ with length $S$ appears somewhere in a string $\beta$ with length $M$, with $M$ being a randomly generated string with an alphabet of 62 characters?
At first I thought "7 positions, 62 possibilities" means $62^7$ combinations, but I'm sure that's not right -- that's the possibility for a 7-character string (e.g. the complete string).
What is a proper method for calculating this?