- Home
- Courses
- Data Science
- Data Science Essentials & Machine Learning
Curriculum
- 8 Sections
- 69 Lessons
- 4 Weeks
Expand all sectionsCollapse all sections
- Before You StartIntroduction4
- Module 1: Introduction to Data Science12
- 3.1Principles of Data Science – Data Analytic Thinking
- 3.2Principles of Data Science – The Data Science Process
- 3.3Further Reading
- 3.4Data Science Technologies – Introduction to Data Science Technologies
- 3.5Data Science Technologies – An Overview of Data Science Technologies
- 3.6Data Science Technologies – Azure Machine Learning Learning Studio
- 3.7Data Science Technologies – Using Code in Azure ML
- 3.8Data Science Technologies – Jupyter Notebooks
- 3.9Data Science Technologies – Creating a Machine Learning Model
- 3.10Data Science Technologies – Further Reading
- 3.11Lab Instructions
- 3.12Lab Verification
- Module 2: Probability & Statistics for Data Science21
- 4.1Probability and Random Variables – Overview of Probability and Random Variables
- 4.2Probability and Random Variables – Introduction to Probability
- 4.3Probability and Random Variables – Discrete Random Variables
- 4.4Probability and Random Variables – Discrete Probability Distributions
- 4.5Probability and Random Variables – Binomial Distribution Examples
- 4.6Probability and Random Variables – Poisson Distributions
- 4.7Probability and Random Variables – Continuous Probability Distributions
- 4.8Probability and Random Variables – Cumulative Distribution Functions
- 4.9Probability and Random Variables – Central Limit Theorem
- 4.10Probability & Random Variables – Further Reading
- 4.11Introduction to Statistics – Overview of Statistics
- 4.12Introduction to Statistics – Descriptive Statistics
- 4.13Introduction to Statistics – Summary Statistics
- 4.14Introduction to Statistics – Demo: Viewing Summary Statistics
- 4.15Introduction to Statistics – Z-Scores
- 4.16Introduction to Statistics – Correlation
- 4.17Introduction to Statistics – Demo: Viewing Correlation
- 4.18Introduction to Statistics – Simpson’s Paradox
- 4.19Introduction to Statistics – Further Reading
- 4.20Introduction to Statistics – Lab Instructions
- 4.21Introduction to Statistics – Lab Verification
- Module 3: Simulation & Hypothesis Testing16
- 5.1Simulation – Introduction to Simulation
- 5.2Simulation – Start
- 5.3Lab
- 5.4Simulation – Demo: Performing a Simulation
- 5.5Simulation – Further Reading
- 5.6Hypothesis Testing – Overview
- 5.7Hypothesis Testing – Introduction
- 5.8Hypothesis Testing – Z-Tests, T-Tests, and Other Tests
- 5.9Hypothesis Testing – Test Examples
- 5.10Hypothesis Testing – Type 1 and Type 2 Errors
- 5.11Hypothesis Testing – Confidence Intervals
- 5.12Hypothesis Testing – Demo with R & Python
- 5.13Hypothesis Testing – Misconceptions
- 5.14Hypothesis Testing – Further Reading
- 5.15Hypothesis Testing – Lab Instructions
- 5.16Hypothesis Testing – Lab Verification
- Module 4: Exploring & Visualizing Data4
- Module 5: Data Cleansing & Manipulation4
- Module 6: Introduction to Machine Learning4
- Final Exam & Survey4
Probability and Random Variables – Binomial Distribution Examples
Binomial Distribution Examples
Downloads and transcripts
Video Transcript
- Start of transcript. Skip to the end.
- So let’s do some examples of the binomial distribution.
- All right, so let’s say that we flip 20 coins at random and
- each coin has a probability .5 of landing heads.
- These are all fair coins and then a random variable is gonna
- be the number of them that land heads out of the 20.
- Now I wanna know what the probability
- is that ten of them land heads.
- And here’s the formula, but the formula for
- the binomial distribution.
- That is the key to answering this problem cuz all I have to
- do is plug in n, p, and x and then I’m all set.
- Okay, so what is x?
- It’s ten.
- What is n?
- That’s the number of per newly trials which is 20 cuz
- we’re flipping 20 coins and then p is the probability
- of success of each per newly trial and they’re all .5.
- If I plug all those numbers in, then I get 0.1762.
- And that’s happy.
- That’s the answer.
- Okay so now, the question then is, okay,
- I’m changing the question.
- Instead of what’s the probability that x equals ten,
- I’m going to ask you what the probability is that x is less
- than or equal to ten.
- Okay, so in order to get that, then x could be either zero,
- one, two, three, all the way up to ten.
- I add all those probabilities up and the answer is .5881.
- Do you believe this number?
- Well if you think about it, I’m asking you what
- the probability is that out of the 20 coins I flip,
- then less than or equal to 10 of them are heads.
- And you should think to yourself, yeah,
- that’s about half, that’s about half.
- So good, we’ve gotten .5881, so that looks good.
- A little bit more than half, okay.
- Now you know how to compute the answer to these kinds
- of problems and what I’d like to do then is plot these answers.
- But if I ask you what’s the probability that random variable
- x equals some outcome little x for any x between zero and 20,
- you could give me a whole table of numbers or you could give me
- a nice plot and this is what the plot looks like, okay?
- So zero to 20 and you can see that you’re more likely to get
- ten heads than to get zero heads and
- that makes sense because these coins are fair coins.
- Now this is a nice beautiful plot of the binomial probability
- mass function and you should remember it looks like a bump
- because you’ll need that information later.
- And what’s the mean, the mean, the middle value?
- It’s n times p.
- Whatever n is, the number of trials,
- p is the probability of success for each trial, that’s the mean.
- And the variance again is np times 1 minus p.
- And obviously,
- the standard deviation is the square root of the variance.
- So let’s do an example that uses Roulette.
- Roulette is one of the most popular casino games.
- It’s very, very glamorous.
- You got the spinning wheel,
- and it’s all based on the idea of independent, random trials
- because you assume that every time you spin that wheel,
- it’s totally separate from anything that happened before.
- Now the ball rolls around on the wheel, and
- it lands in one of the slots and
- it lands in either a green slot or a red slot or a black slot.
- And if you’re playing roulette,
- you can choose to either bet on a number or a colour.
- So let’s say here that we’re gonna bet on black,
- meaning that when we spin the wheel,
- the little ball lands in a black bin.
- Okay so actually believe it or
- not, gamblers use the expected value to tell them how
- well they’ll do over a series of fixed bets.
- So we’re gonna talk about betting on black, okay?
- So here’s the question.
- If I bet on black ten times, so I’m going to roll that wheel ten
- times and bet on black all ten times, what is the chance that
- I’m going to win at least four out of those ten times?
- So how do you calculate that?
- I’m not gonna tell you the answer, but
- I’ll tell you how to get it.
- I’m gonna use exactly the formula for
- the binomial distribution that we derived.
- Now the probability that x is at least four,
- okay, x again is the number of times we win.
- The probability it’s at least four.
- I have to sum up over winning four times, five times,
- six times, seven times, eight times, nine times, or ten times.
- The probability that I will get exactly that outcome,
- and then the probability to get the outcome is given by
- the formula for the binomial distribution.
- What is n?
- It’s the number of trials, which is ten.
- What is the probability of success?
- Well, there are 18 black slots and there are 38 total slots.
- So the probability of success is 18 out of 38.
- So, I chose not to give you the answer to that problem because
- I’m worried that there are some of you who actually like
- gambling and this is definitely going to ruin your fun.
- If you know a lot about probability,
- you’re probably not gonna want to gamble that often.
- End of transcript. Skip to the start.