Bapat–Beg theorem
In probability theory, the Bapat–Beg theorem gives the joint probability distribution of order statistics of independent but not necessarily identically distributed random variables in terms of the cumulative distribution functions of the random variables. Ravindra Bapat and Beg published the theorem in 1989, though they did not offer a proof. A simple proof was offered by Hande in 1994. Often, all elements of the sample are obtained from the same population and thus have the same probability distribution. The Bapat–Beg theorem describes the order statistics when each element of the sample is obtained from a  different statistical population and therefore has its own probability distribution. Statement. Let formula_1 be independent real valued random variables with cumulative distribution functions respectively formula_2. Write formula_3 for the order statistics. Then the joint probability distribution of the formula_4 order statistics (with formula_5 and formula_6) is where is the permanent of the given block matrix. (The figures under the braces show the number of columns.) Independent identically distributed case. In the case when the variables formula_1 are independent and identically distributed with cumulative probability distribution function formula_10 for all "i" the theorem reduces to Complexity. Glueck et al. note that  the Bapat‒Beg formula is computationally intractable, because it involves an exponential number of permanents of the size of the number of random variables. However, when the random variables have only two possible distributions, the complexity can be reduced to formula_12. Thus, in the case of two populations, the complexity is polynomial in formula_13 for any fixed number of statistics formula_14.