Probability Algorithm