probability of sequential, exponential and independent events My question is related to my job and asking to learn.
Simplified case is:
Event A and Event B failure rates are exponentially distributed.
Event A (failure of item A) => failure rate (lambda): 0,0002
Event B (failure of item A) => failure rate (lambda): 0,0008
for a duration of 500.
I want to understand the probability that both events occurs but event A occurs before event B.
Event A and B are independent. One does not trigger (not change the prob.) the other.
I made 200,000 trials monte carlo sim. and get 0,01533 for probability that both events occurs but event A occurs before event B.
Q1) But where is this coming from? What is the analytical solution for this case? 
Q2) Which specific statistics topic  should I read on web if the number of sequential items increases and the problem gets more complex?
thanks
 A: If we let $X$ be the time until event A and $Y$ be the time until event B, then both $X$ and $Y$ have exponential distributions (let's call their rates $\lambda_1$ and $\lambda_2,$ respectively) and it appears you want to find $P[X < Y, X<500,Y<500]$  
We know by independence that the probability that both $X$ and $Y$ are less than 500 is given by $T=\left( 1-e^{-500 \lambda_1} \right) \left( 1-e^{-500 \lambda_2} \right)$
I'm not sure why I did it this way, but within the domain (a square) of both variables being less than 500 I found the complementary area $U=P[X>Y, X<500, Y<500]$ to what you are interested in by using a double integration. 
Then your desired quantity is $T-U.$
I found that to be 
$$T-U =\frac{1}{\lambda_1+\lambda_2} \left[ \lambda_1 + \lambda_2 e^{-500 \left( \lambda_1 + \lambda_2 \right) } \right]-e^{-500 \lambda_2} $$ 
For your rates this evaluates to $0.0149045,$ in good agreement with your simulation result.  
Now let's set up the direct approach. We want to evaluate the probability that $X<Y$ constrained by both variables being no more than 500. Call the answer $Q.$
$$Q=\int_0^{500}\int_x^{500}\lambda_1 e^{-\lambda_1x} \lambda_2e^{-\lambda_2y} \ dy \ dx$$
If you solve this, you will get the same answer as above. Can you take it from here?
