# Max and sum of random variables

I have a set of independent random variables $\{A_1, A_2, B_1, B_2\}$. All of them have the same distribution function $F(x)$. I want to find distribution function of a variable $C$, where $C=max(A_1 + B_1, max(A_1, A_2) + B_2)$.

To find CDF of $max(A_1, A_2)$ I can multiply CDF's of $A_1$ and $A_2$.

To find $max(A_1, A_2) + B_2$ I can find convolution of CDF's of both terms.

But now I'm struggling to find a CDF of the terms of the outer max, because the terms of the outer max are not independent.

Could you help me, please, solving this problem? Or give a good reference for that?

If it is required, we can make an assumption of a particular distribution function for the variables $A_1, A_2, B_1, B_2$.

## UPDATE

Consider all possible outcomes:

$$C=\begin{cases} A_1 + B_1, &\text{if } &A_1+B_1>A_1+B_2 \wedge A_1+B_1>A_2 + B_2 & (1)\\ A_1 + B_2, &\text{if } &A_1+B_2>A_1+B_1 \wedge A_1+B_2>A_2 + B_2 & (2)\\ A_2 + B_2, &\text{if } &A_2+B_2>A_1+B_1 \wedge A_2+B_2>A_1 + B_2 & (3) \end{cases}$$

Now the expected value of C is

\begin{align} E[C] = &P(A_1 + B_1 = max)\cdot E[A_1 + B_1 \mid A_1 + B_1 = max] + \\ &P(A_1 + B_2 = max)\cdot E[A_1 + B_2 \mid A_1 + B_2 = max] + \\ &P(A_2 + B_2 = max)\cdot E[A_2 + B_2 \mid A_2 + B_2 = max] \end{align}

Now consider probabilities for each term $(1)$, $(2)$, and $(3)$ separately.

\require{cancel} \begin{align} P(A_1 + B_2 = max) &= P(\cancel{A_1}+B_2>\cancel{A_1}+B_1 \wedge A_1 + \cancel{B_2} > A_2 + \cancel{B_2}) \\ &= P(B_2 > B_1)\cdot P(A_1 > A_2) \\ &= 0.5 \cdot 0.5 = 0.25 \end{align}

$P(B_2>B_1) = 0.5$, because $B_2$ and $B_1$ have the same distribution.

\begin{align} P(A_1 + B_1 = max) &= P(\cancel{A_1}+B_1>\cancel{A_1}+B_2\wedge A_1+B_1>A_2+B_2) \\ &= P(B_1 > B_2)\cdot P(A_1 + B_1>A_2+B_2) \\ &= P(A_1+B_1>A_2+B_2\mid B_1>B_2\wedge A_1>A_2)P(A_1>A_2)P(B_1>B_2) + \\ &\phantom{=} + P(A_1+B_1>A_2+B_2\mid B_1>B_2\wedge A_1<A_2)P(A_1<A_2)P(B_1>B_2) \\ &= 1\cdot 0.5 \cdot 0.5 + P((B_1-B_2)>(A_1-A_2))\cdot 0.25 \\ &= 0.25 + 0.5*0.25 = 0.375 \end{align}

$P((B_1-B_2)>(A_1-A_2)) = 0.5$, because convolution of the same distributions leads to the same convoluted distribution function.

Putting everything in $E[C]$:

\begin{align} E[C] = 0.375\cdot &E[A_1 + B_1 \mid A_1 + B_1 = max] + \\ 0.25\cdot &E[A_1 + B_2 \mid A_1 + B_2 = max] + \\ 0.375\cdot &E[A_2 + B_2 \mid A_2 + B_2 = max] \end{align}

But at the moment I don't know how to find expected values of the terms comprising $E[C]$, and I don't know if this is helpful at all.

• Just as a matter of notation, it is common convention to use CAPITALS for random variables, so $C$ not $c$. I would also ponder as to why you are using $a_1$, $a_2$, $b_1$ etc, if they all have the same distribution function and are independent. Why the subscripts? What are you trying to convey by this notation? Why not simply ${X_1, X_2, X_3, X_4}$, or ${X,Y,Z,W}$ for the 4 variables? – wolfies Sep 2 '15 at 8:09
• Thanks for pointing to capitals. The reason why I distinguish a's and b's is mostly because in the terms of the outer max a's are on the left and b's are on the right. And this problem is a simplification of a bigger problem, which I'm trying to solve. There can be more A's, more B's, and more cascades (C's D's and so on). – mcsim Sep 2 '15 at 8:12
• Nice question. A more symmetrical formulation is $P(C<x)=P(A+B<x,A+A'<x,A'+B'<x)$ hence $P(C<x)=E(F(x-A)F(x-A')\mathbf 1_{A+A'<x})$... which does not help much, I am afraid. – Did Sep 2 '15 at 9:07
• @Did What $\mathbf{1}_{A+A'}$ notation means? – mcsim Sep 3 '15 at 8:12
• Nothing, but $\mathbf 1_{A+A'<x}=1$ if $A+A'<x$ and $\mathbf 1_{A+A'<x}=0$ otherwise. – Did Sep 3 '15 at 8:15

If required, we can make an assumption of a particular distribution function for the variables

This tricky question has not attracted any answers. I don't know if you have tried using a computer algebra system to assist, but doing so can be helpful to find closed-form solutions, at least for simpler cases. To illustrate ...

The standard Uniform case: Solution

If the parent iid random variables are standard Uniform(0,1), then the joint pdf of $(A_1, A_2, B_1, B_2)$, say $f(a_1, a_2, b_1, b_2)$, is:

Define:

Then the cdf of $CC$, namely $P(CC<c)$, is:

All done.

Here is a plot of the corresponding pdf:

$$pdf(c) = \begin{cases}\frac{5 c^3}{6} & 0<c\leq 1 \\ \frac{1}{6} (c-2) ((c-16) c+10) & 1<c<2 \end{cases}$$

The above should also provide a framework to check your own workings.

Notes

1. The Prob function used above is from the mathStatica package for Mathematica. As disclosure, I should add that I am one of the authors.

2. Checked using Monte Carlo methods.