Q:

Find the Distribution of Sample Mean of Size 2 With Uniform Distribution

I know this should be an easy one, and I checked many times, but still cannot believe what I got:
Let $X$ be uniform on $[0,1]$ and $X_1,X_2$ be two random samples from $X$. Find the pdf and cdf of $T=\frac{X_1+X_2}{2}$. Then
\begin{align*}
    F_{T}(z)
    &=P(T\leq z)\\
    &=P(X_1+X_2 \leq 2z)\\
    &=\int_0^1 f_{X_1}(x)P\left(X_2\leq 2z-x\right)dx\\
    &=\int_0^1 (2z-x) dx\\
    &=2z-\frac{1}{2}\\
    f_T(z)
    &=\int_0^1 2f(x)f(2z-x)dx\\
    &=2
\end{align*}
I believe $Z\in [0,1]$, and apparently $F_T(1)\neq 1$. Not sure where I did wrong. Thanks in advance.

A:

Your computation of $F_T(z)$ is valid only when $2z>1$. If $2z <1$ then you have to integrate w.r.t. $x$ from $0$ to $2z$. This is because we have the restriction $X_1 \leq 2T$.

