Thu 24 March 2016
Probability that one RV is greater than another
Written by Hongjinn Park in Articles
Here I'm interested in the $P(X>Y)$, where X and Y are independent with the same distribution but different parameters.
Normal RVs
Let $X$ and $Y$ be independent RVs with $X \sim Normal(\mu_X, \sigma_X^2)$ and $Y \sim Normal(\mu_Y, \sigma_Y^2)$ respectively. Then,
$$P(Y< X) = P(Y-X < 0)$$and note that $Y-X \sim Normal(\mu_Y - \mu_X, \sigma_X^2 + \sigma_Y^2)$, therefore
$$P(Y< X) = P(Y-X < 0) = P \left( \frac{Y-X - (\mu_Y - \mu_X)}{\sqrt{\sigma_X^2 + \sigma_Y^2}} < \frac{0- (\mu_Y - \mu_X)}{\sqrt{\sigma_X^2 + \sigma_Y^2}} \right) = \Phi \left( \frac{\mu_X - \mu_Y}{\sqrt{\sigma_X^2 + \sigma_Y^2}} \right)$$Exponential RVs
Let $X$ and $Y$ be independent Exponential RVs with rate parameters $\lambda_1$ and $\lambda_2$ respectively. Then,
\begin{align*} P(Y < X) & = \int_{0}^\infty \int_{0}^x\lambda_1 e^{-\lambda_1x} \lambda_2 e^{-\lambda_2y} \, dy \, dx \\ & = \lambda_1 \lambda_2 \int_{0}^\infty e^{-\lambda_1x} \int_{0}^x e^{-\lambda_2y} \, dy \, dx \\ & = \lambda_1 \lambda_2 \int_{0}^\infty e^{-\lambda_1x} \left[ \frac{-1}{\lambda_2} e^{-\lambda_2y} \right]_{y=0}^{y=x} \, dx \\ & = \lambda_1 \lambda_2 \int_{0}^\infty e^{-\lambda_1x} \frac{-1}{\lambda_2} \left[e^{-\lambda_2y} \right]_{y=0}^{y=x} \, dx \\ & = -\lambda_1 \int_{0}^\infty e^{-\lambda_1x} \left( e^{-\lambda_2x} - 1 \right) dx \\ & = -\lambda_1 \int_{0}^\infty e^{-\lambda_1x} e^{-\lambda_2x} - e^{-\lambda_1x} dx \\ & = -\lambda_1 \int_{0}^\infty e^{-(\lambda_1 + \lambda_2)x} - e^{-\lambda_1x} dx \\ & = -\lambda_1 \left( \left[ \frac{-1}{\lambda_1+\lambda_2}e^{-(\lambda_1 + \lambda_2)x} \right]_{0}^\infty - \left[ \frac{-1}{\lambda_1}e^{-\lambda_1x} \right]_{0}^\infty \right) \\ & = -\lambda_1 \left(\frac{1}{\lambda_1+\lambda_2} - \frac{1}{\lambda_1}\right) \\ & = -\frac{\lambda_1 }{\lambda_1+\lambda_2} + 1 \\ & = -\frac{\lambda_1 }{\lambda_1+\lambda_2} + \frac{\lambda_1+\lambda_2}{\lambda_1+\lambda_2} \\ & = \frac{\lambda_2 }{\lambda_1+\lambda_2}\\ \end{align*}Articles
Personal notes I've written over the years.
- When does the Binomial become approximately Normal
- Gambler's ruin problem
- The t-distribution becomes Normal as n increases
- Marcus Aurelius on death
- Proof of the Central Limit Theorem
- Proof of the Strong Law of Large Numbers
- Deriving Multiple Linear Regression
- Safety stock formula derivation
- Derivation of the Normal Distribution
- Comparing means of Normal populations
- Concentrate like a Roman
- How to read a Regression summary in R
- Notes on Expected Value
- How to read an ANOVA summary in R
- The time I lost faith in Expected Value
- Notes on Weighted Linear Regression
- How information can update Conditional Probability
- Coupon collecting singeltons with equal probability
- Coupon collecting with n pulls and different probabilities
- Coupon collecting with different probabilities
- Coupon collecting with equal probability
- Adding Independent Normals Is Normal
- The value of fame during and after life
- Notes on the Beta Distribution
- Notes on the Gamma distribution
- Notes on Conditioning
- Notes on Independence
- A part of society
- Conditional Expectation and Prediction
- Notes on Covariance
- Deriving Simple Linear Regression
- Nature of the body
- Set Theory Basics
- Polynomial Regression
- The Negative Hyper Geometric RV
- Notes on the MVN
- Deriving the Cauchy density function
- Exponential and Geometric relationship
- Joint Distribution of Functions of RVs
- Order Statistics
- The Sample Mean and Sample Variance
- Probability that one RV is greater than another
- St Petersburg Paradox
- Drunk guy by a cliff
- The things that happen to us