# Probability that sum of 2 random numbers are less than an integer

Assume there is an Ideal Random Number Generator which generates any real number between 0 and given integer. Two numbers are generated from the above generator using integer A and B, let's assume the numbers generated are X1 and X2. There is another integer C. What is the probability that summation of X1 and X2 is less than C.

• The density has the shape of a roof, starting at 0, with positive slope s on some interval (0,c), with null slope on (c,d), and with negative slope -s on (d,d+c), for some suitable s, c and d. Now, what did you try? – Did Nov 9 '13 at 11:05

Draw the sample space on axes $X_1, X_2$. You should get a rectangle of area $AB$. Now shade the portion $X_1 + X_2 < C$ in this rectangle.
Now consider cases where $C \in \,$ one of the following intervals $(0 < \min(A, B)), [\min(A, B), \max(A, B)], (\max(A, B), A+B), (A+B, \infty)$...
• @Kaushal28 Missed your Q. Check sketchtoy.com/67283206 The rectangle is your sample space, the shaded region is the event you're interested in. Their ratio is the probability you seek. Depending on $C$, the shaded region changes... – Macavity Jul 22 '16 at 10:28