Finding a constant k such that P(X+Y) = 0.05 If X and Y are iid from uniform(theta,theta + 1), and the P(X+Y) > k = 0.05, how do you find K?
Attempt: I know it's a double integration for both X and Y but I am not sure why.
 A: No double integration is necessary (though of course the problem can be solved that way too).  


*

*Sketch the plane with coordinate axes and draw on it the square region (of unit area) over which the joint density is nonzero.  Figure out the value of the joint density on this square region based on the given information.

*Persuade yourself that if $B$ is any region in the plane, then
$$
P\{(X, Y) \in B\} = \text{Area of}~ (B \cap \text{square region where pdf is nonzero})
$$

*Draw the line $x + y = k$  (Hint:  it will cross the axes at $(k, 0)$ and $(0,k)$.

*Verify that for $2\theta \leq k \leq 2(\theta + 1)$, the line will divide the square into two regions, at least one of which will be a triangle

*Verify that for $2\theta + 1 \leq k \leq 2\theta + 2$ the upper region is a triangle of area $\frac{1}{2}(2\theta + 2 - k)^2$

*Persuade yourself that you want this triangle to have area $0.05$

*Solve for $k$

A: Note that we can write the density function for $Z = X+Y$ as $$f_Z(z)  =  \int_{-\infty}^\infty \mathbf{1}(z-2\theta - x)\mathbf{1}(x)\,dx = \int_0^1 \mathbf{1}(z-2\theta-x)\,dx$$ where $\mathbf{1}$ is the indicator function for $[0,1]$.
Now integrand is non-zero iff $0 < z-2\theta -x  < 1$,  i.e.  $z-2\theta -1 < x < z-2\theta$.
If $2\theta <  z < 2\theta + 1$ then $$f_Z(z) = \int_{0}^{z - 2\theta} \,dx = z-2\theta $$ (we don't actually care about this case).
If $2\theta+ 1 <  z < 2\theta + 2$ then $$f_Z(z) = \int_{z-2\theta-1}^{1} \,dx = 2 - z+ 2\theta $$
Therefore if $2\theta+1 < k < 2\theta+2$ then  $$P(Z > k) = \int_{k}^{2\theta +2} 2 - z+ 2\theta\,dz = \frac{1}{2}(2-k+2\theta)^2$$ 
From this you can solve $P(Z>k)=0.05$ for $k$.
(Hopefully no mistakes)
