# Finding the joint probability distribution $P(X_1=x_1,\ldots,X_n=x_n)$

Let $Y_1,Y_2,\ldots$ be a sequence of independent Bernoulli trials with parameter $p$ and $X_1,X_2,\ldots$ be respectively the first time of success, second time of success,$\ldots$. How can I calculate the joint probability distribution $P(X_1=x_1,\ldots,X_n=x_n)$?

• Another one of hadisanji's homework problems, showing no personal attempts at solving whatsoever, to which we are asked to provide complete answers that will rarely ever be accepted? Mar 14, 2014 at 15:57

Given $x_1<x_2<\dots<x_n$, use the product rule $$P(X_1=x_1,\dots,X_n=x_n) = P(X_1=x_1)\times P(X_2=x_2\mid X_1=x_1)\times\dots\times P(X_n=x_n\mid X_{n-1}=x_{n-1},\dots, X_1=x_1) \, .$$ In this problem we have a markovian property $$P(X_k=x_k\mid X_{k-1}=x_{k-1},\dots, X_1=x_1) = P(X_k=x_k\mid X_{k-1}=x_{k-1}) = P(Z=x_k-x_{k-1}) \, ,$$ in which $Z$ is a negative-binomial random variable with probability of success equal to $p$. Put everything together to find the joint distribution.
1. Write out some examples. E.g. $P(X_1=K_1=2, X_2=k_2=5, X_3=k_3=9)$ is the probability of getting $010010001$. See if you can spot a pattern, e.g. $010010001$ is 1 failure followed by 1 success followed by 2 failures followed by 1 success followed by 3 failures followed by 1 success. Can you relate this to the values of $X_1$, $X_2$, and $X_3$? Can you generalize?
3. Have a look at your proposed formula. Can you simplify it? Are there any particular values of $X_1,\ldots,X_n$ for which it wouldn't work and for which you need to make exceptions? Finally, test it against simple examples.