Solving Double Integral in calculating the expected value of the absolute value of the difference between two...












0












$begingroup$


The answer to the question is shown here, unfortunately I am having trouble evaluating the double integral shown below which is used to get the answer.



Can someone please explain how to solve the integral to get the answer shown?



$$
operatorname E[|X_1-X_2|]=int_0^2int_0^2 frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 =frac{2}{3}.
$$



Expected value of the absolute value of the difference between two independent uniform random variables?



Is the expression below correct?



$
operatorname E[|X_1-X_2|]=int_0^2int_0^{x_1} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 + int_0^2int_{x_1}^{2} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 =frac{2}{3}.
$



Can you explain how you came by the limits you suggested?

I know that for the case $E(X+Y)$ you use convolution which would give you the limits that you used. However, I would have expected that the limits would change for $|E(X-Y)|$ as the convolution is running in the opposite direction but apparently the limits stayed the same?



Tackling the integrals in order from left to right:



$
int_0^2int_0^{x_1} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1
$

$
int_0^2 frac{|x_1x_2-x_2^2/2|}{4} |_0^{x1} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2-x_1^2/2|}{4} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2|}{8} , mathrm{d}x_1
$

$
frac{|x_1^3|}{24} |_0^2
$

$
frac{|8|}{24}
$



Obviously $frac{8}{24}$ is $frac{1}{3}$. Given that the numerator is always positive the abs sign is redundant so I can just take the solution to the first part to be $frac{1}{3}$ is the reasoning correct?



$
int_0^2int_{x_1}^2 frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1
$

$
int_0^2 frac{|x_1x_2-x_2^2/2|}{4} |_{x1}^2 , mathrm{d}x_1
$

$
int_0^2 frac{|2x_1-2| - |x_1^2 - x_1^2/2|}{4} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2/2 + 2x_1 - 2|}{8} , mathrm{d}x_1
$

$
frac{|x_1^3/3 + x_1^2 - 2 x_1|}{8} |_0^2
$

$
frac{|8|}{24}
$



Again assuming I can take $frac{|8|}{24}$ to be $frac{1}{3}$ which give $frac{2}{3}$ over all.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Try dividing the $dx_2$ integral on two integrals {$[0,x_1], [x_1,2]$}
    $endgroup$
    – vermator
    Jan 28 at 13:59


















0












$begingroup$


The answer to the question is shown here, unfortunately I am having trouble evaluating the double integral shown below which is used to get the answer.



Can someone please explain how to solve the integral to get the answer shown?



$$
operatorname E[|X_1-X_2|]=int_0^2int_0^2 frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 =frac{2}{3}.
$$



Expected value of the absolute value of the difference between two independent uniform random variables?



Is the expression below correct?



$
operatorname E[|X_1-X_2|]=int_0^2int_0^{x_1} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 + int_0^2int_{x_1}^{2} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 =frac{2}{3}.
$



Can you explain how you came by the limits you suggested?

I know that for the case $E(X+Y)$ you use convolution which would give you the limits that you used. However, I would have expected that the limits would change for $|E(X-Y)|$ as the convolution is running in the opposite direction but apparently the limits stayed the same?



Tackling the integrals in order from left to right:



$
int_0^2int_0^{x_1} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1
$

$
int_0^2 frac{|x_1x_2-x_2^2/2|}{4} |_0^{x1} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2-x_1^2/2|}{4} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2|}{8} , mathrm{d}x_1
$

$
frac{|x_1^3|}{24} |_0^2
$

$
frac{|8|}{24}
$



Obviously $frac{8}{24}$ is $frac{1}{3}$. Given that the numerator is always positive the abs sign is redundant so I can just take the solution to the first part to be $frac{1}{3}$ is the reasoning correct?



$
int_0^2int_{x_1}^2 frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1
$

$
int_0^2 frac{|x_1x_2-x_2^2/2|}{4} |_{x1}^2 , mathrm{d}x_1
$

$
int_0^2 frac{|2x_1-2| - |x_1^2 - x_1^2/2|}{4} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2/2 + 2x_1 - 2|}{8} , mathrm{d}x_1
$

