Sandimashischool
09-16-2009, 03:40 AM
Let Y be a gamma random variable with parameters (s, a). That is, its density is:
f(y) = C*exp(-ay)y^(s-1), y>0
where C is a constant that does not depend on y. Suppose also the conditional distribution of X given Y = y is Poisson with mean y. That is,
P[X=x|Y=y] = (exp(-y)*y^x)/x! x >=0
Show that the conditional distribution of Y given that X = x is the gamma distribution with parameters (s+x, a+1)
----------------------------------
Ok so here is what I figured out,
I need f(y|x) = f(x,y)/f(x) = (f(x|y) * f(y))/f(x)
I know f(x|y) = (exp(-y)*y^x)/x!
f(y) = C*exp(-ay)y^(s-1) ~and if its gamma then C = (a^s)/(s-1)!
So when I multiply f(x|y) and f(y), and move constants to the left I get
(a^s)/((s-1)!*X!) * exp(-y(1+a))*y^(s-1) ..... and now I am stuck
Is this my final f(x,y), and even if it is I need to get f(x) to divide so I need to integrate 0 to Infinity to get the marginal distribution (I think) but I don't know how to integrate that (by parts maybe? ... I'm guessing I made a mistake somewhere because I can't integrate that) Any advice?
PS thanks to all those geniuses helping me out there (jraven, David, Actuarialsuck, etc) I really appreciate it.
f(y) = C*exp(-ay)y^(s-1), y>0
where C is a constant that does not depend on y. Suppose also the conditional distribution of X given Y = y is Poisson with mean y. That is,
P[X=x|Y=y] = (exp(-y)*y^x)/x! x >=0
Show that the conditional distribution of Y given that X = x is the gamma distribution with parameters (s+x, a+1)
----------------------------------
Ok so here is what I figured out,
I need f(y|x) = f(x,y)/f(x) = (f(x|y) * f(y))/f(x)
I know f(x|y) = (exp(-y)*y^x)/x!
f(y) = C*exp(-ay)y^(s-1) ~and if its gamma then C = (a^s)/(s-1)!
So when I multiply f(x|y) and f(y), and move constants to the left I get
(a^s)/((s-1)!*X!) * exp(-y(1+a))*y^(s-1) ..... and now I am stuck
Is this my final f(x,y), and even if it is I need to get f(x) to divide so I need to integrate 0 to Infinity to get the marginal distribution (I think) but I don't know how to integrate that (by parts maybe? ... I'm guessing I made a mistake somewhere because I can't integrate that) Any advice?
PS thanks to all those geniuses helping me out there (jraven, David, Actuarialsuck, etc) I really appreciate it.