Starting at time 0, a red bulb flashes according to a Poisson process with rate lambda=2. Similarly, starting at time 0, a blue bulb flashes according to a Poisson process with rate lambda=1, but only until a non negative random time X_i, at which point the blue bulb "dies". We assume that the two Poisson processes and the random variable X are (mutually) independent.

1. Suppose that X is deterministically equal to 1. What is the expected total number of flashes (of either colour) during the interval [0,2]?
2. In the time interval [0,X], there are exactly 5 flashes. What is the probability that exactly 2 of them were red?
3. Suppose that X is equal to either 1 or 2, with equal probability. Write down an expression for the probability that there were exactly 2 arrivals during the time interval [0,2].

1. Since X is deterministically equal to 1, the blue bulb will flash once and then die. Therefore, in the interval [0,2], the red bulb will continue flashing according to a Poisson process with rate lambda=2.

The expected number of flashes of the red bulb in a time interval t is given by lambda*t. In this case, lambda=2 and t=2, so the expected number of flashes of the red bulb during the interval [0,2] is 2*2 = 4.

2. If there are exactly 5 flashes in the time interval [0,X], and exactly 2 of them are red, then the remaining 3 flashes must be blue.

The probability of exactly 2 red flashes in 5 total flashes is given by the binomial probability formula: P(X=k) = (n choose k) * (p^k) * ((1-p)^(n-k)), where n is the total number of trials, k is the number of successes, and p is the probability of success.

In this case, n=5, k=2, and p is the probability of a red flash, which is lambda_red/(lambda_red+lambda_blue). In this case, lambda_red=2 and lambda_blue=1, so p=2/(2+1) = 2/3.

Therefore, the probability of exactly 2 red flashes in 5 total flashes is P(X=2) = (5 choose 2) * ((2/3)^2) * ((1-(2/3))^(5-2)) = (10) * ((2/3)^2) * ((1/3)^3) = 10 * (4/9) * (1/27) = 40/243.

3. If X is equal to either 1 or 2, with equal probability, there are two cases to consider: X=1 and X=2.

For the case when X=1, the blue bulb will flash once and then die, just like in question 1. So the expected number of flashes of either color in the interval [0,2] is 4.

For the case when X=2, the blue bulb will flash twice and then die. In this case, the red bulb will continue flashing according to a Poisson process for the full interval [0,2]. The expected number of red flashes in [0,2] is 2*2 = 4, as calculated in question 1.

So the total expected number of flashes of either color in the interval [0,2] when X=2 is 4+4 = 8.

Since X=1 or X=2 with equal probability, the probability of either case occurring is 1/2. Therefore, the expression for the probability of exactly 2 arrivals during the time interval [0,2] is:

(1/2)*(probability of exactly 2 arrivals when X=1) + (1/2)*(probability of exactly 2 arrivals when X=2)

1. The expected total number of flashes (of either color) during the interval [0,2] can be calculated by adding the expected number of red flashes and the expected number of blue flashes.

The expected number of red flashes can be calculated using the formula for the Poisson process. Since the rate of the red bulb flashing is λ = 2, the expected number of red flashes in the interval [0,2] is given by λ * t, where t is the length of the interval. So, the expected number of red flashes is 2 * 2 = 4.

Since X is deterministically equal to 1, the blue bulb will stop flashing after time 1. So, the expected number of blue flashes during the interval [0,2] is equal to the expected number of blue flashes during the interval [0,1]. Using the same formula for the Poisson process with rate λ = 1, the expected number of blue flashes during the interval [0,1] is 1 * 1 = 1.

Therefore, the expected total number of flashes during the interval [0,2] is 4 + 1 = 5.

2. If there are exactly 5 flashes in the time interval [0,X], and we want to calculate the probability that exactly 2 of them were red, we need to consider the probability distribution of the number of red flashes.

Since the red bulb flashes according to a Poisson process with rate λ = 2, the probability of having k red flashes during a given interval is given by the Poisson probability formula: P(k) = (e^-λ * λ^k) / k!

In this case, we want to calculate the probability of exactly 2 red flashes (k = 2) when there are a total of 5 flashes in the interval [0,X].

Let's denote the number of blue flashes as b. Since we know that there are exactly 5 flashes in total and we want 2 of them to be red, we have the following relationship: 5 = 2 + b.

Substituting b = 5 - 2 = 3, we can calculate the probability of having 3 blue flashes in the interval [0,X]. The probability of having exactly 3 blue flashes is given by the Poisson probability formula with rate λ = 1: P(3) = (e^-1 * 1^3) / 3!.

So, the probability of exactly 2 red flashes given that there are exactly 5 flashes in the interval [0,X] is P(2) * P(3).

3. If X can be equal to either 1 or 2 with equal probability, let's denote the event "X = 1" as A and the event "X = 2" as B. We want to calculate the probability of having exactly 2 arrivals during the time interval [0,2], which can be expressed as P(2).

Using the law of total probability, we can write the expression for P(2) as follows:

P(2) = P(2 | A) * P(A) + P(2 | B) * P(B)

Since we know that the number of arrivals in each interval follows a Poisson distribution with rates λ = 2 for the red bulb and λ = 1 for the blue bulb, we can calculate P(2 | A) and P(2 | B) using the Poisson probability formula as described in the previous steps.

P(A) and P(B) are equal probabilities because X can be either 1 or 2 with equal probability. Therefore, P(A) = P(B) = 0.5.

Substituting the probabilities into the expression, we have:

P(2) = P(2 | A) * 0.5 + P(2 | B) * 0.5

This expression represents the probability that there were exactly 2 arrivals during the time interval [0,2] when X is equal to either 1 or 2 with equal probability.