I've learned in my probability courses that the cumulative distribution function $F$ of a random variable $X$ is right continuous. Is it possible to prove that?
Solved – How to prove that the cumulative distribution function is right continuous
probability
Related Solutions
Let's start with the definitions.
The cumulative distribution function, or CDF, of a random variable $X$ is the function $F_X:\mathbb{R}\to\mathbb{R}$ defined by
$$F_X(x) = \Pr(X \le x).$$
A discrete random variable $X$ which takes on the values $(x_1, x_2, x_3, \ldots)$ with probabilities $(p_1, p_2, p_3, \ldots)$, respectively, therefore has distribution function
$$F_X(x) = \sum_{i\,|\, x_i \le x} p_i.$$
This can be written conveniently in terms of the Heaviside function
$$\theta(x) = \begin{array}{ll} \left\{ \begin{array}{ll} 0 & x \lt 0 \\ 1 & x\ge 0 \end{array}\right. \end{array}$$
via
$$F_X(x) = \sum_i p_i \theta(x-x_i).$$
To say that a random variable $X$ has a uniform distribution supported on $[a,b]$, written $X\sim U(a,b)$, means that its CDF rises linearly from $0$ at $x=a$ to $1$ at $x=b$. There is no probability that $X$ can lie outside the interval $[a,b]$, implying that $F_X(x)=0$ for $x\lt a$ and $F_X(x) = 1$ for $x\gt b$. To describe such a piecewise linear function, introduce the function
$$\Theta(x) = x^{+} = \max(0, x).$$
This function is $0$ for $x\lt 0$ and otherwise equals $x$ for $x\ge 0$. We may write
$$F_X(x) = \Theta(z) - \Theta(z-1)$$
where $z = (x-a)/(b-a)$.
A mixture of distributions $F_1, F_2, F_3, \ldots$ with weights $\omega_1, \omega_2, \omega_3, \ldots$, respectively, will be a distribution when the weights are non-negative and sum to unity. In that case the distribution function of the mixture is
$$F(x) = \sum_i \omega_i F_i(x).$$
The last definition enables us to write the answer immediately as
$$F(x) = \frac{1}{3}F_1(x) + \frac{1}{3} F_2(x) + \frac{1}{3} F_3(x)$$
where the first distribution $F_1$ is $U(1,2)$, the second $F_2$ is $U(2,4)$, and the third $F_3$ is discrete. Applying definitions (2) and (3) as appropriate enables us immediately to write
$$F_1(x) = \Theta\left(\frac{x-1}{2-1}\right) - \Theta\left(\frac{x-1}{2-1} - 1\right),$$
$$F_2(x) = \Theta\left(\frac{x-2}{4-2}\right) - \Theta\left(\frac{x-2}{4-2} - 1\right),$$
and
$$F_3(x) = 0.4 \theta(x - 2) + 0.6 \theta(x - 3).$$
Here are their graphs.
Plugging them into the formula for $F$ gives a solution. The remaining issue concerns how to simplify it. Arguably, one would usually not want to "simplify" this expression, because that would only obscure what it means and how to interpret it. One valid reason for a simplification would be to improve computation, but the separate computation of the $F_i$ is already so simple and fast that even this reason seems like a poor one.
However, it may be of interest to understand $F$ qualitatively. To this end, note that
$F_1$ and $F_2$ are piecewise linear and continuous, but have "kinks" where a slope is not defined. (The slope, where defined, gives a value for a probability density function and therefore can be of some interest.)
$F_3$ is piecewise constant, but contains jumps.
Because the mixture is a linear combination of the $F_i$ and linear combinations preserve linearity, we know immediately that $F$ is piecewise linear but may have kinks and jumps. Where are these interesting values located? They can be only where they might occur in the $F_i$. Looking at the plots (or the formulas, for those who prefer algebraic reasoning to geometric), it should be clear that a $U(a,b)$ distribution has kinks only at $\{a,b\}$--which is $\{1,2\}$ for $F_1$ and $\{2,4\}$ for $F_2$--and a discrete distribution has jumps only at its support $\{x_i\}$, which for $F_3$ is $\{2,3\}$. Therefore:
$F$ can have jumps only at $\{2,3\}$.
$F$ can have kinks only at $\{1,2,4\}$.
$F$ must be linear in between any kinks or jumps.
Thus, $F$ must have a piecewise linear definition broken down on the intervals $x\lt 1$, $1\le x \lt 2$, $2 \le x \lt 3$, $3 \le x \lt 4$, and $x\ge 4$. To write this down explicitly--which is rarely needed--use your favorite methods to work out the formulas of linear functions.
$$F(x) = \begin{array}{cc} \left\{ \begin{array}{cc} 0 & x \lt 1 \\ \frac{1}{3}(x-1) & 1\le x\lt2 \\ \frac{1}{30} (5x+4) & 2\leq x\lt3 \\ \frac{1}{6}(x+2) & 3\leq x\lt 4 \\ 1 & x\ge 4. \\ \end{array}\right. \end{array}$$
This answer uses the word "immediately" three times at junctures where no thought was required: only rote substitution of formulas into other formulas or application of a definition was needed. These applications are fundamentally uninteresting. What is of interest, and worth remembering from doing such an exercise, is the idea that certain qualitative aspects of mixture distribution can easily be inferred from qualitative properties of their components. This question focuses on reasoning about properties of continuity (absence of jumps) and differentiability (absence of jumps or kinks).
Because if $x \leq y$, then if $X \leq x$, it follows that $X \leq y$. Therefore, $P(X \leq x) \leq P(X \leq y)$.
More generally, probabilities are monotone in the sense that if $A$ and $B$ are events and $A \subseteq B$, then $P(A) \leq P(B)$. This follows from writing $B$ as the disjoint union of $A$ and $B \setminus A$, whence by the probability axioms $P(B) = P(A) + P(B \setminus A) \geq P(A)$ (since $P(B \setminus A) \geq 0$).
In the case of cumulative distribution functions with $x \leq y$, take $A = \{X \leq x\}$ and $B = \{X \leq y\}$.
Best Answer
To prove the right continuity of the distribution function you have to use the continuity from above of $P$, which you probably proved in one of your probability courses.
Lemma. If a sequence of events $\{A_n\}_{n\geq 1}$ is decreasing, in the sense that $A_n\supset A_{n+1}$ for every $n\geq 1$, then $P(A_n)\downarrow P(A)$, in which $A=\cap_{n=1}^\infty A_n$.
Let's use the Lemma. The distribution function $F$ is right continuous at some point $a$ if and only if for every decreasing sequence of real numbers $\{x_n\}_{n\geq 1}$ such that $x_n\downarrow a$ we have $F(x_n)\downarrow F(a)$.
Define the events $A_n=\{\omega : X(\omega)\leq x_n\}$, for $n\geq 1$. We will prove that $$\bigcap_{n=1}^\infty A_n=\{\omega:X(\omega)\leq a\}\, .$$
In one direction, if $X(\omega)\leq x_n$ for every $n\geq 1$, since $x_n\downarrow a$, we have $X(\omega)\leq a$.
In the other direction, if $X(\omega)\leq a$, since $a\leq x_n$ for each $n\geq 1$, we have $X(\omega)\leq x_n$, for every $n\geq 1$.
Using the Lemma, the result follows: $$ F(x_n) = P\{X\leq x_n\} = P(A_n) \downarrow P\left( \cap_{n=1}^\infty A_n \right) = P\{X\leq a\} = F(a) \, . $$