# A boy is to sell lemonade to make some money to afford some holiday shopping. The capacity of the lemonade bucket is 1. At the start of each day, the

Random variables
A boy is to sell lemonade to make some money to afford some holiday shopping. The capacity of the lemonade bucket is 1. At the start of each day, the amount of lemonade in the bucket is a random variable X, from which a random variable Y is sold during the day. The two random variables X and Y are jointly uniform.
Find and sketch the CDF and the pdf of 'Z' which is the amount of lemonade remaining at the end of the day. Clearly indicate the range of Z

$$f_{Z}(z)=\int_{0}^{1}f_{X,Y}(z+y,y)$$
$$=\int_{0}^{z}2dy=2(y)_{0}^{z}=2z$$
$$F_{Z}(z)=\begin{cases}0. & z\leq 0\\2x. & 0\leq z\leq 1 \\ 1. & z\geq 1\end{cases}$$