Jane Street interview question

Combinatorics, expected values and probability