2

Given two independent uniform random variables on (0,1), I am trying to computer the pdf for $Y = X_1 + 2X_2$.

So I have a few issues here. The first and easiest to answer being what the coefficient of 2 does to the random variable $X_2$. My gut says that it makes it to where $X_2$ can only take on values between 0 and $\frac{1}{2}$. But the other possibility that I can think of is that the $f_{X_2}(x_2)$ = 2 if 0 < $x_2$ < 2, and 0 otherwise. Or does it only effect the inequality there and it stays = 1, or something along those lines?

Second, and the more complicated of the questions, is getting the boundaries for the convolution. I got this down to be

$f_Y(y) = \int_{-\infty}^{\infty}f_{X_1}(y-x_2)f_{X_2}(x_2) dx_2$

where

$f_{X_2}(x_2) = 1$, if $0 < x_2 \leq \frac{1}{2}$ and 0 otherwise.

So then

$f_Y(y) = \int_{0}^{\frac{1}{2}}f_{X_1}(y-x_2) dx_2$.

This is where I get stuck. I know the integrand is 0 if y = $x_2$, so do I setup the inequality as $0 < y-x_2 < 1$ ?, or $0 < y-x_2 < \frac{1}{2}$ ? And where do I go from there? I see the examples I look at using two separate integrals after this step so that density ends up with a three-way piecewise function, but I'm unsure of how to get there.

We haven't really gone over convolution a ton in my past courses, and I know this problem can be done a different way but I want to practice convolutions of this variety. So any help would be greatly appreciated!

