# Average of two random variables - CDF comparison

Given are two independent random variables $X$ and $Y$ with different probability density functions $f_X(t)$ and $f_Y(t)$. It is furthermore given that the cumulative distribution function $F_X(x) = \int_{-\infty}^x f_X(t)\,dt$ of $X$ is always larger than or equal to $F_Y(x)=\int_{-\infty}^x f_Y(t)\,dt$ of $Y$. That is $\forall x \in \mathbb{R}: F_X(x) \geq F_Y(x).$

A third random variable $Z$ with $f_Z(t)$ is defined as $Z = \frac{X+Y}{2}$. My assumption is that $F_X(x)$ is always larger than or equal to $F_Z(x) = \int_{-\infty}^x f_Z(t)\,dt$, too. That is $\forall x \in \mathbb{R}: F_X(x) \geq F_Z(x).$

Is this a valid assumption and if yes, how to prove it? Under which conditions does it hold if it is not a universally valid assumption? The plots below depict the cumulative distribution functions as well as the probability density functions of exemplary X,Y and Z.

Edit: I was able to show it for two given uniform distributions as follows. However, I assume it should also be possible to prove it for two arbitrary distributions.

PDFs:

$f_X(t) = \begin{cases} \frac{1}{2} & \text{for } 0 \leq t \leq 2,\\ 0 & \text{otherwise} \end{cases}$, $f_Y(t) = \begin{cases} \frac{1}{2} & \text{for } 4 \leq t \leq 6,\\ 0 & \text{otherwise} \end{cases}$

CDFs:

$F_X(x) = \begin{cases} 0 & \text{for } x < 0,\\ \frac{x}{2} & \text{for } 0 \leq x \leq 2,\\ 1 & \text{for } x > 2 \end{cases}$, $F_Y(x) = \begin{cases} 0 & \text{for } x < 4,\\ \frac{x-4}{2} & \text{for } 4 \leq x \leq 6,\\ 1 & \text{for } x > 6 \end{cases}$,

$\forall x \in \mathbb{R}: F_X(x) \geq F_Y(x)$ obviously holds, because $F_X(x) = 1$ for all $x$ where $F_Y(x) > 0$.

The addition of X and Y is described by the convolution of $f_X(t)$ and $f_Y(t)$ as

$f_{X+Y}(t) = (f_X * f_Y)(t) = \int_{-\infty}^\infty f_X(\tau)\cdot f_Y(t-\tau)\,d\tau = \begin{cases} -1+\frac{t}{4} & \text{for } 4 \leq t \leq 6\\ 2 - \frac{t}{4} & \text{for } 6 < t \leq 8\\ 0 & \text{otherwise} \end{cases}$

and (as far as I know) dividing by 2 corresponds to scaling on both axes, so

$f_Z(t) = 2\cdot f_{X+Y}(2t) = \begin{cases} -2+t & \text{for } 2 \leq t \leq 3\\ 4 - t & \text{for } 3 < t \leq 4\\ 0 & \text{otherwise.} \end{cases}$

From this we get the CDF of Z:

$F_Z(x) = \int_{-\infty}^x f_Z(t)\,dt = \begin{cases} 0 & \text{for } x < 2,\\ \frac{1}{2} x^2 -2x+2 & \text{for } 2 \leq x \leq 3,\\ -\frac{1}{2} x^2 + 4x -7& \text{for } 3 < x \leq 4,\\ 1 & \text{for } x > 4 \end{cases}$

$\forall x \in \mathbb{R}: F_X(x) \geq F_Z(x)$ holds, too, because $F_X(x) = 1$ for all $x$ where $F_Z(x) > 0$.

• I think given the uniform distribution result you should be able to use the probability integral transformation to connect to general continuous distributions.
– Ian
Oct 27, 2017 at 15:40
• @Ian Currently I have no proof for two generic uniform distributions, but I will work on it as a next step and then your suggestion might work, thanks a lot! Oct 27, 2017 at 15:53

You assumption is FALSE and I proove mine using 2 simple cumulative distribution functions based on normal distribution.

If function X

$$f_X(x) = \int_{y=\infty}^{x} N(y\mid10.0,0.4) \, dy$$

and function Y is

$$f_Y(x) = \int_{y=\infty}^{x} N(y\mid10.2,0.4) \, dy$$

where

$$N(x\mid\mu,\sigma) = \frac{e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}}{\sigma \sqrt{2\pi}}$$ is the density function of a normal distribution.

then the mean of these 2 functions named function Z is following

$$f_Z(x) = \int_{y=\infty}^{x} N(y\mid10.1,\frac{0.4}{\sqrt{2}}) \, dy$$

X in Red is always lower than Y in Orange.

But Z in Blue (for x > 10.35) is greater (or larger) than X in Red in following graph representing X, Y et Z.

So there exist a X et Y function for which Z = X+Y/2 is not always lower than X ! 