Origin Between Two Uniform Random Variables

Probability · Easy · Free problem

Let $X$ and $Y$ be independent, each drawn from $U(-2, 4)$. What is the probability that the origin (i.e., the point $0$) lies strictly between $X$ and $Y$ on the number line?

In other words, find $P(\min(X, Y) < 0 < \max(X, Y))$.

Hints

  1. For zero to lie between $X$ and $Y$, the two values must straddle the origin -- one positive, one negative.
  2. Since $X$ and $Y$ are independent, you can compute $P(X > 0) \cdot P(Y < 0)$ directly from the uniform distribution on $(-2, 4)$.
  3. There are two arrangements (which variable is positive, which is negative), so multiply by
$: the answer is \cdot \frac{2}{3} \cdot \frac{1}{3}$.

Worked Solution

How to Think About It: Picture two darts thrown independently at a number line from $-2$ to $4$. You want the origin to sit between them. That means one dart lands on the negative side and the other on the positive side. If they both land positive or both land negative, zero is not between them. So the question reduces to: what is the probability that $X$ and $Y$ have opposite signs?

Quick Estimate: The interval $(-2, 4)$ has length $6$. The negative portion $(-2, 0)$ has length $, giving $P(\text{negative}) = 2/6 = 1/3$. The positive portion $(0, 4)$ has length $4$, giving $P(\text{positive}) = 4/6 = 2/3$. One negative and one positive can happen in two ways (either $X$ negative and $Y$ positive, or vice versa). So the probability is roughly \times (1/3)(2/3) = 4/9 \approx 0.44$.

Approach: Use independence and symmetry over the two sign arrangements.

Formal Solution: We need $P(\min(X,Y) < 0 < \max(X,Y))$. This event is equivalent to exactly one of $X, Y$ being negative and the other positive. By symmetry in the roles of $X$ and $Y$:

$P(\min(X,Y) < 0 < \max(X,Y)) = 2 \cdot P(X > 0) \cdot P(Y < 0)$

Since $X \sim U(-2, 4)$:

$P(X > 0) = \frac{4 - 0}{4 - (-2)} = \frac{4}{6} = \frac{2}{3}$

$P(Y < 0) = \frac{0 - (-2)}{4 - (-2)} = \frac{2}{6} = \frac{1}{3}$

So:

$P = 2 \cdot \frac{2}{3} \cdot \frac{1}{3} = \frac{4}{9}$

Answer: $P(\min(X,Y) < 0 < \max(X,Y)) = \dfrac{4}{9}$.

Intuition

This problem is really about partitioning the sample space by sign. Whenever you have uniform random variables on an interval that spans zero, the probability of straddling the origin is determined entirely by the fraction of the support on each side of zero. The asymmetry of the interval $(-2, 4)$ matters -- if the interval were symmetric around zero, the answer would be \cdot (1/2)(1/2) = 1/2$. Here, because the positive side is twice as long as the negative side, the probability shifts to $4/9$.

This kind of reasoning -- decomposing by which "region" each variable falls in -- shows up constantly in geometric probability and order statistics. The general pattern: if the support splits into regions of relative sizes $p$ and

-p$, the probability of straddling is
p(1-p)$, which is maximized at $p = 1/2$.

Open the full interactive solver →