calculate_expected_values function

Calculate expected values for goodness of fit test