probability question, two uniformly distributed independent events, what's the probability that a third event will occur? [duplicate]

let's say there's two events, a and b both a and b are uniformly distributed and have a range of [100,400] a and b are independent i know that the probability that a=A is 1/300 and the probability that b=B is 1/300

but let's say also that c = b - a

what's the probability distribution of c? like... what's the probability that c=C? how do i figure this out?

marked as duplicate by user147263, Rolf Hoyer, graydad, Shuchang, Aaron MarojaApr 23 '15 at 2:13

• is it just 1/300? – Jenny Apr 22 '15 at 18:21
• There are $301$ integers in the interval $[100,400]$, not $300$ as you seem to think. Also, consider that $c=b-1$ can take on values from $-300$ to $+300$, and cannot possibly be uniformly distributed. For example, $c=-300$ corresponds to just one pair of values for $(a,b)$, viz. $(a,b) = (100,400)$ whereas $c=0$ corresponds to $301$ values for $(a,b)$, ranging from $(100,100)$ to $(400,400)$. – Dilip Sarwate Apr 22 '15 at 18:42
• @user147236: May be a duplicate, but not of the item you reference. This is pretty clearly about discrete uniform distributions rather than continuous ones. – BruceET Apr 23 '15 at 0:14

You need to distinguish between events and random variables. I think you mean to say random variable $X$ has the discrete uniform distribution on the integers between 100 and 400 inclusive. Then $P(X = i) = 1/301$ for any integer $i \in [100, 400].$ Also $Y is an independent random variable with the same distribution. In order to grasp what this problem involves, I suggest you consider rolls of two fair dice, a red one and a green one. Write out the$6 \times 6$array of results that represents the sample space. Then consider what the possible red minus green differences can be. Finally, count the outcomes in the corresponding diagonals of the diagram. Your problem is to do the same thing, but for a$301 \times 301\$ array. That is too big to write out, but now you know the principle and should be able to solve the problem.

If you have R (or similar statistical software available) a simulation gives the approximate probability distribution of the difference. I have done it below for the case of the dice so I can show the answer here.

In order to simulate your problem and roughly check your answer, you could change c from 1 to 100 and d from 6 to 400 (and round to 4 places, not 2). The printout will be very long, but perhaps instructive; the graph will show a discrete distribution with a triangular 'envelope'.

m = 10^6;  c = 1;  d = 6
x = sample(c:d, m, repl=T);  y = sample(c:d, m, repl=T)
w = x - y;  TAB = table(w)/m;  round(TAB, 3)
## w
##    -5    -4    -3    -2    -1     0     1     2     3    4      5
## 0.028 0.056 0.083 0.111 0.139 0.166 0.139 0.112 0.083 0.056 0.028
plot(TAB)  # plot not shown

For the dice problem, possible values from -5 through 5 (least frequent values), and the most frequent value is 0