# Math Help - help with a mixture distribution

1. ## help with a mixture distribution

I will begin with the description to the problem.
Let X have a geometric dist. with success prob. P, where P follows a beta(a = 2, b = 1). Derive the unconditional distribution of X and use it to find P(X< 2).

So I use,

P(X=x) = integratal over all y of P(X|p=p) *P(P=p)
= inegratal[p*(1-p)^(x-1) * 2p dp]
= inegratal[2p^2 *(1-p)^(x-1) dp]

Which you can use the Beta Kernel(a = 3, b = x) to solve, however after solving for the gamma functions I get
= 4/[x(x+1)]
which gives me values greater than 1, so can't be a prob function. I was wondering where I was going wrong in trying to find P(X=x).

2. ## Re: help with a mixture distribution

Hey chugakin.

I'm not sure why you are saying that you are integrating over all of y but in a Bayesian scenario (which is what you are discussing) then P(X=x|P=p) = Integrate Out p P(X=x|P=p).

Anyway if you have identified a Beta distribution then you should just integrate it out for X <= 2 to get the answer.

But in terms of the actual marginal distribution we integrate out the joint distribution and the joint distribution is given as P(X = x, Y = y) = P(X=x|Y=y)*P(Y=y) so integrating out or summing out Y gives the marginal for X (which is what you have attempted), but you haven't given a final distribution in terms of x.

If your prior is a Beta distribution and Your Likelihood is a Geometric then you need to multiply both PDF's together and integrate out over the domain: You have not done this.

What is the distribution of a geometric distribution? What is the distribution of a Beta? What is the product? What are the parameters of each? What is the result when you integrate out p?

3. ## Re: help with a mixture distribution

Please excuse me I am unfamiliar with the Bayesian terminology, f(X=x|Y=y) = y*(1-y)^(x-1) is geometric(x = 1,2,3,...), and f(Y=y) = 2y is beta(alpha = 2, beta = 1).
The product of the two is f(X=x|Y=y)*f(Y=y) = 2*y^2 * (1-y)^(x-1). I am not given any information about the joint and the marginal of x, which is the goal of the problem.
I integrated f(X=x|Y=y)*f(Y=y) with respect to y from 0 to 1 [using the fact that f(X=x|Y=y)*f(Y=y) is the kernel of a beta(alpha = 3, beta = x)].
Now that I reexamine the problem I get 4/(x*(x+1)*(x+2)). I am not sure if this a prob dist, but at least this isn't giving me answers over one.

4. ## Re: help with a mixture distribution

What you should do is use a partial fractions decompositions and then add up all the individual partials and check that they all add up to 1.

Once you have done this then calculate P(X <= 2).

You will note that all probabilities will be always be less than or equal to 2/3 since at x = 0, P(X=0) = 4/(1*2*3) = 2/3 and x*(x+1)*(x+2) is strictly a monotonic increasing function (positive derivative for all x > 0).

The partial fractions decomposition is found by getting 4/(x*(x+1)*(x+2)) = 4/ [A/x + B/(x+1) + C/(x+2)] for given constants A,B,C.