Calculating probability with a table