[Math] the probability that the sum of two random numbers is less than a given number

probability

Let us assume a pure random number generator generates a random number between the given range $[0,m]$ with equal probability.

Given $m_1$, let it generate a random number($r_1$) in the range $[0,m_1]$.
Given $m_2$, let it generate a random number($r_2$) in the range $[0,m_2]$.

Now what is the probability that $r_1 + r_2 < K$ ( another number)?

How can I calculate this probability?

Best Answer

A picture to go with Did's excellent hint.

enter image description here

Related Question