How to get a PDF from other two PDFs

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












At a bus stop, suppose the interval between two buses (bus headway) is $x$, PDF of $x$ is $f(x)$. The in-stop waiting time for a passenger is $y$. For a bus interval $x$, suppose the arrival of passengers satisfies uniform distribution with PDF:



$$
g(y|x) =
begincases
1/x, & textif $0 le yle x$\
0, & textotherwise
endcases.
$$



To derive the PDF of $y$ without the intermedia $x$, there is
$$p(y) = int_0^+inftyg(y|x)f(x)dx
= int_0^xfrac1xf(x)dx $$



Here is the problem. $p(y)$ should be a function of $y$, but why the rightmost of the equation above is only a function of $x$, not $y$?







share|cite|improve this question





















  • en.wikipedia.org/wiki/Bayes%27_theorem#Extended_form_2
    – Did
    Jul 29 at 8:23










  • Can you help me with the updated question? thanks.
    – Macer
    Jul 30 at 3:01














up vote
0
down vote

favorite












At a bus stop, suppose the interval between two buses (bus headway) is $x$, PDF of $x$ is $f(x)$. The in-stop waiting time for a passenger is $y$. For a bus interval $x$, suppose the arrival of passengers satisfies uniform distribution with PDF:



$$
g(y|x) =
begincases
1/x, & textif $0 le yle x$\
0, & textotherwise
endcases.
$$



To derive the PDF of $y$ without the intermedia $x$, there is
$$p(y) = int_0^+inftyg(y|x)f(x)dx
= int_0^xfrac1xf(x)dx $$



Here is the problem. $p(y)$ should be a function of $y$, but why the rightmost of the equation above is only a function of $x$, not $y$?







share|cite|improve this question





















  • en.wikipedia.org/wiki/Bayes%27_theorem#Extended_form_2
    – Did
    Jul 29 at 8:23










  • Can you help me with the updated question? thanks.
    – Macer
    Jul 30 at 3:01












up vote
0
down vote

favorite









up vote
0
down vote

favorite











At a bus stop, suppose the interval between two buses (bus headway) is $x$, PDF of $x$ is $f(x)$. The in-stop waiting time for a passenger is $y$. For a bus interval $x$, suppose the arrival of passengers satisfies uniform distribution with PDF:



$$
g(y|x) =
begincases
1/x, & textif $0 le yle x$\
0, & textotherwise
endcases.
$$



To derive the PDF of $y$ without the intermedia $x$, there is
$$p(y) = int_0^+inftyg(y|x)f(x)dx
= int_0^xfrac1xf(x)dx $$



Here is the problem. $p(y)$ should be a function of $y$, but why the rightmost of the equation above is only a function of $x$, not $y$?







share|cite|improve this question













At a bus stop, suppose the interval between two buses (bus headway) is $x$, PDF of $x$ is $f(x)$. The in-stop waiting time for a passenger is $y$. For a bus interval $x$, suppose the arrival of passengers satisfies uniform distribution with PDF:



$$
g(y|x) =
begincases
1/x, & textif $0 le yle x$\
0, & textotherwise
endcases.
$$



To derive the PDF of $y$ without the intermedia $x$, there is
$$p(y) = int_0^+inftyg(y|x)f(x)dx
= int_0^xfrac1xf(x)dx $$



Here is the problem. $p(y)$ should be a function of $y$, but why the rightmost of the equation above is only a function of $x$, not $y$?









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Jul 30 at 2:59
























asked Jul 29 at 8:10









Macer

174




174











  • en.wikipedia.org/wiki/Bayes%27_theorem#Extended_form_2
    – Did
    Jul 29 at 8:23










  • Can you help me with the updated question? thanks.
    – Macer
    Jul 30 at 3:01
















  • en.wikipedia.org/wiki/Bayes%27_theorem#Extended_form_2
    – Did
    Jul 29 at 8:23










  • Can you help me with the updated question? thanks.
    – Macer
    Jul 30 at 3:01















en.wikipedia.org/wiki/Bayes%27_theorem#Extended_form_2
– Did
Jul 29 at 8:23




en.wikipedia.org/wiki/Bayes%27_theorem#Extended_form_2
– Did
Jul 29 at 8:23












Can you help me with the updated question? thanks.
– Macer
Jul 30 at 3:01




