Testing random
Jussi Piitulainen
jpiitula at ling.helsinki.fi
Wed Jun 17 00:41:20 EDT 2015
Ned Batchelder writes:
> Thomas: let's say I generate streams of N digits drawn randomly from
> 0-9. I then consider the probability of a zero *never appearing once*
> in my stream. Let's call that P(N). Do you agree that as N
> increases, P(N) decreases?
In probability theory, that could be phrased as the probability that N
unknown digits d_1, ..., d_N are all positive, assuming the digits are
independent (so learning one digit doesn't reveal anything about any
other digit), and for each d_k, the probability p_k of having a positive
digit is the same. Mathematicians often abbreviate these assumptions as
"i.i.d" for "independent" and "identically distributed".
Also assuming uniform distributions, p_1 = p_2 = ... = p_N = 9/10.
P(d_k > 0 for k = 1, ..., N) =
P(d_1 > 0 and d_2 > 0 and ... and d_N > 0) = (by independence)
P(d_1 > 0) * P(d_2 > 0) * ... * P(d_N > 0) =
p_1 * p_2 * ... * p_N = (by identical uniform distribution)
(9/10)^N
In mathematics, (9/10)^N decreases as N increases, so one should indeed
agree. Using more impressive notation and terminology correctly will not
change the analysis.
More information about the Python-list
mailing list