The 9yo nerdsniped me with a probability puzzle, which I have translated into maths below:

Suppose \(a\) is a random integer between 1 and 20 (inclusive) and \(b\) is a random integer between 21 and 40 (inclusive).

Now let \( c \) be a random integer between \( a \) and \( b \). What's the probability distribution of \(c\)?

Follow

Some partial solution: 

@icecolbeveridge So this was a fun distraction! As several people figured out, the distribution is a double sum with very interesting limits:

\(p(X=x) = \frac{1}{400} \sum\limits_{y=\max(x, 21)}^{40}\sum\limits_{z=1}^{\min(x, 20)}\frac{1}{y - z + 1}\)

I uploaded a Jupyter notebook with my results and simulations:

github.com/dataNerd23/stochUni

P.S.-I thought I could simplify the distribution with WolframAlpha, but alas, this is what it gave me:

wolframalpha.com/input?i2d=tru

Some partial solution: 

@sojournTime I have \( \sum_{n=1}^N \sum_{k=22-n}^{41-n} \frac{1}{k} \), which I think amounts to the same thing. WA doesn't simplify it for me, either.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.