Here is the solution to the MAX problem I wrote about last week.

Question:

Let A={a_{1}, a_{2}, ..., a_{n}}, a set of discrete, finite random variables that are mutually independent.

What is the distribution of max(A)? In other words, for some v, what is Pr(max(A)=v), for all possible values of v? Calculate the entire distribution efficiently.

Answer:

Pr(max(A)=v) = Pr(all a_{i}≤ v) - Pr(all a_{i}< v)

v ∈ {all vals of a_{i}between greatest min and greatest max}

This seems super-simple when you write it like this, but it took me a long, long, long time to get there. I worked at this for 16 hours last week, in addition to probably 30 hours prior to that. I tried several other perfectly reasonable approaches that didn't work. When it finally reduced to this clean, compact expression, I was astonished... astonished and then furious with myself for not seeing it sooner. I have since calculated results by hand, in Excel, and in Python code. The answers all match.