# Max of conditional Negative Binomial

Suppose $$X|K = w$$ is a Negative Binomial with parameters $$r$$ and $$q$$. K follows a Binomial Distribution with parameters $$m$$ and $$p$$.

I want to calculate the expected value of $$Z = max(X_1, X_2,...,X_n)$$.

I know the conventional way of solving such a problem using CDF of X. However, due to this rare condition, the CDF of X comes out to be very complex. I tried using the PGF of X too, but that also doesn't have a decent expression. Is there any simple algebra trick that could help me in solving such expression?

• Perhaps you could use the law of total expectation: $E(Z)=E(E[Z|K])$ – gd1035 Dec 5 '18 at 19:47