Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Probability is a way of measuring how likely something is to occur. It is usually written as Pr(A) = x, where A is an event. For example, we might say that there’s a 20 percent chance of rain today, which would be written as Pr(rain) = 0.2.
If we were to note that it’s already cloudy right now, then we might conclude there’s a higher chance of rain later today. This is called conditional probability, which is the chance of A given that we know B. This is written as Pr(A | B), so in this case, it’s Pr(rain | cloudy).
The formula for conditional probability is the probability of both events happening divided by the chance of the given condition, as shown in Figure B-5.