# Thread:

1. ## Monkeys to write shakespear.

I was curious about the actual amount of monkeys needed to produce something like hamlet, so I went and figured out how many letters there were: 194270
There are 26 letters in the alphabet so every possible combination of letter we can have in hamlet:

$26(194270)=5051020$

This problem produces a binomial distribution, so the mean of the normal curve would
be 1 because:
$\mu=np=(5051020)(5051020)^{-1}$
$\sigma = \sqrt{npq}=\sqrt{1(0.999999802020186)}$
$P(X\geqslant 1)=1-P(X\leqslant 1})$
$1-P(Z\leqslant \frac{1-1}{\sigma })$
$1-P(Z\leqslant 0})=1-.5=.5$

Therefore, if we have 5051020 monkeys, the probability of one of them producing hamlet (asssuming each only gets one try, the typing of one monkey does not effect the typing of another, and the probability of each monkey geting hamlet is the same) is on average 50%.

Is this correct?

2. im not sure i follow your first line. If you let a monkey type 194270 random characters the number of combinations is $26^{194270} \neq 26(194270)$

PS: what about punctuation and capitalisation?

3. Ha, never mind you would need 26^{194270} monkeys to have a 50% chance to write shakespeare...

4. Moving away from the hamlet problem, you are basically arguing that if:

$X \sim Bi(\frac{1}{p},p)$

then P(X>0) = 0.5
and hence
P(X=0) = 0.5

you can see this isn 't true by using $\frac{1}{p}$ that is small enough to fit in a calculator.

However it may be approximately true if $\frac{1}{p}$ gets sufficiently big (im not sure either way). i did check a pretty extreme case ( $\frac{1}{p} = 1,000,000,000$) and the probability was still less than 0.4
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 11, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9157087206840515, "perplexity_flag": "middle"}