# Distribution of maximum unique number of several random numbers

Suppose discrete random variables $\{X_1, X_2, ..., X_n\}$ are i.i.d. described by the probability function:

$f(x) \equiv \text{Pr}(X_i = x)$,

and $X_i \in \{1,2,3, ..., m\}$.

Let $Y$ be the maximum unique number in $\{X_1, X_2, ..., X_n\}$, i.e., the maximum of the numbers that occur only once in $\{X_1, X_2, ..., X_n\}$. If there is no unique number in $\{X_1, X_2, ..., X_n\}$, then we define $Y = 0$.

Is there any elegant way to obtain the distribution of $Y$?

• What do you mean by elegant? – Douglas Zare Jan 18 '16 at 21:19

For $k > 0$, $P(Y=k)$ is the sum of coefficients of terms in the expansion of $(1 + f(k) (x_k-1) + \ldots + f(m) (x_m - 1))^n$ in which $x_k$ has degree $1$ and all $x_j$ for $j > k$ have degree $\ne 1$. I don't know if you'd call that elegant.