I am trying to use Mathematica to obtain the probability distribution of $\frac{1}{2}(A + B)$ where $A$ and $B$ are independent random variables each distributed according to the uniform distribution, with lower and upper bounds of $L$ and $H$ respectively.
I suspect the distribution is triangular with lower and upper bounds of $L$ and $H$ respectively and mode equal to $\frac{1}{2}(A + B)$. However, I am having difficulty using TransformedDistribution to show that.
My code is:
\[ScriptCapitalD] = TransformedDistribution[1/2 (A + B), {B \[Distributed] UniformDistribution[{L, H}], A \[Distributed] UniformDistribution[{L, H}]}]
PDF[\[ScriptCapitalD], y]
? $\endgroup$Simplify[PDF[TransformedDistribution[(a + b)/2, {a, b} \[Distributed] UniformDistribution[{{l, h}, {l, h}}]], t] == PDF[TriangularDistribution[{l, h}], t], l < t < h]
$\endgroup$Simplify[PDF[TransformedDistribution[(A + B)/2, {A, B} \[Distributed] UniformDistribution[{{L, U}, {L, U}}]], t] == PDF[TriangularDistribution[{L, U}], t], L < t < U]
andSimplify[PDF[TransformedDistribution[(A + B)/2, {A, B} \[Distributed] UniformDistribution[{{L, H}, {L, H}}]], t] == PDF[TriangularDistribution[{L, H}], t], L < t < H]
$\endgroup$