Profile picture
Ayo Philip @Frawzey
, 14 tweets, 9 min read Read on Twitter
Bayes’ Theorem Definitions:
The vertical bar | stands for "given that".
P = Probability.
A & B are events.
P(A) & P(B) are the probabilities of events A and B. Each event is separate from the other.
P(A|B) is the probability of A being true given that event B is true.
#SoDS18 #ML
Example:
Say we have 2 coolers at an owambe: Cooler A is filled with 10packs of small chops only. Cooler B has 5packs of small chops and 5packs of Asun. You are then asked to close your eyes and pick a pack out of one cooler, which pack would you pick? #MachineLearning #SoDS18
Because you know that we have more of small chops in both coolers, your brain is most likely going to tell you have picked a pack of small chops - even when your eyes are closed. This is not wrong.
#MachineLearning #SoDS18
Lets say you really chose a pack of small chops. Now, if you had to guess what cooler the small chops came from, which would you select? Many would select Cooler A. Why? Your brain concluded that Cooler A has a higher probability of being selected than B.
#MachineLearning #SoDS18
This is a very basic use of Bayes’ Theorem. Given the data, (the amount and type of pack in each cooler), you were able to quickly come to the conclusion that cooler A has a greater probability of being selected than B.
#MachineLearning #SoDS18
Now using Bayes Formula, we'd calculate the probability of picking small chops from cooler A. To confirm the % of correctness of your brain in the selection process. How much we can rely on it to give us the right results if presented with this scenario again.
#MachineLearning
Step 1: Define your problem.
To start, we always need to determine what we want to find.
We want to know the probability of Cooler A given that we selected a pack of small chops from coolers A & B.
#MachineLearning #SoDS18
Step 2: Write what you want to find as a formula.
Our formula aims seeks:
P(Cooler A | Small Chops) = Probability of choosing cooler A given that we chose small chops - as shown in the image.
The vertical bar | stands for "given that".
P = Probability.
#MachineLearning #SoDS18
Step 3: Find each input in the formula
a) First lets find P(Cooler A). We calculate the probability of choosing from cooler A. Since there are only two coolers A & B, then the probability of selecting from either is 1/2 or 0.5.
Therefore, P(Cooler A)=0.5
#MachineLearning #SoDS18
b) P(Small Chops). This finds the probability that we will select small chops. Remember, we have 10 packs of small chops in cooler A & 5 packs in cooler B. 15 of them are small chops out of the 20 packs in total.
So, P(Small Chops) = 15/20 or 0.75
#MachineLearning #SoDS18
c) P(Small Chops | Cooler A). This finds the probability of selecting a pack of small chops given that we have selected from Cooler A. Since there are only small chops in Cooler A, the probability is 1 or 10/10.
Therefore, P(Small Chops | Cooler A) = 1
#MachineLearning #SoDS18
Step 4: We plug each input values into Bayes formula.
P(Cooler A)=0.5
P(Small Chops | Cooler A) = 1
P(Small Chops) = 0.75
#MachineLearning #SoDS18
Our result, P(Cooler A | Small Chops) = 66% or 0.66
We now know that there is a 66% probability that we selected from Cooler A given that we have a pack of small chops. END.
#MachineLearning #SoDS18 #DataScience #Statistics
@threadreaderapp unroll this thread. Thanks.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Ayo Philip
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($3.00/month or $30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!