Probability theory | What is probability?

Contents

74661theory-of-probability_stats116-7736662

Introduction to the basics of probability theory

Find out the probability that you will get a black or red ball. Note that we will denote probability as P from now on. P (X) means the probability of an event X occurring.

P (Red ball) = P (bag A). P (Red ball | Bag A) + P (Bag B). P (Red ball | Bag B), this equation calculates the probability of the red ball. Here I have introduced the concept of the conditional probability (which finds the probability when we are given the condition). P (Bag A) = 1/2 Because we have 2 bags we have to select Bag A. P (Red ball | Bag A) must read like “probability of drawing a red ball dice bag A“Here” the word “chest” specifies the condition that is Bag A in this case, for what they are 10 red balls of 20 balls, namely, 10/20. So let's solve:

P (Red ball) = 1/2. 10/20 + 1/2. 10/20 = 1/2

Similarly, Can you try to find the probability of pulling a black ball? What's more, calculate the probability of removing two consecutive red balls from bag after transferring a black ball from bag A to bag B.

52188download201-7602226

Now, if you look at the picture above, you must be thinking what is it? I have not entered the “intersection” in set theory. I have already discussed the above concept, there is nothing new in the image given above. Here we are finding the probability that event A will occur given that event B has already occurred. The numerator on the right side of the equation is the probability of both events occurring, divided by the probability of an event B occurring. The numerator has an inverted symbol between A and B that we call “Intersection” in set theory.

Introduction to Bayes' theorem

Up to now, we just discussed the basics of probability theory. before continuing, let me discuss ‘Variable Random'Which is a variable whose possible values ​​are numerical results of a random phenomenon. In the above case, Bag is a random variable that can take possible values ​​such as Bag A and Bag B. Ball is also a random variable that can take red and black values.

Now imagine the above situation when I say find the probability that the ball will be taken out of a bag A given that the ball is red. Note that in this question we have already been given the color of the ball and we have to find the probability that the red ball will be taken out of bag A. However, in other questions we use to find the probability of removing a red ball from bag A. In the case that we have to find the probability of the event and the object is given, this type of probability is called posterior probability. In the case that we have to find the probability of a given object for that event, this type of probability is known as prior probability. Then, the answer to my question at the beginning of the paragraph is:

P (Bag A | Red ball) = [P(red ball | Bag A). P(Bag A) ] / [P(red ball | Bag A). P(Bag A) + P(red ball | Bag B). P(Bag B) ]

The above equation is what we call "Bayes Theorem", one of the most significant and important theorems given by Reverend Thomas Bayes.

Now, I want you to take a look at what we've studied so far about discrete events. In machine learning, we generally need 'continuous events’ instead of a discrete variable. What do we do now? Look at the picture below and try to understand between the two types of events I just talked about!!

38035screenshot20141-3637427

What is probability density?

As I told them, we were considering the probabilities of discrete events, but our requirement is for continuous events. To achieve this, I would like to introduce the concept of “probability density” here at this point. Let the probability of x with real value be within the interval (x, x + dx) given by the integral of p (x) .dx where dx–> 0, Then p (x) is the probability density over x. The probability of x lies in the interval [a,b] is given by the integral of a to b of p (x) .dx. This is shown in the image shown below.

81830untitled-4237189

If you look at the picture, I have also specified the two conditions that the probability density must satisfy.

Excellent! You learned something that is very difficult in a much easier way. It is not like this?

How does it relate to machine learning?

Then, we learned the basics of probability theory, but still, Are we confused about how we relate this to machine learning? It is not like this? We use probability when we have to make predictions. When we have the model in ML and the data, we can use it to make predictions based on the trained model. Consider a case where we have a data set for different temperatures in a region for different dates. Here we can make predictions about how many bottles of water should be stored in that region with the help of a model.

I have tried to cover as much as I can in this article, but there is much to learn in probability theory. It's just the basics. Up to now, we just discussed the definition of probability, the conditional probability, Bayes' theorem and probability density. Good luck!!

The media shown in this article is not the property of DataPeaker and is used at the author's discretion.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.

Datapeaker