memnus: Dragon with pigtails and glasses, saying "No sense... in a way that blows your mind?" (That makes no sense! (O&M))
Brian ([personal profile] memnus) wrote2007-10-09 07:16 pm
Entry tags:

For the probabilitists in the audience

I'd like your thoughts on a problem. (Here, all "randomly chosen" numbers are taken from the same continuous real distribution.) Suppose you have a set S of n randomly-chosen numbers, and a set D, initially empty. Begin by removing the largest number from S and placing it in D, and adding another random number to S. Now take the largest number from S that is smaller than the last number you chose, place it in D, and replace it with a random number. Repeat until you've taken the smallest number from S.

- What is the distribution of numbers in D?
- What is the expected value for the size of D?
- Bonus question (I know the answer to this one!): Why is Brian thinking about this problem?

I'm about to start in on a Monte Carlo estimator of the problem, but I'd like some theoretical input.

click

[identity profile] camlost.livejournal.com 2007-10-10 04:50 am (UTC)(link)

I don't believe Dan. Suppose we set n=1, then it's pretty clear that we expect to collect the first element, and there is a 50% (I'm guessing) chance of replacing it with something smaller, and we can continue this argument ad infinitum and we expect to collect on average 2 elements.

So, the probability of adding an additional useful element is x (assuming we populate S with elements between 0 and 1). Unfortunately, I don't know how fast we go through x, so I can't really do the integral. I think you expect to through x at a rate of around x * (S-1)/S. This should allow for a diffeq to be solved or somesuch, but this is all just hacked together thoughts near midnight.

[identity profile] tortoise.livejournal.com 2007-10-10 05:05 am (UTC)(link)
Unless I'm confused, if $n=1$, you take the largest element of $S$ and it is the smallest element of $S$, so you're immediately done.

[identity profile] zane314.livejournal.com 2007-10-10 08:03 am (UTC)(link)
With the problem as defined, you're right (immediately done). With the problem as "stylistically feels right" - you stop when there are no elements in S that are smaller than the item you just took (so this check happens after replacement), the other approach is appropriate.