0

I have a problem I've been thinking for a while, but it's confusing me quite a lot.

There are two independen machines, A and B. A produces a product at a rate of 2/minute, and B does it at a rate of 3/minute, both of them following a Poisson process.

The products of both machines get into a line where a person packs them by pairs as they arrive.

I need to find the mean and the variance of the time I have to wait until there is a package formed by a product of A and a product of B.

I don't really know where to start, because I can't even decide what the "success" is. I know that i can get the mean of both the machines, but how can i be sure i'm alternating between the two machines?

Thank you very much beforehand.

FDrico
  • 199
  • How would you go about getting the mean time between products for each machine individually. Then think about how one machine depends on the other to be able to package a combined product. This should help you with the mean time part of your question I believe. – Patrick May 13 '13 at 16:25
  • But, how can i now how one machine depends on the other? i mean, they are independent. They don't have any dependence, i believe. I know there will be a package formed by a product from A and a product from B when i get a product from A before or after a product from B. But that's it. I'm stuck there. – FDrico May 13 '13 at 16:29

1 Answers1

1

This is a magic property of Poisson processes.
Let $\mu = 2$ and $\lambda = 3$ be the rates of your two machines

Now I want to know the probability that I get nothing out of either machine in the first $t$ minutes.

I get nothing out of machine $A$ with probaiblity $e^{-\mu t}$ and nothing out of machine $B$ with probability $e^{-\lambda t}$.

So as the machines are independent I get nothing out of the either machine with probability $e^{-(\mu+\lambda)t}$.

So the two machines working together act like a Poisson machine producing at a rate of $5$ per minute.

You should be able to recognise the distribution of the waiting time above and calculate the mean.

Now lets try a similar approach for the question you actually asked so that I can pretend that was a warm up exercise and not just idiot boy here not reading the question.

We already know that the first product comes out of the machine after an exponential waiting time mean $\frac 15$ and variance $\frac 1{25}$. So the amount of time I have to wait before I get two is the sum of two independent exponentials, hence has mean $\frac 25$ and variance $\frac 2{25}$.

So how many pairs do I need to see before I get a package with one from each? For a fixed time $t$ the probability I've seen one product from $A$ and none from $B$ is $e^{-(\lambda+\mu)} \frac \mu{0!\cdot 1!}$ and the probability I've seen one from $B$ and none from $A$ is $e^{-(\lambda+\mu)} \frac \lambda{0!\cdot 1!}$ so conditioned on the event only one product has been seen the probability it came from $A$ is $\frac{\mu}{\mu+\lambda}$ or $\frac 25$.

Now the output of the machines is independent and memoryless so the sequence of products is an iid sequence. Therefore the probability the firs pair gives a proper package is $2\cdot \frac 25\cdot\frac 35 = \frac{12}{25}$.

Let $N$ be the number of packages we make before we get a good one. (So the $N$th package is good) We have $$P(N = n) = \left(\frac {13}{25}\right)^{n-1}\left(\frac {12}{25}\right)$$

Now the packages arrive at independent intervals of length $T_i$ each of which has $E(T) = \frac 15$ and $E(T^2) = \frac 2{25}$ so with total Waiting time $$T = \sum_{i=1}^N T_i$$ So if I know $N$ I can write $$E(T|N) = NE(T_i) = \frac N5$$and $$E(T^2|N) = \left(\sum_{i=1}^N T_i\right)^2 = \sum_{i=1}^N E(T_i)^2 + 2\sum_{i\neq j} E(T_i)E(T_j)$$ $$= NE(T_i^2) + (N^2-N)E(T_i)^2 = \frac{N^2 + N}{25}$$

You get to take it from here. You know the distribution of $N$ so you can work out $E(T) = \frac{E(N)}5$ and $E(T^2) = \frac{E(N^2+N)}{25}$ So you should be able to get the mean and variance.

Tim
  • 5,564
  • Thank you for your answer. But i don't know where it applies to my problem. I knew the property, but i can't see how can i use it to "pack" two results. I think that, with what you told me, i can have the mean of the ammount of time i have to wait until a new product is found, but not the ammount of time i have to wait until i can make a pack of two products comming from different machines. Thank you again! – FDrico May 13 '13 at 16:37
  • Good point, I should probably have read the whole of your question before answering it. I'll edit it. – Tim May 13 '13 at 16:39
  • That's actually a little bit harder. Do you know what generating functions are? – Tim May 13 '13 at 16:51
  • You're great! Thank you! I think i got it :) – FDrico May 13 '13 at 18:09