$
frac{|x_1^3/3 + x_1^2 - 2 x_1|}{8} |_0^2
$

$
frac{|8|}{24}
$



Again assuming I can take $frac{|8|}{24}$ to be $frac{1}{3}$ which give $frac{2}{3}$ over all.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Try dividing the $dx_2$ integral on two integrals {$[0,x_1], [x_1,2]$}
    $endgroup$
    – vermator
    Jan 28 at 13:59
















0












0








0





$begingroup$


The answer to the question is shown here, unfortunately I am having trouble evaluating the double integral shown below which is used to get the answer.



Can someone please explain how to solve the integral to get the answer shown?



$$
operatorname E[|X_1-X_2|]=int_0^2int_0^2 frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 =frac{2}{3}.
$$



Expected value of the absolute value of the difference between two independent uniform random variables?



Is the expression below correct?



$
operatorname E[|X_1-X_2|]=int_0^2int_0^{x_1} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 + int_0^2int_{x_1}^{2} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 =frac{2}{3}.
$



Can you explain how you came by the limits you suggested?

I know that for the case $E(X+Y)$ you use convolution which would give you the limits that you used. However, I would have expected that the limits would change for $|E(X-Y)|$ as the convolution is running in the opposite direction but apparently the limits stayed the same?



Tackling the integrals in order from left to right:



$
int_0^2int_0^{x_1} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1
$

$
int_0^2 frac{|x_1x_2-x_2^2/2|}{4} |_0^{x1} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2-x_1^2/2|}{4} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2|}{8} , mathrm{d}x_1
$

$
frac{|x_1^3|}{24} |_0^2
$

$
frac{|8|}{24}
$



Obviously $frac{8}{24}$ is $frac{1}{3}$. Given that the numerator is always positive the abs sign is redundant so I can just take the solution to the first part to be $frac{1}{3}$ is the reasoning correct?



$
int_0^2int_{x_1}^2 frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1
$

$
int_0^2 frac{|x_1x_2-x_2^2/2|}{4} |_{x1}^2 , mathrm{d}x_1
$

$
int_0^2 frac{|2x_1-2| - |x_1^2 - x_1^2/2|}{4} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2/2 + 2x_1 - 2|}{8} , mathrm{d}x_1
$

$
frac{|x_1^3/3 + x_1^2 - 2 x_1|}{8} |_0^2
$

$
frac{|8|}{24}
$



Again assuming I can take $frac{|8|}{24}$ to be $frac{1}{3}$ which give $frac{2}{3}$ over all.










share|cite|improve this question











$endgroup$




The answer to the question is shown here, unfortunately I am having trouble evaluating the double integral shown below which is used to get the answer.



Can someone please explain how to solve the integral to get the answer shown?



$$
operatorname E[|X_1-X_2|]=int_0^2int_0^2 frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 =frac{2}{3}.
$$



Expected value of the absolute value of the difference between two independent uniform random variables?



Is the expression below correct?



$
operatorname E[|X_1-X_2|]=int_0^2int_0^{x_1} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 + int_0^2int_{x_1}^{2} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1 =frac{2}{3}.
$



Can you explain how you came by the limits you suggested?

I know that for the case $E(X+Y)$ you use convolution which would give you the limits that you used. However, I would have expected that the limits would change for $|E(X-Y)|$ as the convolution is running in the opposite direction but apparently the limits stayed the same?



Tackling the integrals in order from left to right:



$
int_0^2int_0^{x_1} frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1
$

$
int_0^2 frac{|x_1x_2-x_2^2/2|}{4} |_0^{x1} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2-x_1^2/2|}{4} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2|}{8} , mathrm{d}x_1
$

$
frac{|x_1^3|}{24} |_0^2
$

$
frac{|8|}{24}
$



Obviously $frac{8}{24}$ is $frac{1}{3}$. Given that the numerator is always positive the abs sign is redundant so I can just take the solution to the first part to be $frac{1}{3}$ is the reasoning correct?



