Calculating probability with given data