# Cumulative distribution functions and random variable problem

So the question is:

If X is a random variable with a cdf $FX (t)$, and Y is the random variable given by Y = aX + b. Express the cdf $FY (t)$ of Y in terms of $FX (t)$.

(Consider separately the cases a > 0, a < 0 and a = 0. Notice that it is not assumed that X is either a discrete or a continuous random variable! You may use limits if necessary.)

What I have so far is :

$F_X(t)=P(X\leq t)$

Now Y=aX+b

So CDF of the variable Y is $F_Y(t)=P(Y\leq t)$

i) for a>0,

$F_Y(t)=P(Y\leq t) =P(aX+b\leq t) =P(X\leq \frac{t-b}{a}) =F_X(\frac{t-b}{a})$

ii) for a<0

$F_Y(t)=P(Y\leq t) =P(aX+b\leq t) =P(aX\leq t-b)=P(X\geq \frac{t-b}{a}) [ since a<0 ]$ =$1-P(X<\frac{t-b}{a} )$

If X is a discrete random variable,

$F_Y(t)=1-P(X<\frac{t-b}{a} )=1-P(X\leq \frac{t-b}{a}-1)=1-F_X(\frac{t-b-a}{a})$

If X is a continuous random variable,

$F_Y(t)=1-P(X<\frac{t-b}{a} )=1-F_X(\frac{t-b}{a})$

iii) for a=0

$Y=aX+b=(0\times X)+b=b$

Here the variable Y has only one mass point i.e. Y=b.

$\therefore P(Y=b)=1$

$\therefore P(Y\leq b)=1\Rightarrow F_Y(b)=1$

So the CDF of the variable Y is

for a<0

$F_Y(t)=1-F_X(\frac{t-b-a}{a})$ , X is a discrete random variable.

$F_Y(t)=1-F_X(\frac{t-b}{a})$ , X is a continuous random variable.

(for any value of t .)

for a>0

$F_Y(t)=F_X(\frac{t-b}{a})$

(for any value of t .)

for a=0

$F_Y(t)=1$ (where t=b).

Does the solution look right? I worked out the discrete random variable and the continuous random variable parts in ii with my fellow, but I now again got lost in this part... I don't see why if x is a discrete random variable $1-P(X<\frac{t-b}{a} )=1-P(X\leq \frac{t-b}{a}-1)$ but if x is the continuous random variable it is just $1-P(X<\frac{t-b}{a} )$. Would any one explain a little maybe?

• For $a\lt 0$ you should work with limits to get a uniform-looking answer. After all, not all random variables are discrete or continuous. Anyway, the answer for discrete is wrong. You assumed that discrete means integer valued. It does not necessarily mean that. – André Nicolas Jan 31 '16 at 8:05

In the case of $a=0$ then $F_Y(t) = \begin{cases} 0 &: t<b\\1 & :t\geq b\end{cases}$ because, as you reasoned, $Y$ would be a deterministic random variable (a single massive point at $b$).
So the probability of $Y$ being at most $t$ is zero if $t<b$ and one if $t\ge b$.
I don't see why if $X$ is a discrete random variable $1−P(X<\frac{t−b}a)=1−P(X≤\frac{t−b}a−1)$ but if $X$ is the continuous random variable it is just $1−P(X<\tfrac{t−b}a)$. Would any one explain a little maybe?
More correctly, if $X$ is a discrete integer random variable, $\mathsf P(X<\tfrac{t-b}{a})=\mathsf P(X\leq \lceil \tfrac{t-b}{a}\rceil-1)$
However, you should also consider the possibility that $X$ is discrete but not integer valued.