Calculating probability with random selection.