Calculate density using convolution formula

Click For Summary
SUMMARY

The discussion focuses on calculating the density of the sum of three independent identically distributed random variables, specifically $S = X_1 + X_2 + X_3$, where each $X_i$ follows a uniform distribution on the interval $[0, 1]$. The convolution formula is applied to derive the density function for $Y = X_1 + X_2$, resulting in a piecewise function defined as $f_Y(y) = \{y, 0 \leq y < 1; 2 - y, 1 \leq y < 2; 0, \text{ otherwise}\}$. The final density function for $S$ is computed through further convolution with $X_3$, confirming the results align with established mathematical principles.

PREREQUISITES
  • Understanding of convolution in probability theory
  • Familiarity with uniform distribution, specifically $U[0, 1]$
  • Knowledge of piecewise functions and their properties
  • Basic calculus, particularly integration techniques
NEXT STEPS
  • Study the convolution theorem in probability distributions
  • Learn about the properties of uniform distributions and their applications
  • Explore advanced integration techniques for piecewise functions
  • Investigate the Central Limit Theorem and its implications for sums of random variables
USEFUL FOR

Mathematicians, statisticians, and data scientists interested in probability theory, particularly those working with random variables and convolution methods in statistical analysis.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

Let $X_1, X_2, X_3$ be i.i.d. with $X_1 \sim U[0, 1]$. I want to determine the density of $S=X_1+X_2+X_3$ using the convolution formula.

I have done the following:

Since $X_1, X_2, X_3$ are i.i.d. we have that they are independent identically distributed random variables. Since $X_1 \sim U[0, 1]$ we have that $X_1$ is distributed uniformly on the interval $[0,1]$.

So, all random variables $X_1, X_2, X_3$ are distributed uniformly on the interval $[0,1]$, right?