$
int_0^2int_{x_1}^2 frac{|x_1-x_2|}{4} , mathrm{d}x_2 , mathrm{d}x_1
$

$
int_0^2 frac{|x_1x_2-x_2^2/2|}{4} |_{x1}^2 , mathrm{d}x_1
$

$
int_0^2 frac{|2x_1-2| - |x_1^2 - x_1^2/2|}{4} , mathrm{d}x_1
$

$
int_0^2 frac{|x_1^2/2 + 2x_1 - 2|}{8} , mathrm{d}x_1
$

$
frac{|x_1^3/3 + x_1^2 - 2 x_1|}{8} |_0^2
$

$
frac{|8|}{24}
$



Again assuming I can take $frac{|8|}{24}$ to be $frac{1}{3}$ which give $frac{2}{3}$ over all.







probability probability-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 28 at 15:09









Ankit Kumar

1,542221




1,542221










asked Jan 28 at 13:47









BazmanBazman

406413




406413








  • 1




    $begingroup$
    Try dividing the $dx_2$ integral on two integrals {$[0,x_1], [x_1,2]$}
    $endgroup$
    – vermator
    Jan 28 at 13:59
















  • 1




    $begingroup$
    Try dividing the $dx_2$ integral on two integrals {$[0,x_1], [x_1,2]$}
    $endgroup$
    – vermator
    Jan 28 at 13:59










1




1




$begingroup$
Try dividing the $dx_2$ integral on two integrals {$[0,x_1], [x_1,2]$}
$endgroup$
– vermator
Jan 28 at 13:59






$begingroup$
Try dividing the $dx_2$ integral on two integrals {$[0,x_1], [x_1,2]$}
$endgroup$
– vermator
Jan 28 at 13:59












1 Answer
1






active

oldest

votes


















1












$begingroup$

If $X_1$ and $X_2$ are uniformily distributed from U(0,2),



then $Z = |X_1-X_2|$ has a pdf of



$P(Z=z) = frac{1}{2}(2-z)$, $0le z le 2$



Thus $E(Z) = int_{0}^{2} frac{1}{2}z(2-z)dz$



$=frac{2}{3}$



Easy Understanding of Convolution The best way to understand convolution is given in the article in the link,using that



I am going to solve the above problem and hence you could follow the same for any similar problem such as this with not too much confusion.



$Z = X-Y$ where X and Y are U(0,2).



I am going to define a new variable W where W is distributed according to U(-2,0)



Thus $Z = X - Y = X+ W$ where X is U(0,1) and W is U(-2,0).



Now I am going define the bounds



$t_{X_0} = -2$



$t_{X_1} = 0$



$t_{W_0} = 0$



$t_{W_1} = 2$



Thus $$f_Z(z) = 0, z le t_{X_0}+t_{W_0} ,$$



$$f_Z(z) = int_{max(t_{W_0}, t-t_{X_1})}^{min(t_{W_1}, t-t_{X_0})} f_W(w)f_X(z-w)dw, text{ } t_{X_0}+t_{W_0} le z le t_{X_1}+t_{W_1},$$



$$f_Z(z) = 0, z ge t_{X_1}+t_{W_1} ,$$



These translate to the following:



$$f_Z(z) = 0, z le -2 $$
$$f_Z(z) = int_{max(0, z)}^{min(2, z+2)} f_W(w)f_X(z-w)dw, text{ } -2le z le 2,$$



$$f_Z(z) = 0, z ge 2 ,$$



$f_W(w) = frac{1}{2}$ as $W$ is $U(-2,0)$.



$f_X(x) = frac{1}{2} $ as $X$ is $U(0,2)$,



The middle one needs to be split into two intervals, and they are a) $-2le zle 0$, b) $0le zle 2$.



Thus



$f_Z(z) = int_{0}^{z+2}frac{1}{4}dw = frac{z+2}{4}$, $-2le zle 0$



$f_Z(z) = int_{z}^{2}frac{1}{4}dw = frac{2-z}{4}$, $0le zle 2$



