News for hackers. Stuff that matters.
Re:Adventures in Probability by shiandow on Monday November 11, 2024 @04:37AM (#42105716)
Poisson processes are neat, they always end up working nicely in ways that many other distributions/processes very much don't.

Splitting a Poisson process into two lower rate processes is a neat trick. Even better is that you can do the same to convert a Poisson process into one with a variable rate, provided that rate is lower than the original (original may be variable as well).

And the fact that the partial sums of a bunch of exponential distributions results in the same distribution of values as picking Poisson(lambda * time) values uniformly at random is pure magic.

Re:Adventures in Probability by tmoertel on Monday November 11, 2024 @09:26AM (#42107315)
Another neat property of Poisson processes is that when raced against one another, they win in proportion to their underlying rates. This property is the basis of a clever random sampling algorithm that works well in SQL:

    SELECT *
    FROM Population
    WHERE weight > 0
    ORDER BY -LN(1.0 - RANDOM()) / weight
    LIMIT 100  -- Sample size.
For an explanation of how it works, see https://blog.moertel.com/posts/2024-08-23-sampling-with-sql....
Re:Adventures in Probability by foldU on Monday November 11, 2024 @09:29AM (#42107354)
(author of OP) That post of yours was actually what got me tooling around with this stuff again :) it's a really excellent one
Re:Adventures in Probability by tmoertel on Monday November 11, 2024 @09:45AM (#42107480)
Thanks! That was very kind of you to say. Whenever I write stuff like that, I wonder, "Does anyone find this useful?" It helps to hear every once in a while that the answer is sometimes yes.
Re:Adventures in Probability by gmfawcett on Monday November 11, 2024 @04:27PM (#42110583)
Nice article!