Hi guys. So I have a simple probability question that involves a little pseudo-code. Just need some advice, not answers so I am not posting my whole question from my homework, just the part that is giving me confusion.
You have a procedure that returns either 0 or 1. It returns 0 with some probability p and returns 1 with probability 1 - p, where 0 < p < 1. You do not know what p is.
What does it mean when it says it returns 0 with some probability p, and 1 with probability 1-p?
Since p is between 0 and 1, say p is for example, .75. Then when I run that subroutine, does it return 0 or 1? 1-0.75 is 0.25, but what, does it round down?