Then for the distribution we have that $$f_{X_1}(x)=f_{X_2}(x)=f_{X_3}(x)=\left\{\begin{matrix}
1 & \text{ if } 0\leq x\leq 1\\
0 & \text{ otherwise }
\end{matrix}\right.$$ To determine the density of $S=X_1+X_2+X_3$ we do the following:

We calculate first the density of $Y:=X_1+X_2$ using the convolution formula.

\begin{align*}f_Y(y)&=\int_{-\infty}^{+\infty}f_{X_1}(x)f_{X_2}(y-x)dx \\ & = \int_0^1f_{X_2}(y-x)dx \\ & = \int_0^1 1_{\{0\leq y -x\leq 1\}}dx \\ & = \int_0^1 1_{\{y-1\leq x\leq y\}}dx \end{align*}

At some notes I saw that this integral is equal to $$\left\{\begin{matrix}
y ,& 0\leq y\leq 1\\
2-y ,& 1\leq y\leq 2\\
0 ,& \text{ otherwise }
\end{matrix}\right.$$ How do we get that result? (Wondering) We apply again the convolution formula for $f_Y:=f_{X_1+X+2}$ and $f_{X_3}$.

\begin{align*}f_S(s)&=\int_{-\infty}^{+\infty}f_{Y}(x)f_{X_3}(s-x)dx \\ & = \int_0^1xf_{X_3}(s-x)dx+\int_1^2(2-x)f_{X_3}(s-x)dx \\ & = \int_0^1 x\cdot 1_{\{0\leq s -x\leq 1\}}dx +\int_1^2(2-x)\cdot 1_{\{0\leq s -x\leq 1\}}dx \\ & = \int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx +\int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx\end{align*}

Is everything correct do far? How can we calculate the last integrals? (Wondering)
 
Physics news on Phys.org
mathmari said:
\begin{align*}f_Y(y)&= \int_0^1 1_{\{y-1\leq x\leq y\}}dx \end{align*}

At some notes I saw that this integral is equal to $$\left\{\begin{matrix}
y ,& 0\leq y\leq 1\\
2-y ,& 1\leq y\leq 2\\
0 ,& \text{ otherwise }
\end{matrix}\right.$$ How do we get that result?

Hey mathmari! (Smile)

We have to split the integral into cases:
\begin{align*}f_Y(y)&= \int_0^1 1_{\{y-1\leq x\leq y\}}dx \\
&= \begin{cases}
\int_0^1 1_{\{y-1\leq x\leq y\}}dx & \text{if }y< 0\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx & \text{if }0 \le y< 1\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx& \text{if }1 \le y < 2\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx& \text{if } 2 \le y\\
\end{cases}
\end{align*}
Can we calculate it now? (Wondering)
 
I like Serena said:
We have to split the integral into cases:
\begin{align*}f_Y(y)&= \int_0^1 1_{\{y-1\leq x\leq y\}}dx \\
&= \begin{cases}
\int_0^1 1_{\{y-1\leq x\leq y\}}dx & \text{if }y< 0\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx & \text{if }0 \le y< 1\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx& \text{if }1 \le y < 2\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx& \text{if } 2 \le y\\
\end{cases}
\end{align*}
Can we calculate it now? (Wondering)

If $y<0$ then $x$ is not in the interval $[0,1]$, so we have that $\int_0^1 1_{\{y-1\leq x\leq y\}}dx=\int_0^1 0dx=0$.

If $0 \le y< 1$ then we have that $-1\leq y-1\leq x\leq y<1$. Do we have to split it further?

If $1 \le y < 2$ then $0\leq y-1\leq x\leq y<2$. At the part $1<x<2$ the function is $0$. So, do we have to split this also further?

If $2 \le y$ then $x$ is bigger than in the interval $[0,1]$, so we have that $\int_0^1 1_{\{y-1\leq x\leq y\}}dx=\int_0^1 0dx=0$.

(Wondering)
 
mathmari said:
If $y<0$ then $x$ is not in the interval $[0,1]$, so we have that $\int_0^1 1_{\{y-1\leq x\leq y\}}dx=\int_0^1 0dx=0$.

If $2 \le y$ then $x$ is bigger than in the interval $[0,1]$, so we have that $\int_0^1 1_{\{y-1\leq x\leq y\}}dx=\int_0^1 0dx=0$.

Good! (Nod)

mathmari said:
If $0 \le y< 1$ then we have that $-1\leq y-1\leq x\leq y<1$. Do we have to split it further?

If $1 \le y < 2$ then $0\leq y-1\leq x\leq y<2$. At the part $1<x<2$ the function is $0$. So, do we have to split this also further?

No need to split it further.
Just consider that the bounds of our integral are for $0\le x < 1$. (Thinking)
 
I like Serena said:
No need to split it further.
Just consider that the bounds of our integral are for $0\le x < 1$. (Thinking)

Ah do we want that $[0,1]\subseteq [y-1, y]$ ? (Wondering)
 
mathmari said:
Ah do we want that $[0,1]\subseteq [y-1, y]$ ? (Wondering)

It's more like that we want to look at the interval $[0,1]\cap [y-1, y]$ in each case ... (Thinking)
 
I like Serena said:
It's more like that we want to look at the interval $[0,1]\cap [y-1, y]$ in each case ... (Thinking)

If $y<0$ then the intersection is empty. The same holds when $y>2$. If $0\leq y\leq 2$ then the intersection is not empty. Right?
Why do we split the interval $[0,2]$ into two intervals?

(Wondering)
 
mathmari said:
If $y<0$ then the intersection is empty. The same holds when $y>2$. If $0\leq y\leq 2$ then the intersection is not empty. Right?
Why do we split the interval $[0,2]$ into two intervals?

Because the bounds are different. I think we'll see when we work it out. (Thinking)
 
We have the following:
\begin{align*}&\begin{cases}
\int_0^1 1_{\{y-1\leq x\leq y\}}dx & \text{if }y< 0\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx & \text{if }0 \le y< 1\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx& \text{if }1 \le y < 2\\
\int_0^1 1_{\{y-1\leq x\leq y\}}dx& \text{if } 2 \le y\\
\end{cases} \\ & =\begin{cases}
\int_0^1 0dx & \text{if }y< 0\\
\int_0^y dx & \text{if }0 \le y< 1\\
\int_{y-1}^1 dx& \text{if }1 \le y < 2\\
\int_0^1 0dx& \text{if } 2 \le y\\
\end{cases} \\ & =\begin{cases}
0 & \text{if }y< 0\\
y & \text{if }0 \le y< 1\\
1-(y-1)=2-y& \text{if }1 \le y < 2\\
0& \text{if } 2 \le y\\
\end{cases}
\end{align*}

since when $0\leq y<1$ then $[y-1,y]\cap [0,1]=[0,y]$ and when $1\leq y<2$ then $[y-1,y]\cap [0,1]=[y-1,1]$, right? (Wondering)
 
  • #10
mathmari said:
since when $0\leq y<1$ then $[y-1,y]\cap [0,1]=[0,y]$ and when $1\leq y<2$ then $[y-1,y]\cap [0,1]=[y-1,1]$, right?

Right! (Nod)

Wait! Doesn't that look like the result we were supposed to get? (Wait)
 
  • #11
I like Serena said:
Right! (Nod)

Wait! Doesn't that look like the result we were supposed to get? (Wait)

Ah ok! Wir haben folgendes:

mathmari said:
We apply again the convolution formula for $f_Y:=f_{X_1+X+2}$ and $f_{X_3}$.

\begin{align*}f_S(s)&=\int_{-\infty}^{+\infty}f_{Y}(x)f_{X_3}(s-x)dx \\ & = \int_0^1xf_{X_3}(s-x)dx+\int_1^2(2-x)f_{X_3}(s-x)dx \\ & = \int_0^1 x\cdot 1_{\{0\leq s -x\leq 1\}}dx +\int_1^2(2-x)\cdot 1_{\{0\leq s -x\leq 1\}}dx \\ & = \int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx +\int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx\end{align*}

Wir bekommen folgdnes :
\begin{align*}f_S(s)&=\int_{-\infty}^{+\infty}f_{Y}(x)f_{X_3}(s-x)dx \\ & = \int_0^1xf_{X_3}(s-x)dx+\int_1^2(2-x)f_{X_3}(s-x)dx \\ & = \int_0^1 x\cdot 1_{\{0\leq s -x\leq 1\}}dx +\int_1^2(2-x)\cdot 1_{\{0\leq s -x\leq 1\}}dx \\ & = \int_0^1 x\cdot 1_{\{-s\leq -x\leq 1-s\}}dx +\int_1^2(2-x)\cdot 1_{\{0\leq s -x\leq 1\}}dx \\ & = \int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx +\int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx\end{align*}
Wir berechnen die zwei Integral getrennt:
  • $\displaystyle{\int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx}$ :
    \begin{align*}\int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx&=\begin{cases}
    \int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx & \text{wenn }s< 0\\
    \int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx & \text{wenn }0 \le s< 1\\
    \int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx& \text{wenn }1 \le s < 2\\
    \int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx& \text{wenn } 2 \le s\\
    \end{cases} \\ & = \begin{cases}
    \int_0^1 x\cdot 0dx & \text{wenn }s< 0\\
    \int_0^s x dx & \text{wenn }0 \le s< 1\\
    \int_{s-1}^1 xdx& \text{wenn }1 \le s < 2\\
    \int_0^1 x\cdot 0dx& \text{wenn } 2 \le s\\
    \end{cases} \\ & = \begin{cases}
    0& \text{wenn }s< 0\\
    \frac{s^2}{2} & \text{wenn }0 \le s< 1\\
    \frac{1}{2}-\frac{(s-1)^2}{2}& \text{wenn }1 \le s < 2\\
    0& \text{wenn } 2 \le s\\
    \end{cases} \\ & = \begin{cases}
    \frac{s^2}{2} & \text{wenn }0 \le s< 1\\
    \frac{1}{2}-\frac{s^2-2s+1}{2}& \text{wenn }1 \le s < 2\\
    0& \text{sonst } \\
    \end{cases} \\ & = \begin{cases}
    \frac{s^2}{2} & \text{wenn }0 \le s< 1\\
    -\frac{s^2-2s}{2}& \text{wenn }1 \le s < 2\\
    0& \text{sonst } \\
    \end{cases}\end{align*}
  • $\displaystyle{\int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx}$ :
    \begin{align*}\int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx&=\begin{cases}
    \int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx & \text{wenn }s< 1\\
    \int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx & \text{wenn }1 \le s< 2\\
    \int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx& \text{wenn }2 \le s < 3\\
    \int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx& \text{wenn } 3 \le s\\
    \end{cases} \\ & = \begin{cases}
    \int_1^2(2-x)\cdot 0 dx & \text{wenn }s< 1\\
    \int_1^s(2-x)dx & \text{wenn }1 \le s< 2\\
    \int_{s-1}^2(2-x)dx& \text{wenn }2 \le s < 3\\
    \int_1^2(2-x)\cdot 0 dx& \text{wenn } 3 \le s\\
    \end{cases} \\ & = \begin{cases}
    0& \text{wenn }s< 1\\
    \left (2s-\frac{s^2}{2}\right )-\left (2-\frac{1^2}{2}\right ) & \text{wenn }1 \le s< 2\\
    \left (4-\frac{2^2}{2}\right )-\left (2(s-1)-\frac{(s-1)^2}{2}\right ) & \text{wenn }2 \le s < 3\\
    0& \text{wenn } 3 \le s\\
    \end{cases} \\ & = \begin{cases}
    2s-\frac{s^2}{2}-\frac{3}{2} & \text{wenn }1 \le s< 2\\
    \left (4-2\right )-\left (2s-2-\frac{s^2-2s+1}{2}\right ) & \text{wenn }2 \le s < 3\\
    0& \text{sonst } \\
    \end{cases} \\ & = \begin{cases}
    2s-\frac{s^2}{2}-\frac{3}{2} & \text{wenn }1 \le s< 2\\
    2-2s+2+\frac{s^2}{2}-s+\frac{1}{2} & \text{wenn }2 \le s < 3\\
    0& \text{sonst } \\
    \end{cases} \\ & = \begin{cases}
    -\frac{s^2}{2}+2s-\frac{3}{2} & \text{wenn }1 \le s< 2\\
    \frac{s^2}{2}-3s+\frac{9}{2} & \text{wenn }2 \le s < 3\\
    0& \text{sonst } \\
    \end{cases}\end{align*}

Wir bekommen also folgendes:
\begin{align*}f_S(s)&=\int_0^1 x\cdot 1_{\{s-1\leq x\leq s\}}dx +\int_1^2(2-x)\cdot 1_{\{s-1\leq x\leq s\}}dx \\ & = \begin{cases}
\frac{s^2}{2} & \text{wenn }0 \le s< 1\\
-\frac{s^2-2s}{2}-\frac{s^2}{2}+2s-\frac{3}{2}& \text{wenn }1 \le s < 2\\
\frac{s^2}{2}-3s+\frac{9}{2} & \text{wenn }2 \le s < 3\\
0& \text{sonst } \\
\end{cases} \\ & = \begin{cases}
\frac{s^2}{2} & \text{wenn }0 \le s< 1\\
-s^2+3s-\frac{3}{2}& \text{wenn }1 \le s < 2\\
\frac{s^2}{2}-3s+\frac{9}{2} & \text{wenn }2 \le s < 3\\
0& \text{sonst } \\
\end{cases}\end{align*}

Us everything correct? (Wondering)
 
  • #12
Dein Ergebnis scheint mit Wolfram übereinzustimmen. (Nod)
 
  • #13
I like Serena said:
Dein Ergebnis scheint mit Wolfram übereinzustimmen. (Nod)

Danke! (Giggle) (Mmm)
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 42 ·
2
Replies
42
Views
7K
Replies
3
Views
2K