Can you help me with the updated question? thanks.
– Macer
Jul 30 at 3:01










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Yes, it should be a function of $y$, so clearly you have the bounds muddled up.   $x$ should not appear there.



Look to the support for $g(ymid x)$, it is $0leq yleq x$, so when "integrating out" the $x$, that leaves: $0leq y$ as the support, and the integral is over $x$ from $y$ to infinity.



$$p(y)~=int_0^infty left(frac 1xmathbf 1_0leq yleq xright) f(x)mathsf d x\= mathbf 1_0leq y int_y^infty fracf(x)x,mathsf d x$$



Of course, also the support for $f(x)$ itself needs to be considered.






share|cite|improve this answer





















  • Thank you, but I don't really understand how to manipulate form the first line of your equation to the second line.
    – Macer
    Jul 30 at 3:59










  • You are integrating $x$ over the support $0leq yleq xlt infty$ for a particular value of $y$, which is non-negative. The integral's variable, $x$, clearly 'lives' between that $y$ and infinity. $$int_Bbb R h(x,y)~mathbf 1_0leq yleq xlt infty~mathrm d x ~ =~ int_Bbb Rmathbf 1_yleq xltinfty~mathbf 1_0leq ylt infty~h(x,y)~mathsf d x \ =~mathbf 1_0leq ylt infty~int_yleq xltinfty~h(x,y)~mathsf d x$$
    – Graham Kemp
    Jul 30 at 4:27











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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
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%2f2865883%2fhow-to-get-a-pdf-from-other-two-pdfs%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote



accepted










Yes, it should be a function of $y$, so clearly you have the bounds muddled up.   $x$ should not appear there.



Look to the support for $g(ymid x)$, it is $0leq yleq x$, so when "integrating out" the $x$, that leaves: $0leq y$ as the support, and the integral is over $x$ from $y$ to infinity.



$$p(y)~=int_0^infty left(frac 1xmathbf 1_0leq yleq xright) f(x)mathsf d x\= mathbf 1_0leq y int_y^infty fracf(x)x,mathsf d x$$



Of course, also the support for $f(x)$ itself needs to be considered.






share|cite|improve this answer





















  • Thank you, but I don't really understand how to manipulate form the first line of your equation to the second line.
    – Macer
    Jul 30 at 3:59










  • You are integrating $x$ over the support $0leq yleq xlt infty$ for a particular value of $y$, which is non-negative. The integral's variable, $x$, clearly 'lives' between that $y$ and infinity. $$int_Bbb R h(x,y)~mathbf 1_0leq yleq xlt infty~mathrm d x ~ =~ int_Bbb Rmathbf 1_yleq xltinfty~mathbf 1_0leq ylt infty~h(x,y)~mathsf d x \ =~mathbf 1_0leq ylt infty~int_yleq xltinfty~h(x,y)~mathsf d x$$
    – Graham Kemp
    Jul 30 at 4:27















up vote
0
down vote



accepted










Yes, it should be a function of $y$, so clearly you have the bounds muddled up.   $x$ should not appear there.



Look to the support for $g(ymid x)$, it is $0leq yleq x$, so when "integrating out" the $x$, that leaves: $0leq y$ as the support, and the integral is over $x$ from $y$ to infinity.



$$p(y)~=int_0^infty left(frac 1xmathbf 1_0leq yleq xright) f(x)mathsf d x\= mathbf 1_0leq y int_y^infty fracf(x)x,mathsf d x$$



Of course, also the support for $f(x)$ itself needs to be considered.






share|cite|improve this answer





















  • Thank you, but I don't really understand how to manipulate form the first line of your equation to the second line.
    – Macer
    Jul 30 at 3:59










  • You are integrating $x$ over the support $0leq yleq xlt infty$ for a particular value of $y$, which is non-negative. The integral's variable, $x$, clearly 'lives' between that $y$ and infinity. $$int_Bbb R h(x,y)~mathbf 1_0leq yleq xlt infty~mathrm d x ~ =~ int_Bbb Rmathbf 1_yleq xltinfty~mathbf 1_0leq ylt infty~h(x,y)~mathsf d x \ =~mathbf 1_0leq ylt infty~int_yleq xltinfty~h(x,y)~mathsf d x$$
    – Graham Kemp
    Jul 30 at 4:27













up vote
0
down vote



accepted







up vote
0
down vote



accepted






