Sum of three independent random variables Let $X$, $Y$, and $Z$ be independently and identically distributed variables, each uniformly distributed between $0$ and $2$. What is the probability that $X+Y+Z\leq2$?
All the other answers on similar questions refer to various things like "convolutions" that I've never heard of or use integrals and change the limits from $[-\infty,+\infty]$ to other things etc. so I'm very confused and don't understand any of it. In particular, I thought we could just work out $P(X+Y\leq2-Z)=\frac{1}{8}(2-Z)^2$ and thus do $\int_{0}^{2}\frac{1}{8}(2-Z)^2 \text{d}Z$, and I don't understand why this doesn't give the right answer of $\frac{1}{6}$. Please would someone take the time to write out all the steps with full explanation for someone who has only basic knowledge of probability.
 A: The sum of a given number of i.i.d. continuous uniform variables, on the support $[0,1]$ follows the Irwin-Hall distribution.  
Since you are considering variables on the interval $[0,2]$, it is just a matter of re-scaling.
A: Idea:


*

*$X \sim {\rm Unif}([0,2])$

*In the required event, $0 \le Y \le 2 - X$.

*Determine the value of $Z$ similarily: $0 \le Z \le 2 - X - Y$.


$$\begin{aligned}
& P(X+Y+Z \le 2) \\
&= \int_0^2 \int_0^{2-x} \int_0^{2-x-y} \left(\frac12\right)^3 \ dz \, dy \, dx \\
&= \left(\frac12\right)^3\int_0^2 \int_0^{2-x} (2-x-y) \, dy \, dx \\
&= \left(\frac12\right)^3\int_0^2 \int_0^{2-x} y \, dy \, dx \quad (\int_0^a f(x) dx = \int_0^a f(a-x) dx) \\
&= \left(\frac12\right)^3\int_0^2 \frac{(2-x)^2}{2} \, dx \\
&= \dots \text{(same trick)} \\
&= \left(\frac12\right)^3 \cdot \frac{2^3}{3!} = \frac16
\end{aligned}$$

Edit in response to OP's comment:
Consider $S = \{ (x,y,z) \in \Bbb{R}_+^3 \mid x + y + z \le 2\}$ and $S' = \{ (x,y,z) \in \Bbb{R}_+^3 \mid x \in [0,2], y \in [0,2-x], z \in [0,2-x-y]\}$.  It suffices to show that $S = S'$.  $S' \subseteq S$ is clear, and is left as exercise.  To finish the argument, let $(x,y,z) \in S$.  Then verify the criteria which define $S'$ componentwise. 


*

*$x \in [0,2]$ is clear

*$y \in [0,2-x-z] \subseteq [0,2-x]$ is a bit tricky

*$z \in [0,2-x-y]$ is also clear


Hence the upper and lower limits of the above iterated integral is justified.
A: For those who prefer a geometric proof:
The random points are uniformly distributed in $X,Y,Z$ space within a cube of side 2.
$X+Y+Z=2$ defines a plane which intersects the cube at the points (2,0,0),(0,2,0) and (0,0,2).  This is an equilateral triangle of side $2\sqrt 2$ and area $2\sqrt{3}$.
The centre of the triangle is at (2/3,2/3,2/3) which is $2/\sqrt{3}$ from the origin.
The points for which $X+Y+Z\leq2$ are those in the triangular pyramid whose base is this triangle and whose apex is the origin. This has volume ${1 \over 3} A h={1 \over 3}{2\sqrt 3}{2 \over \sqrt 3}={4 \over 3}$. 
Dividing by the total volume of 8 gives the probability ${1 \over 6}$ 
(The integrals are hidden in the formulae for the area ${ 1 \over 2} base \times height$ of a triangle and the volume ${1 \over 3} area \times height$  for a triangular pyramid.)
