approx_rank_expected function

Approximation of expected ranks