Yes, it should be a function of $y$, so clearly you have the bounds muddled up.   $x$ should not appear there.



Look to the support for $g(ymid x)$, it is $0leq yleq x$, so when "integrating out" the $x$, that leaves: $0leq y$ as the support, and the integral is over $x$ from $y$ to infinity.



$$p(y)~=int_0^infty left(frac 1xmathbf 1_0leq yleq xright) f(x)mathsf d x\= mathbf 1_0leq y int_y^infty fracf(x)x,mathsf d x$$



Of course, also the support for $f(x)$ itself needs to be considered.






share|cite|improve this answer













Yes, it should be a function of $y$, so clearly you have the bounds muddled up.   $x$ should not appear there.



Look to the support for $g(ymid x)$, it is $0leq yleq x$, so when "integrating out" the $x$, that leaves: $0leq y$ as the support, and the integral is over $x$ from $y$ to infinity.



$$p(y)~=int_0^infty left(frac 1xmathbf 1_0leq yleq xright) f(x)mathsf d x\= mathbf 1_0leq y int_y^infty fracf(x)x,mathsf d x$$



Of course, also the support for $f(x)$ itself needs to be considered.







share|cite|improve this answer













share|cite|improve this answer



share|cite|improve this answer











answered Jul 30 at 3:10









Graham Kemp

80k43275




80k43275











  • Thank you, but I don't really understand how to manipulate form the first line of your equation to the second line.
    – Macer
    Jul 30 at 3:59










  • You are integrating $x$ over the support $0leq yleq xlt infty$ for a particular value of $y$, which is non-negative. The integral's variable, $x$, clearly 'lives' between that $y$ and infinity. $$int_Bbb R h(x,y)~mathbf 1_0leq yleq xlt infty~mathrm d x ~ =~ int_Bbb Rmathbf 1_yleq xltinfty~mathbf 1_0leq ylt infty~h(x,y)~mathsf d x \ =~mathbf 1_0leq ylt infty~int_yleq xltinfty~h(x,y)~mathsf d x$$
    – Graham Kemp
    Jul 30 at 4:27

















  • Thank you, but I don't really understand how to manipulate form the first line of your equation to the second line.
    – Macer
    Jul 30 at 3:59










  • You are integrating $x$ over the support $0leq yleq xlt infty$ for a particular value of $y$, which is non-negative. The integral's variable, $x$, clearly 'lives' between that $y$ and infinity. $$int_Bbb R h(x,y)~mathbf 1_0leq yleq xlt infty~mathrm d x ~ =~ int_Bbb Rmathbf 1_yleq xltinfty~mathbf 1_0leq ylt infty~h(x,y)~mathsf d x \ =~mathbf 1_0leq ylt infty~int_yleq xltinfty~h(x,y)~mathsf d x$$
    – Graham Kemp
    Jul 30 at 4:27
















Thank you, but I don't really understand how to manipulate form the first line of your equation to the second line.
– Macer
Jul 30 at 3:59




Thank you, but I don't really understand how to manipulate form the first line of your equation to the second line.
– Macer
Jul 30 at 3:59












You are integrating $x$ over the support $0leq yleq xlt infty$ for a particular value of $y$, which is non-negative. The integral's variable, $x$, clearly 'lives' between that $y$ and infinity. $$int_Bbb R h(x,y)~mathbf 1_0leq yleq xlt infty~mathrm d x ~ =~ int_Bbb Rmathbf 1_yleq xltinfty~mathbf 1_0leq ylt infty~h(x,y)~mathsf d x \ =~mathbf 1_0leq ylt infty~int_yleq xltinfty~h(x,y)~mathsf d x$$
– Graham Kemp
Jul 30 at 4:27





You are integrating $x$ over the support $0leq yleq xlt infty$ for a particular value of $y$, which is non-negative. The integral's variable, $x$, clearly 'lives' between that $y$ and infinity. $$int_Bbb R h(x,y)~mathbf 1_0leq yleq xlt infty~mathrm d x ~ =~ int_Bbb Rmathbf 1_yleq xltinfty~mathbf 1_0leq ylt infty~h(x,y)~mathsf d x \ =~mathbf 1_0leq ylt infty~int_yleq xltinfty~h(x,y)~mathsf d x$$
– Graham Kemp
Jul 30 at 4:27













 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2865883%2fhow-to-get-a-pdf-from-other-two-pdfs%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?