Here is a Bernoulli process:
A network router accepts packets coming from two links. Time is divided into slots. A slot can be idle, with probability pI=1/6, and busy with probability pB=5/6. During a busy slot, there is probability p1|B=2/5 (respectively, p2|B=3/5) that a packet from link 1 (respectively, 2) is being rerouted. We assume that events related to different slots are independent. The goal is to find the distribution of the PMF, mean, and variance of the number of packets from link 2 until the time of the 5th packet from link 1 (let's call this random variable X).
How do you go about this problem?
My idea is, employing Pascal distribution, the expected number of slots up to and including the 5th packet from link 1 (let's call this random variable Y) is just $$5*\frac{1}{(5/6)*(2/5)}$$.
I am certain that the distribution of the PMF of X should be Pascal. My idea is that the mean of X should just be $$5*\frac{1}{(5/6)*(2/5)}*[(3/5)*(5/6)]$$ which is the mean time of the number of slots up to (and including) the 5th packet from link 1 or $E[Y]$ times the probability of a link 2 packet which is $[(3/5)*(5/6)]$. Similarly, for the variance, my idea is just to multiply var(Y) times the square of $[(3/5)*(5/6)]$. However, my professor told me that the resulting mean that I got for X is correct, however, the variance is not, because $X\ne[(3/5)*(5/6)]Y$. Why is this so? What is $X$ in terms of $Y$? And how do I find the mean and variance?
We are not concerned with the count of time slots. We are counting the number of packets, which only appear during busy slots.
In order for $X=k$ we must see some arrangement of 4 packets from link#1 and $k$ packets from link#2 in some order, followed immediately by a final packet from link 1. The rate of arrival of packets from link#1 during busy times is $p_{1\mid B}$, and from link#2 is $p_{2\mid B}$ . So using this evaluate the pmf.
$$\mathsf P(X=k) = \bbox[lemonchiffon,1pt,border:dotted 1pt blue]{\qquad\qquad\color{silver}{\mid?}}\mathbf 1_{k\in \{0,1,\ldots\}}$$
This should be a distribution from a familiar family.