If I wanted to create a survey that displays the gender of your future babies with counting the ratio of having a male to female is 1.05 to 1. Assuming that each couple will get one baby only. How can I do that in php?
rand (0,1);
will generate a random number (either 1 or 0). which can represent the gender. But, how can the ratio be applied as a probability in getting that number?
I know the ratio is very close, and maybe applying the ratio to my function will not effect the outcome at all. but I am doing this to educate myself so, give me an example of how this can be done.