I know this is easy, but my high school maths has failed me.
Question: I generate an 8 letter random string. What is the probability that within these 8 letters I will find a particular 4 letter word?
Each letter is A-Z. Repeats are allowed. What are the chances my string will contain the word "ABCD" for example?
EDIT: To clarify.. I do care about ordering. I want to know if "ABCD" occurs within my randomly generated string. But I don't care if "ABDC" occurs. In other words I want to know the probability of A followed by B followed by C followed by D occurring.
If it helps to understand why I am asking this. Our software generates 8 letter random strings which are used for logins to a web site. Very occasionally, these 8 letter random strings contain swear words. I want to know how to calculate the probability of a particular swear word occurring in a randomly generated 8 letter string.