课程: Machine Learning Foundations: Probability

Defining probability

- You're catching a bus to the nearest town over the weekend and you're wondering if you're late. Or your colleagues have just released the latest version of app in production and you're wondering how certain they are there are no critical bugs in production. Even in small everyday things, like taking a random sweet out of the bag of sweets, or considering a chance of rain, you're thinking about probability without even noticing. Probability is the chance of something happening. You can also think of it as how strongly we believe an event will happen. Many people think that probability and likelihood are one in the same, but when it comes to mathematics we use likelihood for measuring the frequency of events that have already occurred and probability for quantifying predictions of events yet to happen. So in ML, likelihood represents the data in the past and we use it to predict the probability. For example, we could use ML to predict apartment prices or bond values on the stock market, or the probability that a randomly selected person has an illness. A probability is expressed as a number between zero and one that measures how likely something will happen. When there is no chance that something will happen, we say that the probability equals zero. If we're absolutely certain that it'll happen, we say that the probability is equal to one. For example, we could say that there is 90% chance you will go for a walk with your dog in the evening. We'll call this probability P of the event X and write it down as P of X. Formally, we usually express probability as a decimal number, so for example, P of X equals 90% can also be written as P of x equals 0.9. We can calculate the probability of an event by counting all the occurrences of the event and dividing them by the total possible outcomes of the event. You could visualize it with the following informal formula. Probability equals occurrences divided by the sum of nonoccurrences and occurrences. The important thing to remember here is that the probability of all possible events sums to the probability value one. In our case, this means we can calculate the probability of an event not happening, meaning the probability of not going to walk your dog by subtracting the probability of the event from one P of non X equals one minus 0.9. That is equal to 0.1. This gives you a little insight into what probability is and how to calculate the probability of the event.

内容