Solution for Probability and Statistics Task