Ayo-Philip Profile picture
Jul 13, 2018 14 tweets 9 min read Read on X
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
 

Keep Current with Ayo-Philip

Ayo-Philip Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Frawzey

Sep 25, 2018
Day 12: #100DaysofCode
Built a handwritten digit recognition algorithm using neural networks. Trained it. Tested it. Understanding the concepts - a thread.
colab.research.google.com/drive/1-neDSoL…
#100DaysOfMLCode @myorwah @esemejeomole
A neural network consists of a input layer, hidden layer (middle layer) and the output layer. The input layer takes in the input (images, files, audio, video etc), passes it to the hidden layer where come processing/learning is done and passed to the output layer for results.
Take a moment to think about this: let's assume you are in a group of 3 friends and you want to tell your 3rd friend you love her. You are the first friend, your second friend, Jay is the middleman or the channel of communication between you and your 3rd friend, Lola.
Read 20 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


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

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(