Previous: Continuous Random Variables Next: 2.2 – A Simple Example We previously defined a continuous random variable to be one where the values the random variable are given by a continuum of values. For example, we can define a continuous random variable that can take on any value in the interval [1,2]. To be more precise, we recall the definition of a cumulative distribution function (CDF) for a random variable that was introduced in the previous lesson on discrete random variables.
From this, we can define a continuous random variable to be any random variable X whose CDF is a continuous function. Notice that this is in contrast to the case of discrete random variables where the corresponding CDF is always a discontinuous step-function. Recall the cumulative distribution function we had for the test scores example in the previous lesson. The cumulative distribution function was graphed at the end of the example. Observe that
The graph of F "increases in steps" at 30, 60, 80, 90, and 100. CDFs for discrete random variables are always step functions. A discrete random variable cannot assume a continuum of values; thus, its CDF can only increase at a finite or countably infinite set of points. For another example, consider the function whose graph is given below. This function cannot represent a CDF for a continuous random variable because the function F is not continuous for all values of x. However, F could represent a cumulative distribution function for a discrete random variable since it satisfies our definition from the previous lesson on discrete random variables. Previous: Continuous Random Variables Next: 2.2 – A Simple Example
3.2.1 Cumulative Distribution FunctionThe PMF is one way to describe the distribution of a discrete random variable. As we will see later on, PMF cannot be defined for continuous random variables. The cumulative distribution function (CDF) of a random variable is another method to describe the distribution of random variables. The advantage of the CDF is that it can be defined for any kind of random variable (discrete, continuous, and mixed).
Definition Note that the subscript $X$ indicates that this is the CDF of the random variable $X$. Also, note that the CDF is defined for all $x \in \mathbb{R}$. Let us look at an example. Example I toss a coin twice. Let $X$ be the number of observed heads. Find the CDF of $X$.
In general, let $X$ be a discrete random variable with range $R_X=\{x_1,x_2,x_3,...\}$, such that $x_1 < x_2 < x_3 < ...$ Here, for simplicity, we assume that the range $R_X$ is bounded from below, i.e., $x_1$ is the smallest value in $R_X$. If this is not the case then $F_X(x)$ approaches zero as $x \rightarrow -\infty$ rather than hitting zero. Figure 3.4 shows the general form of the CDF, $F_X(x)$, for such a random variable. We see that the CDF is in the form of a staircase. In particular, note that the CDF starts at $0$; i.e.,$F_X(-\infty)=0$. Then, it jumps at each point in the range. In particular, the CDF stays flat between $x_k$ and $x_{k+1}$, so we can write $$F_X(x)=F_X(x_k), \textrm{ for }x_k \leq x < x_{k+1}.$$ The CDF jumps at each $x_k$. In particular, we can write $$F_X(x_k)-F_X(x_k-\epsilon)=P_X(x_k), \textrm{ For $\epsilon>0$ small enough.}$$ Thus, the CDF is always a non-decreasing function, i.e., if $y \geq x$ then $F_X(y)\geq F_X(x)$. Finally, the CDF approaches $1$ as $x$ becomes large. We can write $$\lim_{x \rightarrow \infty} F_X(x)=1.$$ Note that the CDF completely describes the distribution of a discrete random variable. In particular, we can find the PMF values by looking at the values of the jumps in the CDF function. Also, if we have the PMF, we can find the CDF from it. In particular, if $R_X=\{x_1,x_2,x_3,...\}$, we can write $$F_X(x)=\sum_{x_k \leq x} P_X(x_k).$$ Now, let us prove a useful formula. For all $a \leq b$, we have $$\hspace{50pt} P(a < X \leq b)=F_X(b)-F_X(a) \hspace{80pt} (3.1)$$ To see this, note that for $a \leq b$ we have $$P(X \leq b)=P(X \leq a) + P(a < X \leq b).$$ Thus, $$F_X(b)=F_X(a) + P(a < X \leq b).$$ Again, pay attention to the use of "$ < $" and "$\leq$" as they could make a difference in the case of discrete random variables. We will see later that Equation 3.1 is true for all types of random variables (discrete, continuous, and mixed). Note that the CDF gives us $P(X \leq x)$. To find $P(X < x)$, for a discrete random variable, we can simply write $$P(X < x)=P(X \leq x)-P(X=x)=F_X(x)-P_X(x).$$ Example Let $X$ be a discrete random variable with range $R_X=\{1,2,3,...\}$. Suppose the PMF of $X$ is given by $$P_X(k)=\frac{1}{2^k} \textrm{ for } k=1,2,3,...$$
|