1. ## Random Variables

Hi, I am struggling on this problem.

A married couple who prefer girls to boys decide to keep having children until they have one more girl than boy. From different methods, they can guarantee that each time they conceive, the baby's gender is female with probability 2/3 and male with probability 1/3.

Let X be the total number of children they end up having.
I was given that:
$X = 1$ with probability 2/3
$X = 1 + X_1 + X_2$ with probability 1/3.
where $X_1, X_2$ are independent random variables each with the same distribution as $X$.

What would be the pdf of this distribution? What would be the best way to find the mean and variance of X?

2. Sorry for bumping this thread but im still stuck. I've given a go at it in finding the pdf.

This is what i have so far:
Basically, if we draw the tree diagram we get a left-weighted binary-tree
We know that we need more girls then boys so we cannot have X = some even number.

Let $f_x(x)$ be our pdf.
So $f_x(x) = 0$, if x is even.
We just need to find the case where X = odd.

I've considered some cases for x = 1,3,5,7,9.....

$P(X = 1) = f_x(1) = \frac{2}{3}$, this from case {F}

$P(X = 3) = f_x(1) = (\frac{1}{3})(\frac{2}{3})^2$, this is from case {MFF}

$P(X = 5) = f_x(5) = 2(\frac{1}{3})^2(\frac{2}{3})^3$, this is for case {MMFFF, MFMFF}

$P(X = 7) = f_x(7) = 4(\frac{1}{3})^3(\frac{2}{3})^4$, for cases {MMMFFFF,MFMMFFF,MMFMFFF,MMFFMFF}

Now, this is where i get stuck:
$P(X = 9) = f_x(9) = \bold{c_9}(\frac{1}{3})^4(\frac{2}{3})^5$

for general case:

$P(X = n) = f_x(n) = \bold{c_n}(\frac{1}{3})^{\frac{n-1}{2}}(\frac{2}{3})^{\frac{n+1}{2}}$, for n odd

I'm not sure how to find $\bold{c_n}$. I guess it will be some kind of counting problem and may involve combinations.

Any ideas will be appreciated

3. Originally Posted by thecontractor
Sorry for bumping this thread but im still stuck. I've given a go at it in finding the pdf.

This is what i have so far:
Basically, if we draw the tree diagram we get a left-weighted binary-tree
We know that we need more girls then boys so we cannot have X = some even number.

Let $f_x(x)$ be our pdf.
So $f_x(x) = 0$, if x is even.
We just need to find the case where X = odd.

I've considered some cases for x = 1,3,5,7,9.....

$P(X = 1) = f_x(1) = \frac{2}{3}$, this from case {F}

$P(X = 3) = f_x(1) = (\frac{1}{3})(\frac{2}{3})^2$, this is from case {MFF}

$P(X = 5) = f_x(5) = 2(\frac{1}{3})^2(\frac{2}{3})^3$, this is for case {MMFFF, MFMFF}

$P(X = 7) = f_x(7) = 4(\frac{1}{3})^3(\frac{2}{3})^4$, for cases {MMMFFFF,MFMMFFF,MMFMFFF,MMFFMFF}

Now, this is where i get stuck:
$P(X = 9) = f_x(9) = \bold{c_9}(\frac{1}{3})^4(\frac{2}{3})^5$

for general case:

$P(X = n) = f_x(n) = \bold{c_n}(\frac{1}{3})^{\frac{n-1}{2}}(\frac{2}{3})^{\frac{n+1}{2}}$, for n odd

I'm not sure how to find $\bold{c_n}$. I guess it will be some kind of counting problem and may involve combinations.

Any ideas will be appreciated
Hint - Let n = 2k+1. So $\bold{c_n}$ = number of ways you can arrange 'k' +1's and 'k' -1's in a sequence such that the sum is never less than 0. for e.g. +1, -1, -1, +1 is not valid. So how many ways can you do that. (Random Walks !!)

4. Originally Posted by aman_cc
Hint - Let n = 2k+1. So $\bold{c_n}$ = number of ways you can arrange 'k' +1's and 'k' -1's in a sequence such that the sum is never less than 0. for e.g. +1, -1, -1, +1 is not valid. So how many ways can you do that. (Random Walks !!)

Also your calc for x = 7 is wrong. C7 = 5 (and not 4). You missed MFMFMFF