PDA

View Full Version : Conditional PDFs

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.

lttownsend
09-16-2009, 09:45 AM
The formula for conditional density f(y|x) = f(x,y)/f(x) only holds for continuous distributions, I think. Since X is discrete, that would seem to throw a wrench in this formulation.

TwoStep
09-16-2009, 10:17 PM
X is a gamma/poisson mixture. I remember this from exam C, but I didn't realize it was on P. It turns out the unconditional distribution of X is negative binomial:

f(x) = p^s*(1-p)^x*(s+x-1)!/(x!*(s-1)!) where p = 1/(a+1)

It's been a while, I don't really know where to go from here, but I hope that helps. Also, double check this link to make sure I didn't make an error in the formula:

http://en.wikipedia.org/wiki/Negative_binomial_distribution