The Question
Let $p_X(x)$ be the pmf of a random variable $X$. Find the cdf $F(x)$ of $X$ and sketch its graph along with that of $p_X(x)$ if
a) $p_X(x) = 1, x = 0$, zero elsewhere
b) $p_X(x) = 1/3, x = -1, 0, 1$, zero elsewhere
c) $p_X(x) = x/15, x = 1, 2, 3, 4, 5$, zero elsewhere
My Attempt
a) $F_X(x) = 1$
b) $F_X(x) = 1/3$
c) $F_X(x) = 1/15 + 2/15 + 3/15 + 4/15 + 5/15 = 1$
I'm unsure which, if any of these are correct.
$\endgroup$ 42 Answers
$\begingroup$I will use $f(x)$ for pmf and $F(x)$ for cdf. I will show you how to do part b. See if you can figure out the rest.
For discrete distributions the general formula is:
$$F(x) = \sum_{x_i \leq x}f(x_i)$$
As such, each interval $[x_i,x_{ i+1})$ should (in general) carry a different value:
For b., we have $x_1=-1,x_2=0,x_3=1$
For $x \in (-\infty,-1)$ we have not yet hit any $x_i$ so $F(x) = 0$
For $x \in [-1,0)$, $$F(x) = \sum_{x_i \leq x}f(x_i) = f(x_1) = 1/3$$
For $x \in [0,1)$, $$F(x) = \sum_{x_i \leq x}f(x_i) = f(x_1)+f(x_2) = 1/3+1/3 = 2/3$$
For $x \in [1,\infty)$, $$F(x) = \sum_{x_i \leq x}f(x_i) = f(x_1)+f(x_2)+f(x_3) = 2/3 + 1/3 = 1$$
So altogether,
$$ F(x) = \begin{cases} 0 & x < -1 \\ 1/3 & -1 \leq x < 0 \\ 2/3 & 0 \leq x < 1 \\ 1 & x \geq 1 \end{cases} $$
$\endgroup$ $\begingroup$You need to integrate over the entire region. The CDF of $x$ is the sum of all probabilities given by the PMF that are less than $x$. Note how in problem B the PMF has a value of $\frac{1}{3}$ for each of the 3 corresponding values of $x$. Also as a sanity check the CMF should always equal 1 once it is higher than all possible values of x.
A) $ F_X(x)= \begin{cases} 0&\text{if}\, x< 0\\ 1&\text{otherwise} \end{cases} $
B) $ F_X(x)= \begin{cases} 0&\text{if}\, x< -1\\ \frac{1}{3}&\text{if}\, -1 \leq x < 0\\ \frac{2}{3}&\text{if}\, 0 \leq x < 1\\ 1&\text{otherwise} \end{cases} $
C) $ F_X(x)= \begin{cases} 0&\text{if}\, x< 1\\ \frac{1}{15}&\text{if}\, 1 \leq x < 2\\ \frac{3}{15}&\text{if}\, 2 \leq x < 3\\ \frac{6}{15}&\text{if}\, 3 \leq x < 4\\ \frac{10}{15}&\text{if}\, 4 \leq x < 5\\ 1&\text{otherwise} \end{cases} $
$\endgroup$