Calculating probability of independent events