When an uncertain question has only two possible answers, a Bernoulli distribution represents your belief about which answer will occur. For example, whether it will rain today can be encoded as a binary random variable: 1 means rain and 0 means no rain. section 1.5
A Bernoulli distribution has one parameter, p, the probability of success. The probability of 1 is p, while the probability of 0 is 1 − p; together, these probabilities sum to 1. section 1.5
A 30% chance of rain
Represent a 30% chance of rain with p = 0.3. The corresponding probability of no rain is 1 − 0.3 = 0.7. A different weather belief simply uses a different value of p. section 1.5