Sanity check is to find if $int_{-2}^{2} f_Z(z) = 1$ which it is in this case You have to find the pdf of Z = |X-Y| and the only interval for this is $0le zle 2$ and the pdf is twice that of $2frac{2-z}{4} = frac{2-z}{2}$
and hence



The pdf $boxed{f_Z(z) = frac{2-z}{2}, 0le z le 2}$
Goodluck






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Can you elaborate on how you calculated the pdf please.
    $endgroup$
    – Bazman
    Jan 28 at 16:57












Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3090875%2fsolving-double-integral-in-calculating-the-expected-value-of-the-absolute-value%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

If $X_1$ and $X_2$ are uniformily distributed from U(0,2),



then $Z = |X_1-X_2|$ has a pdf of



$P(Z=z) = frac{1}{2}(2-z)$, $0le z le 2$



Thus $E(Z) = int_{0}^{2} frac{1}{2}z(2-z)dz$



$=frac{2}{3}$



Easy Understanding of Convolution The best way to understand convolution is given in the article in the link,using that



I am going to solve the above problem and hence you could follow the same for any similar problem such as this with not too much confusion.



$Z = X-Y$ where X and Y are U(0,2).



I am going to define a new variable W where W is distributed according to U(-2,0)



Thus $Z = X - Y = X+ W$ where X is U(0,1) and W is U(-2,0).



Now I am going define the bounds



$t_{X_0} = -2$



$t_{X_1} = 0$



$t_{W_0} = 0$



$t_{W_1} = 2$



Thus $$f_Z(z) = 0, z le t_{X_0}+t_{W_0} ,$$



$$f_Z(z) = int_{max(t_{W_0}, t-t_{X_1})}^{min(t_{W_1}, t-t_{X_0})} f_W(w)f_X(z-w)dw, text{ } t_{X_0}+t_{W_0} le z le t_{X_1}+t_{W_1},$$



$$f_Z(z) = 0, z ge t_{X_1}+t_{W_1} ,$$



These translate to the following:



$$f_Z(z) = 0, z le -2 $$
$$f_Z(z) = int_{max(0, z)}^{min(2, z+2)} f_W(w)f_X(z-w)dw, text{ } -2le z le 2,$$



$$f_Z(z) = 0, z ge 2 ,$$



$f_W(w) = frac{1}{2}$ as $W$ is $U(-2,0)$.



$f_X(x) = frac{1}{2} $ as $X$ is $U(0,2)$,



The middle one needs to be split into two intervals, and they are a) $-2le zle 0$, b) $0le zle 2$.



Thus



$f_Z(z) = int_{0}^{z+2}frac{1}{4}dw = frac{z+2}{4}$, $-2le zle 0$



$f_Z(z) = int_{z}^{2}frac{1}{4}dw = frac{2-z}{4}$, $0le zle 2$



Sanity check is to find if $int_{-2}^{2} f_Z(z) = 1$ which it is in this case You have to find the pdf of Z = |X-Y| and the only interval for this is $0le zle 2$ and the pdf is twice that of $2frac{2-z}{4} = frac{2-z}{2}$
and hence



The pdf $boxed{f_Z(z) = frac{2-z}{2}, 0le z le 2}$
Goodluck






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Can you elaborate on how you calculated the pdf please.
    $endgroup$
    – Bazman
    Jan 28 at 16:57
















1












$begingroup$

If $X_1$ and $X_2$ are uniformily distributed from U(0,2),



then $Z = |X_1-X_2|$ has a pdf of



$P(Z=z) = frac{1}{2}(2-z)$, $0le z le 2$



Thus $E(Z) = int_{0}^{2} frac{1}{2}z(2-z)dz$



$=frac{2}{3}$



Easy Understanding of Convolution The best way to understand convolution is given in the article in the link,using that



I am going to solve the above problem and hence you could follow the same for any similar problem such as this with not too much confusion.



$Z = X-Y$ where X and Y are U(0,2).



I am going to define a new variable W where W is distributed according to U(-2,0)



Thus $Z = X - Y = X+ W$ where X is U(0,1) and W is U(-2,0).



