Understanding Random Variables & Their Distributions

What are Random Variables?

In probability and statistics, a random variable is essentially a variable whose value is a numerical outcome of a random phenomenon. Think of it as a way to map outcomes of a random process (like flipping a coin or measuring someone's height) to numbers.

These random variables can be broadly categorized into two main types based on the kind of values they can take:

  • Discrete Random Variables: These can only take on a finite number of distinct values or a countably infinite number of values (like 0, 1, 2, 3...). You can "count" the possible outcomes.
  • Continuous Random Variables: These can take on any value within a given range or interval (like height, weight, or time). There are infinitely many possible values between any two points.

Describing Probabilities: PMF & PDF

Once we have a random variable, we often want to describe the likelihood of its different possible outcomes. This is where probability distributions come in. For each type of random variable, there's a specific way to define its distribution:

  • For discrete random variables, we use a Probability Mass Function (PMF).
  • For continuous random variables, we use a Probability Density Function (PDF).

The upcoming question will delve into the key differences between these two important functions.

PMF vs. PDF - Key Differences

EASY

What are the main differences between a Probability Mass Function (PMF) and a Probability Density Function (PDF)? Provide examples of when you would use each.

Your Turn! Can you think of another real-world example for a PMF and a PDF that wasn't listed?

 

Nerchuko Academy · Free DS Interview Prep