From the course: Machine Learning Foundations: Probability

Probability of an event

- [Instructor] Now that we understand what probability and sample space are, we can take a look at different probability rules. What is easy to grasp is the fact that the sum of all probabilities for a sample space is one. What it means in theory, in practice is that the probability of every event from the sample space is always less or equal to one. This means that for any event, we have P of A is greater or equal to zero and is less or equal to one. And for all the events Ai in the sample space, sum of P of AI equals one. This sign in the formula is a capital Greek letter called sigma and it represents sum, and in this case, means the sum of all the probabilities Ai. In our famous example of rolling a die, the probability of getting any number on the die is the same P of A equals one divided by six. So if we apply the above formula, we get P of A1 plus P of A2, all the way down plus P of A6 equals six multiplied by one divided by six. That is equal to one. The second basis formula that falls logically from the previous formula is the probability for the complement of A, meaning probability that the event A does not happen. It can be calculated using simple formula P of A slash equals one minus P of A. For example, the probability of not getting a five can be calculated as P of B equals one minus 1/6 equals five divided by six. That is equal to 0.83 as it is equal to one minus the probability of getting five, which is 1/6. Let's see one more example. A probability student makes random guesses for the three true-false questions on an online assessment. Find the probability that there is at least one correct answer. Let's say that the A is the event of having at least one correct answer, then the probability is P of A and A complement is the event of having no correct answers on the assessment, meaning all three questions are answered incorrectly. The probability of one question being answered correctly is 50% or 0.5, and the same is true for the probability of one question being answered incorrectly. It is also 50% or 0.5. How are we going to do that? If we want to calculate the probability of at least one correct answer, then we have to subtract the probability of all three answers being incorrect. Go ahead and try to calculate it. As the probability for all three events is 1/2, we have to multiply all three probabilities so we have probability P of at least one correct equals one minus 1/2 multiplied by 1/2, multiplied by 1/2. That is equal to one minus one divided by eight. That is equal to seven divided by eight. And finally, we get 0.875. Now we can continue our journey by learning more probability rules.

Contents