Posts

Showing posts from July, 2020

Essential Maths for ML – Part 3

In my last blog [ Essential Maths for ML - Part 2 ]  we have discussed about addition rule, multiplication rule of probability and conditional probability  .  In this blog, we will discuss the Bayes Theorem which plays an important role in most of the machine learning algorithms. So let’s consider A1, A2, A3, and A4 be the mutually exclusive and exhaustive event of a random experiment. Let B be the common event i.e. the event B is made-up of 4- mutually exclusive and exhaustive events.   P(B) = P(A1 ⋂ B) + P(A2⋂B) + P(A3⋂B) + P(A4⋂B) P(B) = Σ P(Ai ⋂ B)…………(1) We already know from the concept of the conditional probability that P(A1⋂ B) = P(B) * P(A1/B) P(A1/B) = P(A1⋂ B) / P(B)………(2) Replacing the value of P(B) from the eq2 we can say that P(A1/B) = P(A1 ⋂ B) / Σ P(Ai ⋂ B) P(A1/B) = P(A1) * P(B/A1) / Σ P(Ai ⋂ B) So the Bayes Theorem states that if A1, A2, A3……….An, are n mutually exclusive and exhaustive events with prior probabilities P(A...

Essential Maths for ML – Part 2

In my last blog [ Essential Maths for ML - Part 1 ] we have discussed about various type of events. In this blog let's discuss other important concepts related to probability. 1. Rules of probability a. Addition Rule: If A and B are any two events that are not mutually exclusive events, then the probability of occurrence of either A or B is given by P(A U B) = P(A) + P(B) - P(A  ∩ B) If A and B are any two events that are mutually exclusive events, then the probability of occurrence of either A or B is given by  P(A U B) = P(A) + P(B) b. Multiplication Rule: If A and B are two independent events then probability of occurrence of A and B is given by P(A ∩B) = P(A) * P(B) Conditional Probability Conditional probability of occurrence of event A given that event B has already occurred is denoted by P(A/B) where A and B are dependent events. Now probability of occurrence of event A and event B is given by P(A ∩B) = P(B) * P(A/B) so  P(A/B) = P(A ∩B) / P(B) Let's also unde...