How to combine two integrals containing the PDFs of a variable and its linear transform? Original Post:
Suppose we have two random variables $X$ and $Y$ with cumulative distribution functions $F(x)$ and $G(y)$. We know that $Y = aX + b$.
I want to compute $Z(x) = F(x) - G(y)$.
What I have so far is the following:
$$F(x) = \int_{-\infty}^{x}f(x)dx
$$
$$G(y) = \int_{-\infty}^{y}g(y)dy = \int_{-\infty}^{y}\frac{1}{|a|}f\left(\frac{y-b}{a}\right)dy
$$
$$Z(x) = \int_{-\infty}^{x}f(x)dx - \int_{-\infty}^{y}\frac{1}{|a|}f(x)dy
$$
How should I go on doing the subtraction of the integrals? Is this even possible as the integrales belong to different variables (dx and dy)?
Solution thanks to jbowman:
Suppose $a>0$ and $y=ax+b$
$$G(y) = P(aX+b <= y)$$
$$G(y) = P(aX+b<=ax+b) = P(X<=x) = F(x)$$
And thus:
$$Z(x,y) = F(x) - G(y) = 0$$
Corrected Post
Suppose we have two random variables $X$ and $Y$ with cumulative distribution functions $F(k)$ and $G(k)$. We know that $Y = aX + b$.
I want to compute $Z(k) = F(k) - G(k)$.
Proposed solution
Assuming $a>0$:
$$F(k) = \int_{-\infty}^{k}f(x)dx
$$
$$G(k) = \int_{-\infty}^{k}g(y)dy = \int_{-\infty}^{\frac{k-b}{a}}f(x)dx
$$
$$Z(k) = \int_{-\infty}^{k}f(x)dx - \int_{-\infty}^{\frac{k-b}{a}}f(x)dx
$$
And thus
$$Z(k) = \int_{\frac{k-b}{a}}^{k}f(x)dx
$$

Let's consider the case $a > 0$.  In this case, $Z(x) = 0$ for all $x$ as $y$ is a deterministic monotonically increasing function of $x$.  The probability that $y \leq 1$, for example, is equal to the probability that $x \leq (1-b)/a$, i.e., $G(1) = F((1-b)/a)$, and when $y = 1$, $x$ does $ = (1-b)/a$, so the two cumulative probabilities are equal.
If this isn't clear, consider the case $a = 1, b = 0$.
You should be able to work out the case $a < 0$ from here!
Addition to take into account @yahiro's comment:  If $a = 0$, then things work differently, as $g$ is a point mass at $b$, so $G = 0$ to the left of $b$ and $1$ at $b$ and above.  This affects $Z(x)$ in an obvious way.