Dotty
  • 97
  • Sorry but you really believe that "$f_{X_2}(x_2) = 1$, if $0 < x_2 \leq \frac{1}{2}$ and 0 otherwise" may describe a random variable $X_2$ which is twice something distributed in $(0,1)$? – Did Feb 10 '17 at 22:22
  • @Did LOL I guess I'm a little blonde at times, and that's why I've gotta come here to have someone call me on something obvious that I looked over. My thought process I guess was not letting it go outside the interval of (0,1). So if it took on a value of $\frac{3}{4}$ then it would be greater than 1. Which is kind of why I'm in a dilemma here I guess? I'm not sure if $2X_2$ changes that interval to (0,2), or if it is just changing the height of the rectangle that $X_2$ is distributed over while keeping the interval the same. – Dotty Feb 10 '17 at 22:49
  • I guess if the interval stays the same, it wouldn't be a pdf if the height is doubled. – Dotty Feb 10 '17 at 22:52
  • I'm not sure if this is what you are confused about, but multiplying by 2 doesn't do anything to $X_2$, but gives you a new random variable $X_3= 2X_2$ for which you can easily derive the cdf $F(x)=P(X_3\leq x)=P(X_2\leq x/2)$. Can you figure out from here what values $x$ can take (so the probability isn't 0 or 1)? You know $X_2\in (0,1)$. – Blaza Feb 11 '17 at 02:01
  • Sorry but why common sense should leave you like that? One has a... thing, called $X_2$, which is somehow spread out in $(0,1)$ (yeah, no rigor here, but perhaps some severely lacking intuition), and you look at $2X_2$. Obviously this new "thing" is not spread out in $(0,\frac12)$ (your version) but in $___$. Now add PDFs to the pot and you have your answer. – Did Feb 11 '17 at 08:28

2 Answers2

4

Let $F$ denote the cdf of the uniform distribution over $[0,1]$, the common cdf of $X_1$ and $X_2$. Now, because of the independence of $X_1$ and $X_2$, we have $$F_{X_1+2X_2}(y)=P(X_1+2X_2<y)=\int_0^1P(x+2X_2<y)\ dx=$$ $$=\int_0^1P\left(Y_2<\frac{y-x}2\right)\ dx=\int_0^1F\left(\frac{y-x}2\right)\ dx.$$

Introducing the new variable $u=\frac{y-x}2$ we get $dx=-2du$, $\frac y2$ for the lower limit, and $\frac{y-1}{2}$ for the upper limit of integration. That is,

$$F_{X_1+2X_2}(y)=2\int^{\frac y2}_{\frac {y-1}{2}}F(u) \ du=\begin{cases} 0&\text{ if }&y<0\\ 2\int_0^{\frac y2}u\ du&\text{ if }&0\leq y<1\\ 2\int_{\frac {y-1}{2}}^{\frac y2} u\ du&\text{ if }&1\le y\leq2\\ 2\int_{\frac {y-1}{2}}^{1} u\ du+2\int_1^\frac y2\ du&\text{ if }&2\le y\leq3\\ 1&\text{ if }&y>3. \end{cases}.$$

Finally

$$F_{X_1+2X_2}(y)=\begin{cases} 0&\text{ if }&y<0\\ \frac14 y^2&\text{ if }&0\leq y<1\\ \frac12y-\frac14&\text{ if }&1\le y\leq2\\ -\frac14y^2+\frac32y-\frac54&\text{ if }&2<y\leq3\\ 1&\text{ if }&y>3 \end{cases}.$$

The density is:

$$f_{X_1+2X_2}(y)=\begin{cases} 0&\text{ if }&y<0\\ \frac12y&\text{ if }&0\leq y<1\\ \frac12&\text{ if }&1\le y\leq2\\ -\frac12y+\frac32&\text{ if }&2<y\leq3\\ 0&\text{ if }&y>3 \end{cases}.$$


EDIT

Some may find the solution above to be overcomplicated. So let's see what the simple text book solution would be.

The pdf $X_1$, say, $f_{X_1}$ is $1$ over the interval $[0,1]$ and $0$ elsewhere. The pdf belonging to $2X_2$, say $f_{X_2}$ is $\frac12$ over $[0,2]$ and $0$ without it.

So, we simply have to compute the following convolution:

$$f_{X_1+2X_2}(y)=\int_{-\infty}^{\infty}f_{X_1}(y-x)f_{X_2}(x)\ dx.\tag1$$

So far straightforward, indeed. However, when calculating the latter integral, all the boring technical details will come up.

I chose the first solution because in my opinion the boring technicalities - I would dare to say: the same technicalities - emerge closer to and are better explained by the spirit of the original question.

EDIT 2

This is to override my EDIT above.

Let's see how intuitive it can be to compute such a convolution. Consider the following figures

enter image description here Obviously, if $y<0$ or $y>3$ then the result of the integral of the product is $0$. (see figures (a) and (e))

If $0\leq y\leq 1$ then the integral of the product is increasing as $\frac12y$. (See figure (b).)

If $1<y\leq 2$ then the integral equals $\frac12$. (See figure (c).)

If, however $2<y\leq 3$ the the value of the integral decreases with $y$ from $\frac12$ to $0$. (See figure (d). So for $2<y\leq 3$ the integral equals $-\frac12y+ \frac32.$

Now, is this really simpler? Do we not see the danger in pretending that computing a convolution is always this simple?

zoli
  • 20,817
  • Wow, this was far more than I expected and showed some different ways to go about it. The edits(particularly your second one) were also helpful. Thank you so much! I've never seen a convolution laid out like that. – Dotty Feb 11 '17 at 20:06
1

$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

Given two independent uniform random variables on $\ds{\pars{0,1}}$, I am trying to computer the pdf for $\ds{y = x_{1} + 2x_{2}}$.

The $\bbox[#dfd,8px]{answer}$ is given by: \begin{align} &\int_{0}^{1}\bracks{0 < y - 2x_{2} < 1}\dd x_{2} = \int_{0}^{1}\bracks{{y - 1 \over 2} < x_{2} < {y \over 2}}\dd x_{2} \\[1cm] = & \bracks{{y - 1 \over 2} < 0}\bracks{0 < {y \over 2} < 1}\int_{0}^{y/2}\dd x_{2} + \bracks{0 < {y - 1 \over 2}}\bracks{{y \over 2} < 1}\int_{\pars{y - 1}/2}^{y/2}\,\dd x_{2} \\[5mm] + &\ \bracks{{y - 1 \over 2} < 1}\bracks{{y \over 2} > 1}\int_{\pars{y - 1}/2}^{1}\dd x_{2} \\[1cm] = &\ \bbx{\ds{\bracks{0 < y < 1}{y \over 2} + \bracks{1 < y < 2}{1 \over 2} + \bracks{2 < y < 3}{3 - y \over 2}}} \end{align} enter image description here

Felix Marin
  • 94,079
  • Nice derivation of the explicit equations of this "Maya temple looking" pdf ; you might be interested in my answer here dealing with the 3D equivalent $z=f(x)f(y)$ whose representation is even more connected to a Maya pyramid... :) – Jean Marie Dec 08 '24 at 07:17