Now I am going define the bounds



$t_{X_0} = -2$



$t_{X_1} = 0$



$t_{W_0} = 0$



$t_{W_1} = 2$



Thus $$f_Z(z) = 0, z le t_{X_0}+t_{W_0} ,$$



$$f_Z(z) = int_{max(t_{W_0}, t-t_{X_1})}^{min(t_{W_1}, t-t_{X_0})} f_W(w)f_X(z-w)dw, text{ } t_{X_0}+t_{W_0} le z le t_{X_1}+t_{W_1},$$



$$f_Z(z) = 0, z ge t_{X_1}+t_{W_1} ,$$



These translate to the following:



$$f_Z(z) = 0, z le -2 $$
$$f_Z(z) = int_{max(0, z)}^{min(2, z+2)} f_W(w)f_X(z-w)dw, text{ } -2le z le 2,$$



$$f_Z(z) = 0, z ge 2 ,$$



$f_W(w) = frac{1}{2}$ as $W$ is $U(-2,0)$.



$f_X(x) = frac{1}{2} $ as $X$ is $U(0,2)$,



The middle one needs to be split into two intervals, and they are a) $-2le zle 0$, b) $0le zle 2$.



Thus



$f_Z(z) = int_{0}^{z+2}frac{1}{4}dw = frac{z+2}{4}$, $-2le zle 0$



$f_Z(z) = int_{z}^{2}frac{1}{4}dw = frac{2-z}{4}$, $0le zle 2$



Sanity check is to find if $int_{-2}^{2} f_Z(z) = 1$ which it is in this case You have to find the pdf of Z = |X-Y| and the only interval for this is $0le zle 2$ and the pdf is twice that of $2frac{2-z}{4} = frac{2-z}{2}$
and hence



The pdf $boxed{f_Z(z) = frac{2-z}{2}, 0le z le 2}$
Goodluck






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Can you elaborate on how you calculated the pdf please.
    $endgroup$
    – Bazman
    Jan 28 at 16:57














1












1








1





$begingroup$

If $X_1$ and $X_2$ are uniformily distributed from U(0,2),



then $Z = |X_1-X_2|$ has a pdf of



$P(Z=z) = frac{1}{2}(2-z)$, $0le z le 2$



Thus $E(Z) = int_{0}^{2} frac{1}{2}z(2-z)dz$



$=frac{2}{3}$



Easy Understanding of Convolution The best way to understand convolution is given in the article in the link,using that



I am going to solve the above problem and hence you could follow the same for any similar problem such as this with not too much confusion.



$Z = X-Y$ where X and Y are U(0,2).



I am going to define a new variable W where W is distributed according to U(-2,0)



Thus $Z = X - Y = X+ W$ where X is U(0,1) and W is U(-2,0).



Now I am going define the bounds



$t_{X_0} = -2$



$t_{X_1} = 0$



$t_{W_0} = 0$



$t_{W_1} = 2$



Thus $$f_Z(z) = 0, z le t_{X_0}+t_{W_0} ,$$



$$f_Z(z) = int_{max(t_{W_0}, t-t_{X_1})}^{min(t_{W_1}, t-t_{X_0})} f_W(w)f_X(z-w)dw, text{ } t_{X_0}+t_{W_0} le z le t_{X_1}+t_{W_1},$$



$$f_Z(z) = 0, z ge t_{X_1}+t_{W_1} ,$$



These translate to the following:



$$f_Z(z) = 0, z le -2 $$
$$f_Z(z) = int_{max(0, z)}^{min(2, z+2)} f_W(w)f_X(z-w)dw, text{ } -2le z le 2,$$



$$f_Z(z) = 0, z ge 2 ,$$



$f_W(w) = frac{1}{2}$ as $W$ is $U(-2,0)$.



$f_X(x) = frac{1}{2} $ as $X$ is $U(0,2)$,



The middle one needs to be split into two intervals, and they are a) $-2le zle 0$, b) $0le zle 2$.



Thus



