Obtaining a marginal PDF from a condtional PDF
up vote
0
down vote
favorite
I was given that that $f_{X|Y}(x|y=1)=lambda_1e^{-lambda_1 x}$ for $xgeq 0$ and $f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}$ for $xleq 0$. $X$ is continuous. $Y$ is discrete and can only take on those two values, $1$ and $-1$, with probability $p$ and $1-p$ respectively. $lambda_1$ and $lambda_2$ are positive values. I am trying to get the marginal PDF, $f_x(x)$ for when $xgt 0$ and for when $xlt 0 $.
I got $f_x(x)$ = $sum_{y}P(Y)f_{X|Y}(x|y) = plambda_1e^{-lambda_1 x} +(1-p)lambda_2e^{lambda_2 x}$, but after this , I am not sure how to interpret it for $xgt 0$ and $xlt 0 $. If I plot $f_{X|Y}(x|1)=lambda_1e^{-lambda_1 x}$ for $xgeq 0$, $f_{X|Y}(x|-1)=lambda_2e^{lambda_2 x}$ for $xleq 0$, and $lambda_1e^{-lambda_1 x} +lambda_2e^{lambda_2 x}$ on the same graph, I obtain the following:
plot for a fixed $lambda$, but even visualizing it doesn't help me understand it any better.
probability exponential-function conditional-probability
add a comment |
up vote
0
down vote
favorite
I was given that that $f_{X|Y}(x|y=1)=lambda_1e^{-lambda_1 x}$ for $xgeq 0$ and $f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}$ for $xleq 0$. $X$ is continuous. $Y$ is discrete and can only take on those two values, $1$ and $-1$, with probability $p$ and $1-p$ respectively. $lambda_1$ and $lambda_2$ are positive values. I am trying to get the marginal PDF, $f_x(x)$ for when $xgt 0$ and for when $xlt 0 $.
I got $f_x(x)$ = $sum_{y}P(Y)f_{X|Y}(x|y) = plambda_1e^{-lambda_1 x} +(1-p)lambda_2e^{lambda_2 x}$, but after this , I am not sure how to interpret it for $xgt 0$ and $xlt 0 $. If I plot $f_{X|Y}(x|1)=lambda_1e^{-lambda_1 x}$ for $xgeq 0$, $f_{X|Y}(x|-1)=lambda_2e^{lambda_2 x}$ for $xleq 0$, and $lambda_1e^{-lambda_1 x} +lambda_2e^{lambda_2 x}$ on the same graph, I obtain the following:
plot for a fixed $lambda$, but even visualizing it doesn't help me understand it any better.
probability exponential-function conditional-probability
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I was given that that $f_{X|Y}(x|y=1)=lambda_1e^{-lambda_1 x}$ for $xgeq 0$ and $f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}$ for $xleq 0$. $X$ is continuous. $Y$ is discrete and can only take on those two values, $1$ and $-1$, with probability $p$ and $1-p$ respectively. $lambda_1$ and $lambda_2$ are positive values. I am trying to get the marginal PDF, $f_x(x)$ for when $xgt 0$ and for when $xlt 0 $.
I got $f_x(x)$ = $sum_{y}P(Y)f_{X|Y}(x|y) = plambda_1e^{-lambda_1 x} +(1-p)lambda_2e^{lambda_2 x}$, but after this , I am not sure how to interpret it for $xgt 0$ and $xlt 0 $. If I plot $f_{X|Y}(x|1)=lambda_1e^{-lambda_1 x}$ for $xgeq 0$, $f_{X|Y}(x|-1)=lambda_2e^{lambda_2 x}$ for $xleq 0$, and $lambda_1e^{-lambda_1 x} +lambda_2e^{lambda_2 x}$ on the same graph, I obtain the following:
plot for a fixed $lambda$, but even visualizing it doesn't help me understand it any better.
probability exponential-function conditional-probability
I was given that that $f_{X|Y}(x|y=1)=lambda_1e^{-lambda_1 x}$ for $xgeq 0$ and $f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}$ for $xleq 0$. $X$ is continuous. $Y$ is discrete and can only take on those two values, $1$ and $-1$, with probability $p$ and $1-p$ respectively. $lambda_1$ and $lambda_2$ are positive values. I am trying to get the marginal PDF, $f_x(x)$ for when $xgt 0$ and for when $xlt 0 $.
I got $f_x(x)$ = $sum_{y}P(Y)f_{X|Y}(x|y) = plambda_1e^{-lambda_1 x} +(1-p)lambda_2e^{lambda_2 x}$, but after this , I am not sure how to interpret it for $xgt 0$ and $xlt 0 $. If I plot $f_{X|Y}(x|1)=lambda_1e^{-lambda_1 x}$ for $xgeq 0$, $f_{X|Y}(x|-1)=lambda_2e^{lambda_2 x}$ for $xleq 0$, and $lambda_1e^{-lambda_1 x} +lambda_2e^{lambda_2 x}$ on the same graph, I obtain the following:
plot for a fixed $lambda$, but even visualizing it doesn't help me understand it any better.
probability exponential-function conditional-probability
probability exponential-function conditional-probability
asked Nov 18 at 10:55
ChocolateChip
33
33
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
To better keep track of the conditional statements you can rewrite the conditional densities as functions over $mathbb{R}$ using indicator functions, so
$$
f_{X|Y}(x|y=1) = lambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0}, qquad f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}mathbb{1}_{x < 0},
$$
we haven't added any new information, but it might help to keep track of everything. So now when you carry out your marginalisation you have
$$
begin{align}
f_X(x) &= sum_{y in {-1, 1}} f_Y(y)f_{X|Y}(x|y) \
&= plambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0} + (1-p)lambda_2 e^{lambda_2 x}mathbb{1}_{x < 0},
end{align}
$$
again nothing new, but hopefully now it should be just a little clearer how to interpret it, so you could also rewrite the density as
$$
f_X(x) =
begin{cases}
plambda_1 e^{-lambda_1 x} & x geq 0 \
(1-p)lambda_2 e^{lambda_2 x} & mbox{otherwise}.
end{cases}
$$
So on the sets ${ x < 0 }$ and ${ x > 0 }$ you are going to have a graph that looks like the density function of an exponential random variable weighted by the probabilities $p$ or $(1-p)$ and you will have a discontinuity at $0$.
A good thing to do next for your own understanding is to probably rewrite the density function in terms of the absolute value of $x$, $| x |$, and see if you can realise the Laplace distribution as a special case of this setup.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
To better keep track of the conditional statements you can rewrite the conditional densities as functions over $mathbb{R}$ using indicator functions, so
$$
f_{X|Y}(x|y=1) = lambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0}, qquad f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}mathbb{1}_{x < 0},
$$
we haven't added any new information, but it might help to keep track of everything. So now when you carry out your marginalisation you have
$$
begin{align}
f_X(x) &= sum_{y in {-1, 1}} f_Y(y)f_{X|Y}(x|y) \
&= plambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0} + (1-p)lambda_2 e^{lambda_2 x}mathbb{1}_{x < 0},
end{align}
$$
again nothing new, but hopefully now it should be just a little clearer how to interpret it, so you could also rewrite the density as
$$
f_X(x) =
begin{cases}
plambda_1 e^{-lambda_1 x} & x geq 0 \
(1-p)lambda_2 e^{lambda_2 x} & mbox{otherwise}.
end{cases}
$$
So on the sets ${ x < 0 }$ and ${ x > 0 }$ you are going to have a graph that looks like the density function of an exponential random variable weighted by the probabilities $p$ or $(1-p)$ and you will have a discontinuity at $0$.
A good thing to do next for your own understanding is to probably rewrite the density function in terms of the absolute value of $x$, $| x |$, and see if you can realise the Laplace distribution as a special case of this setup.
add a comment |
up vote
1
down vote
accepted
To better keep track of the conditional statements you can rewrite the conditional densities as functions over $mathbb{R}$ using indicator functions, so
$$
f_{X|Y}(x|y=1) = lambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0}, qquad f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}mathbb{1}_{x < 0},
$$
we haven't added any new information, but it might help to keep track of everything. So now when you carry out your marginalisation you have
$$
begin{align}
f_X(x) &= sum_{y in {-1, 1}} f_Y(y)f_{X|Y}(x|y) \
&= plambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0} + (1-p)lambda_2 e^{lambda_2 x}mathbb{1}_{x < 0},
end{align}
$$
again nothing new, but hopefully now it should be just a little clearer how to interpret it, so you could also rewrite the density as
$$
f_X(x) =
begin{cases}
plambda_1 e^{-lambda_1 x} & x geq 0 \
(1-p)lambda_2 e^{lambda_2 x} & mbox{otherwise}.
end{cases}
$$
So on the sets ${ x < 0 }$ and ${ x > 0 }$ you are going to have a graph that looks like the density function of an exponential random variable weighted by the probabilities $p$ or $(1-p)$ and you will have a discontinuity at $0$.
A good thing to do next for your own understanding is to probably rewrite the density function in terms of the absolute value of $x$, $| x |$, and see if you can realise the Laplace distribution as a special case of this setup.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
To better keep track of the conditional statements you can rewrite the conditional densities as functions over $mathbb{R}$ using indicator functions, so
$$
f_{X|Y}(x|y=1) = lambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0}, qquad f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}mathbb{1}_{x < 0},
$$
we haven't added any new information, but it might help to keep track of everything. So now when you carry out your marginalisation you have
$$
begin{align}
f_X(x) &= sum_{y in {-1, 1}} f_Y(y)f_{X|Y}(x|y) \
&= plambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0} + (1-p)lambda_2 e^{lambda_2 x}mathbb{1}_{x < 0},
end{align}
$$
again nothing new, but hopefully now it should be just a little clearer how to interpret it, so you could also rewrite the density as
$$
f_X(x) =
begin{cases}
plambda_1 e^{-lambda_1 x} & x geq 0 \
(1-p)lambda_2 e^{lambda_2 x} & mbox{otherwise}.
end{cases}
$$
So on the sets ${ x < 0 }$ and ${ x > 0 }$ you are going to have a graph that looks like the density function of an exponential random variable weighted by the probabilities $p$ or $(1-p)$ and you will have a discontinuity at $0$.
A good thing to do next for your own understanding is to probably rewrite the density function in terms of the absolute value of $x$, $| x |$, and see if you can realise the Laplace distribution as a special case of this setup.
To better keep track of the conditional statements you can rewrite the conditional densities as functions over $mathbb{R}$ using indicator functions, so
$$
f_{X|Y}(x|y=1) = lambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0}, qquad f_{X|Y}(x|y=-1)=lambda_2e^{lambda_2 x}mathbb{1}_{x < 0},
$$
we haven't added any new information, but it might help to keep track of everything. So now when you carry out your marginalisation you have
$$
begin{align}
f_X(x) &= sum_{y in {-1, 1}} f_Y(y)f_{X|Y}(x|y) \
&= plambda_1e^{-lambda_1 x}mathbb{1}_{x geq 0} + (1-p)lambda_2 e^{lambda_2 x}mathbb{1}_{x < 0},
end{align}
$$
again nothing new, but hopefully now it should be just a little clearer how to interpret it, so you could also rewrite the density as
$$
f_X(x) =
begin{cases}
plambda_1 e^{-lambda_1 x} & x geq 0 \
(1-p)lambda_2 e^{lambda_2 x} & mbox{otherwise}.
end{cases}
$$
So on the sets ${ x < 0 }$ and ${ x > 0 }$ you are going to have a graph that looks like the density function of an exponential random variable weighted by the probabilities $p$ or $(1-p)$ and you will have a discontinuity at $0$.
A good thing to do next for your own understanding is to probably rewrite the density function in terms of the absolute value of $x$, $| x |$, and see if you can realise the Laplace distribution as a special case of this setup.
answered Nov 18 at 12:55
Nadiels
2,350413
2,350413
add a comment |
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3003393%2fobtaining-a-marginal-pdf-from-a-condtional-pdf%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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