#1
|
|||
|
|||
Riddle -- Probability of Expectation
I was given a sheet of riddles for extra credit in my statistics class and got all but one of them right.
Here's the one that totally stumped me and pissed me off. In The Art of Shakespeare's Sonnets (Harvard Univ. Press, 1997), author Helen Vendler noted that each of the 14 lines of Sonnet 20 (one of 154 sonnets written by Shakespeare) includes the letters of the word "hues" and or the letters of the word "hews." Suppose that 154 monkeys sitting at 154 keyboards pounded out one sonnet apiece, each consisting of 14 lines and 36 alphabet letters each, with each letter equally likely. What is the probability that in at least one of the sonnets, every line includes the letters of the word "hues" and/or the letters of the word "hews?" What say youse? Prof. will not be giving the answer until the end of the semester. |
#2
|
|||
|
|||
Re: Riddle -- Probability of Expectation
How many letters are there in one line of a sonnet?
|
#3
|
|||
|
|||
Re: Riddle -- Probability of Expectation
krw,
[ QUOTE ] 14 lines and 36 alphabet letters each, with each letter equally likely. [/ QUOTE ] Based on the wording, I'm assuming the length of each line is limited to 36 letters. |
#4
|
|||
|
|||
Re: Riddle -- Probability of Expectation
[ QUOTE ]
Based on the wording, I'm assuming the length of each line is limited to 36 letters. [/ QUOTE ] Why not assume each line is 36 letters? Is this a 26 character keyboard? |
#5
|
|||
|
|||
Re: Riddle -- Probability of Expectation
I am going to take a shot at this one. Please feel free to correct any errors as you see fit.
First I solved to find the probability that H, E, or S would all occur at least once in the same 36-character line. The probability of a specific letter occurring in an independent trial is 0.0384615384615385, therefore the probability of a specific letter not occurring in an independent trial is 1 - 0.0384615384615385 = 0.961538461538462 Therefore the probability of a specific letter not occurring in 36 independent trials is 0.961538461538462^36 = 0.243668721853164 This means that the chance a specific letter will occur at least once in 36 independent trials is 1 - 0.243668721853164 = 0.756331278146836 The chance of all 3 letters occurring in the same 36-character line is 0.756331278146836^3 = 0.432649477099284 Next we need to solve for the probability of either W or U occurring at least once in a 36-character line. The probability that one of these two letters will occur in an independent trial is 2 * 0.0384615384615385 = 0.0769230769230769 The probability that neither of these two letters occurs in an independent trial is 1 - 0.0769230769230769 = 0.923076923076923 The probability that neither of these letters will occur at least once in 36 independent trials is 0.923076923076923^36 = 0.0560485232822473 Therefore the probability that one of these two letters will occur at least once in 36 independent trials is 1 - 0.0560485232822473 = 0.943951476717753 Therefore the probability that H, E, S and either U or W all occur at least once in a 36-character line is 0.432649477099284 * 0.943951476717753 = 0.408400112809032 Now we need to solve to find out the probability that each 36-character line in a 14 line Sonnet will contain H, E, S and either U or W. This is equal to the individual line probability of success to the power of trials or 0.408400112809032^14 = .00000359088872433288 Therefore the probability that at least one of the 14 lines of 36-characters will not contain an occurrence of H, E, S and either W or U at least once is 1 - .00000359088872433288 = 0.999996409111276 This means that in 154 trials the probability that none of these trials will contain 14 lines that all include the letters H, E, S and either U or W at least once is 0.999996409111276^154 = 0.999447155018702 This means that the probability that at least one of the 154 Sonnets has the letters H, E, S and either U or W occurring at least once in each of the 14 36-character lines is 1 - 0.999447155018702 = 0.000552844981298 *Note I did most of this in Excel and there may be some rounding errors |
#6
|
|||
|
|||
Re: Riddle -- Probability of Expectation
Baker350 has the right idea, but the trouble is the events are not independent. If you know a line contains at least one "h" then it's less likely to contain an "e". However, once we do one line, then we can use independence for the rest of the problem.
Here's one way to do it. (1) Start by counting all "h," "e" and "s" as a single letter with 3/26 probability of coming up. Compute the probability of getting 0, 1, 2 and up to 36 of these in a 36 letter line. (2) For each number in (1), compute the probability that you have at least one each of each letter. Obviously that's 0 for 0, 1 and 2. (3) Also for each number in (1), combine "u" and "w" as one letter with 2/26 probability of coming up. Compute the probability of getting at least one of these in the remaining letters in the line. (4) Multiply the probabilities in (2) and (3), then sum for all the numbers from 0 to 36. Then continue as Baker350 did. |
#7
|
|||
|
|||
Re: Riddle -- Probability of Expectation
[ QUOTE ]
The chance of all 3 letters occurring in the same 36-character line is 0.756331278146836^3 = 0.432649477099284 [/ QUOTE ] The occurrence of letters are not independent events. This number is therefore slightly off. For instance, suppose we had an alphabet with 3 letters (A,B,C), and a "line" only contained two letters. This method would say that a letter does not occur in a line with probability (2/3)^2 = 4/9, so occurs at least once w/probability 5/9. But then the probability of seeing all three letters in a 2-letter line would be (4/9)^3. But there should be zero probability to have 3 different letters in a 2-letter line, so this doesn't work exactly. alThor |
#8
|
|||
|
|||
Re: Riddle -- Probability of Expectation
I believe the events are independent in that each time the theoretical monkey hits a key it has a 1/26 chance of being a specific letter. This means that each letter has a 1-(25/26)^36 probability of occuring in a 36-character sequence. If one of the letters is an H it really doesn't effect the chance of an E showing up because if it wasn't an H it would still be something other than E.
Simply put the chance of all three specific letters showing up in a 36-character sequence is (1-(25/26)^36)^3. |
#9
|
|||
|
|||
Re: Riddle -- Probability of Expectation
[ QUOTE ]
If one of the letters is an H it really doesn't effect the chance of an E showing up because if it wasn't an H it would still be something other than E. [/ QUOTE ] But it does affect it. If the first letter is an "h," then there are only 35 chances to get an "e." If it is not an "h," then there is 1/25 instead of 1/26 that it is an "e." |
#10
|
|||
|
|||
Re: Riddle -- Probability of Expectation
[ QUOTE ]
[ QUOTE ] If one of the letters is an H it really doesn't effect the chance of an E showing up because if it wasn't an H it would still be something other than E. [/ QUOTE ] But it does affect it. If the first letter is an "h," then there are only 35 chances to get an "e." If it is not an "h," then there is 1/25 instead of 1/26 that it is an "e." [/ QUOTE ] Doing a binomial distribution calculation or taking an events liklihood to the power of trials takes this into account. In this example the binomial distribtion of an event with the liklihood of an event that has the probability of occuring equal to 1/26 not occuring in 36 trials is 0.24366872185316. This is the same as (1/26)^36. I am sorry I don't know how to explain it any better. |
|
|