Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
What if we want to see the probability of two events happening at the same time, such as weather = snowing and day of week = 2? You can probably figure out how to calculate this; you count the number of examples where both of these events are true and divide it by the total number of events. Let’s calculate this simple example: There’s one data point where weather = snowing and day of week = 2, so the probability would be 1/7. Now this is usually written with a comma separating the variables: P(weather = snowing, day_of_week = 2) or P(X,Y) for some events X and Y.
Often you’ll see some symbol like P(X,Y|Z). The vertical bar is used to represent conditional probability, so this statement is asking for the probability of X AND Y conditioned on the event Z. A quick refresher on conditional probability is given in chapter 4 if you want to review it.