The probability and statistics cookbook