# Finding a marginal pmf

1. Oct 22, 2012

### phiiota

1. The problem statement, all variables and given/known data
Suppose that X1 and X2 have the joint pmf
$$f(x_{1},x_{2})=p^{2}q^{x_{2}},x_{1}=0,1,2,...,x_{2},x_{2}=0,1,2,...$$
with
$$0<p<1,q=1-p$$

2. Relevant equations

3. The attempt at a solution
I'm confused because the expression doesn't have x_1 in it. So usually, if I want to find f1x(1), say, I would add up all the x_2 probabilities where x_1=1 to get my marginal (summing over all values of x_2). But without having an x_1 in my pmf, I don't know how to do this. I'm tempted to say the marginal is just the original pmf, but how would I differentiate between p(x_1=1,x_2=2) from p(x_1=0,x_2=2)?

2. Oct 22, 2012

### jbunniii

There must be a typo somewhere. If you sum $f(x_1, x_2)$ over $x_1$ and $x_2$, the result will be infinity, not 1. Therefore this is not a valid probability mass function

3. Oct 22, 2012

### Ray Vickson

No, that is not the case: x1 is summed from 0 to x2, and x2 is summed from 0 to ∞.

RGV

Last edited: Oct 22, 2012
4. Oct 22, 2012

### jbunniii

Oops, you're right. I misread the range for $x_1$.

5. Oct 22, 2012

### phiiota

okay, so my first thought is that the joint then should be
$$\sum_{x_{2}=0}^{\infty}\sum_{i=0}^{x_{2}}p^{2}q^{x_{2}}$$

when I let p=.5, this term does indeed sum to 1, so that's looking alright.
oh, I think I maybe figured this out. So I should have (summing over values in the domain
$$f_{1}(x_{1})=\sum_{x_{2}=0}^{\infty}p^{2}q^{x_{2}}$$
$$f_{2}(x_{2})=\sum_{i=0}^{x_{2}}p^{2}q^{x_{2}}$$

No, I'm still confused. The f1 sums out to .5 (when I let p=.5). So then I should sum .5 from... 0 to x2 to get 1? But then I'll have x2 in my term, and not 1.
When I integrate f2 from 0 to infinity, I do get one, which I think is good, but I'm still confused by not having an x1 term anywhere.

6. Oct 22, 2012

### jbunniii

Yes, that's the sum of the joint pmf.

No, you aren't summing over the right range of indices. Try drawing a picture of the region where the joint pmf is nonzero. Then it will be easier to see what the upper and lower limits for $x_2$ should be in the sum.
Yes, this is correct. The summand does not depend on $i$, so you are simply summing $x_2 + 1$ copies of the same thing. What is the result?

7. Oct 22, 2012

### phiiota

Okay, so looking at a picture, I know that P(x1,x2)=0 whenever x1>x2 (and x1,x2>0). So I have kind of a triangular set up. So looking at these values, then, I'm thinking that my marginal for x should be
$$f_{1}(x_{1})=\sum_{i=x_{1}}^{\infty}p^{2}q^{x_{1}}$$

8. Oct 23, 2012

### jbunniii

Almost, except the exponent for $q$ is wrong: it should be $q^i$.

You should be able to find a closed form expression for each pmf. For $f_{1}(x_{1})$, observe that you can pull $p^2$ outside the sum, and you're left with $p^{2}\sum_{i=x_{1}}^{\infty}q^i$. How does this sum relate to a geometric series?

9. Oct 23, 2012

### phiiota

okay, so finally, we have that
$$f_{1}(x_{1})=\sum_{i=x_{1}}^{\infty}p^{2}q^{i}=p^{2}\sum_{i=x_{1}}^{\infty}q^{i}$$
so $$\sum_{i=0}^{\infty}q^{i}=\dfrac{1}{1-(1-p)}=\dfrac{1}{p}. \sum_{i=0}^{x_{1}}q^{i}=\dfrac{1-q^{x_{1}-1}}{1-q}=\dfrac{1-q^{x_{1}-1}}{p}$$, so taking the difference, we have
$$f_{1}(x)=p^{2}\left(\dfrac{q^{x_{1}-1}}{p}\right)=pq^{x_{1}-1}$$.

for f_2(x_2), we just have
$$f_{2}(x_{2})=\sum_{i=0}^{x_{2}}p^{2}q^{x_{2}}=(x_{2}+1)p^{2}q^{x_{2}}$$

is this right? thanks for your help.

Last edited: Oct 23, 2012
10. Oct 23, 2012

### jbunniii

Yes.
The upper limit on your sum should be $x_1 - 1$, not $x_1$. Otherwise you will lose the $x_1$ term when you take the difference.
Yes, but you need to specify the range of values of $x_2$ for which this formula is valid. For example, if $x_2$ is negative, this formula isn't right.

11. Oct 23, 2012

### Ray Vickson

What you have written makes no sense: your summation gives the wrong answer
$$\sum_{i=0}^{x_{2}}p^{2}q^{x_{2}}= (x_2+1) p^2 q^{x_2};$$ do you see why?
Maybe you intended to say
$$f_2(x_2) = \sum_{i=0}^{x_2}p^2 q^i,$$
in which case that is what you should have written.

BTW: it will save you a lot of time and trouble if you use only the needed brackets in LaTeX. When the subscript or superscript is a single symbol, you do not need curly brackets, so it is OK to write f_2(x_2) and q^i, for example, but you DO need brackets when you have things like \sum_{i=0}^{x_2}, because the sub- or super-scripts have more than one symbol. However, you do NOT need to write ^{x_{2}}.

RGV

12. Oct 23, 2012

### jbunniii

Assuming the joint pmf is correctly stated in the original post, this is in fact a valid expression for the pmf of $x_2$. What makes you say that $(x_2+1) p^2 q^{x_2}$ (for $x_2 \geq 0$, otherwise 0) is the wrong answer? It's certainly a valid pmf: it takes on only nonnegative values and it sums to 1.

13. Oct 23, 2012

### Ray Vickson

OK, right! I should not post anything before my first cup of coffee!

RGV

14. Oct 23, 2012

### phiiota

Thanks. As far as the latex goes, I usually type it in an editor, and then paste the code in here.