Update calculate_probabilities.Rscript