Probability Distributions
Learn how to describe different types of random events.
StartKey Concepts
Review core concepts you need to learn to master this subject
Random Variables
Discrete and Continuous Random Variables
Probability Mass Functions
Probability Mass Functions in Python
Cumulative Distribution Function
Calculating Probability Using the CDF
Probability Density Functions
Probability Density Function at a Single Point
Random Variables
Random Variables
Random variables are functions with numerical outcomes that occur with some level of uncertainty. For example, rolling a 6-sided die could be considered a random variable with possible outcomes {1,2,3,4,5,6}.
- 1A random variable is, in its simplest form, a function. In probability, we often use random variables to represent random events. For example, we could use a random variable to represent the outc…
- 2##### Discrete Random Variables Random variables with a countable number of possible values are called discrete random variables. For example, rolling a regular 6-sided die would be considered a…
- 3A probability mass function (PMF) is a type of probability distribution that defines the probability of observing a particular value of a discrete random variable. For example, a PMF can be use…
- 4The binom.pmf() method from the scipy.stats library can be used to calculate the PMF of the binomial distribution at any value. This method takes 3 values: - x: the value of interest - n: the numb…
- 5We have seen that we can calculate the probability of observing a specific value using a probability mass function. What if we want to find the probability of observing a range of values for a disc…
- 6We can use the same binom.pmf() method from the scipy.stats library to calculate the probability of observing a range of values. As mentioned in a previous exercise, the binom.pmf method takes 3 va…
- 7The cumulative distribution function for a discrete random variable can be derived from the probability mass function. However, instead of the probability of observing a specific value, the cumul…
- 8We can use a cumulative distribution function to calculate the probability of a specific range by taking the difference between two values from the cumulative distribution function. For example, to…
- 9We can use the binom.cdf() method from the scipy.stats library to calculate the cumulative distribution function. This method takes 3 values: - x: the value of interest, looking for the probability…
- 10Similar to how discrete random variables relate to probability mass functions, continuous random variables relate to probability density functions. They define the probability distributions of cont…
- 11We can take the difference between two overlapping ranges to calculate the probability that a random selection will be within a range of values for continuous distributions. This is essentially the…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory