# Calculating CDF given defined RV

I'm trying to calculate the cumulative distribution function (CDF) for a given RV. I know the definition of the CDF, which is the probability of the random variable (Say, X) less than or equal to x. More specifically, the example my instructor used in class doesn't seem to follow this definition. I was wondering how the instructor managed to calculate CDF from the definition of RV as shown in the image.

• The cdf drawn in the picture is monotonic non-decreasing but the i axis should start at 0 and end at 1 which does not appear to happen. – Michael Chernick Apr 7 '18 at 23:28
• This question requires a self-study tag. And more details on the difficulty with the current resolution. – Xi'an Apr 8 '18 at 9:54

Notice that the diagram is not the picture of the CDF of $X$; it's a picture of $X$ itself, where $X$ is defined as a mapping from a probability space to the real numbers. The probability space is $\Omega:=[-4,12]$, i.e., the interval from -4 to 12. It appears the probability measure $P$ on $\Omega$ is uniform over this interval.

Generally speaking, if $A$ denotes a subset of the real numbers, the probability $P(X\in A)$ is $$P(X\in A):= P\left(\{\omega: X(\omega)\in A\}\right).$$ That is, you first need to identify the set of points $\omega$ that belong to the inverse image (or preimage) of set $A$ under the mapping $X$. [Note your instructor is using $i$ rather than $\omega$ as the generic element of $\Omega$.] In this example the inverse image will be a subset of the interval $[-4,12]$. You then compute the probability of that inverse image using a uniform distribution.

To compute the CDF $F_X$ of $X$ you have to consider sets of the form $A:=(-\infty, \alpha]$ for all choices of $\alpha$. For example when $\alpha=-2$ your mission is to find the inverse image of $(-\infty,-2]$ under the mapping $X$, i.e., the set of all points whose image under $X$ is less than or equal to -2. By inspecting the diagram, the inverse image is the interval $[-4, -2]$, and its probability is the length of the interval divided by the length of $\Omega$, namely $2/16$. Here's the detailed explanation:

1. $F_X(\alpha):=P(X\in (-\infty, \alpha])$. This is the definition of the CDF $F_X$.

2. $P(X\in (-\infty, \alpha])=P([-4, -2])$ since $[-4,-2]$ is the inverse image under $X$ of $(-\infty, \alpha]$ when $\alpha=-2$.

3. $P([-4,-2]) = \frac{-2 - (-4)}{12 -(-4)}$ since $P$ is a uniform distribution, and $-2 - (-4)$ is the length of the interval $[-4, -2]$, while $12-(-4)$ is the length of the interval $[-4, 12]$.

The remaining values of $F_X$ in your notes are computed using a similar argument.

• Thank you very much! I know fully understand the concept and able to solve similar examples and problems. I upvoted you, but it won't display it publicly because I have less than 15 reputation. Thank you again! Have a good day! – YoZo Apr 8 '18 at 8:55