$f_Z(z) = int_{0}^{z+2}frac{1}{4}dw = frac{z+2}{4}$, $-2le zle 0$



$f_Z(z) = int_{z}^{2}frac{1}{4}dw = frac{2-z}{4}$, $0le zle 2$



Sanity check is to find if $int_{-2}^{2} f_Z(z) = 1$ which it is in this case You have to find the pdf of Z = |X-Y| and the only interval for this is $0le zle 2$ and the pdf is twice that of $2frac{2-z}{4} = frac{2-z}{2}$
and hence



The pdf $boxed{f_Z(z) = frac{2-z}{2}, 0le z le 2}$
Goodluck






share|cite|improve this answer











$endgroup$



If $X_1$ and $X_2$ are uniformily distributed from U(0,2),



then $Z = |X_1-X_2|$ has a pdf of



$P(Z=z) = frac{1}{2}(2-z)$, $0le z le 2$



Thus $E(Z) = int_{0}^{2} frac{1}{2}z(2-z)dz$



$=frac{2}{3}$



Easy Understanding of Convolution The best way to understand convolution is given in the article in the link,using that



I am going to solve the above problem and hence you could follow the same for any similar problem such as this with not too much confusion.



$Z = X-Y$ where X and Y are U(0,2).



I am going to define a new variable W where W is distributed according to U(-2,0)



Thus $Z = X - Y = X+ W$ where X is U(0,1) and W is U(-2,0).



Now I am going define the bounds



$t_{X_0} = -2$



$t_{X_1} = 0$



$t_{W_0} = 0$



$t_{W_1} = 2$



Thus $$f_Z(z) = 0, z le t_{X_0}+t_{W_0} ,$$



$$f_Z(z) = int_{max(t_{W_0}, t-t_{X_1})}^{min(t_{W_1}, t-t_{X_0})} f_W(w)f_X(z-w)dw, text{ } t_{X_0}+t_{W_0} le z le t_{X_1}+t_{W_1},$$



$$f_Z(z) = 0, z ge t_{X_1}+t_{W_1} ,$$



These translate to the following:



$$f_Z(z) = 0, z le -2 $$
$$f_Z(z) = int_{max(0, z)}^{min(2, z+2)} f_W(w)f_X(z-w)dw, text{ } -2le z le 2,$$



$$f_Z(z) = 0, z ge 2 ,$$



$f_W(w) = frac{1}{2}$ as $W$ is $U(-2,0)$.



$f_X(x) = frac{1}{2} $ as $X$ is $U(0,2)$,



The middle one needs to be split into two intervals, and they are a) $-2le zle 0$, b) $0le zle 2$.



Thus



$f_Z(z) = int_{0}^{z+2}frac{1}{4}dw = frac{z+2}{4}$, $-2le zle 0$



$f_Z(z) = int_{z}^{2}frac{1}{4}dw = frac{2-z}{4}$, $0le zle 2$



Sanity check is to find if $int_{-2}^{2} f_Z(z) = 1$ which it is in this case You have to find the pdf of Z = |X-Y| and the only interval for this is $0le zle 2$ and the pdf is twice that of $2frac{2-z}{4} = frac{2-z}{2}$
and hence



The pdf $boxed{f_Z(z) = frac{2-z}{2}, 0le z le 2}$
Goodluck







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Jan 29 at 15:02

























answered Jan 28 at 16:02









Satish RamanathanSatish Ramanathan

10k31323




10k31323












  • $begingroup$
    Can you elaborate on how you calculated the pdf please.
    $endgroup$
    – Bazman
    Jan 28 at 16:57


















  • $begingroup$
    Can you elaborate on how you calculated the pdf please.
    $endgroup$
    – Bazman
    Jan 28 at 16:57
















$begingroup$
Can you elaborate on how you calculated the pdf please.
$endgroup$
– Bazman
Jan 28 at 16:57




$begingroup$
Can you elaborate on how you calculated the pdf please.
$endgroup$
– Bazman
Jan 28 at 16:57


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3090875%2fsolving-double-integral-in-calculating-the-expected-value-of-the-absolute-value%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith