calc the probabilities on the R side instead of on the ruby side