Probability in minecraft/java

Hey there, Im trying to create some sort of probability event like they used for the phantom spawning. After the third night the chance is 1/4, after that 2/5 and than 3/6, etc. How would I create something similar to this?