Re: Funky random number choosing
- From: Michael Press <rubrum@xxxxxxxxxxx>
- Date: Thu, 25 Oct 2007 11:17:00 -0700
In article
<1193154890.814743.172740@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
, thomasjack <thomasjack@xxxxxxxxx> wrote:
Let {r_n} be a sequence of reals in (0,1] generated by a uniform
random number generator, with n=0,1,2... Let x be the smallest r_n for
which r_(n+1) > r_n. What's the expected value of x?
For example, if the sequence of random numbers came up "0.06, 0.21,
0.95, 0.93...", then x would be 0.95.
I think you mean the first r_n for which r_{n+1} < r_n.
After a few million trials I believe the expected value is around
0.718 (could it be e-2?), but I am having trouble deriving the exact
value.
m uniformly distributed values can be ordered in m! ways.
The number of permuations where r1 < r2 < ...< r_{m-1} > r_m is m-1.
The probability is (m-1)/m!.
The expected gap for m uniformly distributed values is 1/(m+1).
The expected value of r_{m-1} is
sum_{2 <= m}(1 - 1/(m+1)).(m-1)/m!
= sum_{2 <= m}[m/m! - 1/m! - (1/(m+1).(m+1 - 2)/m!]
= sum_{2 <= m}[m/m! - 1/m! - 1/m! + 2/(m+1)!]
= (e-1) - 2(e-2) + 2(e - 2 - 1/2)
= e - 1 - 1
= e - 2.
--
Michael Press
.
- References:
- Funky random number choosing
- From: thomasjack
- Funky random number choosing
- Prev by Date: Re: JSH: Why do people lie ?
- Next by Date: Re: Product of orders of generators of a finite group
- Previous by thread: Re: Funky random number choosing
- Next by thread: question on rings
- Index(es):
Relevant Pages
|