What's a random variable? Does it have anything to do with gambling? What's the difference between a continuous and a discrete variable? This lesson explains the difference and how to graph each one.
Have you ever played the lottery or tried your luck at the casino? If you're not old enough, then maybe you know of someone who has. A lot of events and processes in the world, including the ones you might find at a casino, have a random nature to them.
Some examples of random processes include drawing lottery numbers, playing the roulette wheel, and even measuring the yearly rainfall. All of these can be quantified with random variables and something called the probability distribution function. In this lesson, you will learn how to graph probability distributions that result from random processes.
Why don't we start by defining terms like random variable and probability distribution function before taking a look at some examples related to these concepts?
Random Variables and Probability Distribution
A random variable is a quantity that designates the possible outcomes of a random process. It's used to map the potential outcomes of a random process to numeric values. Random variables can be associated with both discrete and continuous processes. Processes that can be described by a discrete random variable include flipping a coin, picking a number at random, and rolling a die.
Conversely, examples of events associated with a continuous random variable include the height and weight distribution of people within a population. A good way to determine if the random variable is discrete or continuous is as follows: if there is a countable number of values that the random variable can take on, then it is discrete; otherwise, it is continuous.
In the intro, I also mentioned something called the probability distribution function. The probability distribution function is a function that describes the likelihood of all the possible values that the random variable can take on.
If the random variable is discrete, then the corresponding probability distribution function will also be discrete. Alternatively, if the random variable is continuous, then the associated probability distribution function will also be continuous. Easy, right?
One thing, though. It's important to note that in the case of continuous random variables, the probability distribution function is also called the probability density function. Let's take a look at how to graph these probability distributions.
Graphing a Discrete Probability Distribution
Let's first turn our attention to graphing a discrete probability distribution. When rolling a six-sided die, the random variable can have the values 1 through 6, as shown on the screen:
If the die is fair, meaning that there is no preference for any particular outcome, then the probability of rolling any number (say, a 5) is the same as the probability of rolling any other number (say, a 3).
Since there are only six possible values the random variable can take on, it is discrete. The probability distribution function, also being discrete, would show the probability of rolling any integer number between 1 and 6, inclusive. Mathematically, this function can be written as follows:
Graphically, the probability distribution function is represented by a bar graph, with the x-axis denoting the values that the random variable can take on and the y-axis denoting the probability of each outcome. The probability distribution graph is shown for you on-screen for our example.
Okay, let's take a look at another example. We can define a random variable, x, associated with rolling two six-sided dice, as follows:
The random variable can take on the shown values because the lowest possible outcome is rolling a 1 on both dice, while the highest possible outcome is rolling a 6 on both dice, hence the 12. The probability distribution function, then, would be shown as follows:
A bar graph can be used to represent this probability distribution function, with the x-axis designating the values that the random variable can have and the y-axis designating the probability of each of these values. Again, the graph you see represents this specific example:
Graphing a Continuous Probability Distribution
Now, a continuous probability distribution function can be graphed in a similar manner to a discrete one. The x-axis denotes the possible values that the random variable can have, while the y-axis denotes the corresponding probability for each value. The only big difference is that the graph would appear as a continuous curve. Here's just one example:
This function is graphed by plotting all of the closely-spaced data points on a scatter plot. As an example, the following graph shows a small subset of the data points in red.
If we were to plot all of the data points in a similar manner, the curve would appear to be continuous.
To recap, in this lesson, we talked about discrete and continuous random variables and their corresponding probability distribution functions.
A random variable is a variable that designates the possible outcomes of a random process. Random variables can be either discrete or continuous. A discrete random variable describes processes with a countable number of outcomes, while a continuous random variable describes processes with an uncountable number of outcomes.
Examples of processes associated with a discrete random variable include flipping a coin and rolling dice. On the other hand, examples of processes associated with a continuous random variable include height and weight measurements of a group of people.
We also went over how to graph discrete and continuous probability distributions, which represent the probabilities of the values that the corresponding random variables can have. That is, the probability distribution function, plotted on the y-axis, is a function that describes the likelihood of all the possible values that the random variable can take on, with the random variable being plotted on the x-axis. Note that the probability density function is another name for a continuous probability distribution function. You should now be able to do similar problems on your own.
- random variable: a quantity that designates the possible outcomes of a random process
- probability distribution function: a function that describes the likelihood of all the possible values that the random variable can take on
- probability density function: also known as the probability distribution function in the case of continuous random variables
Rolling a fair die is considered a discrete probability distribution since there are only six possible values.
Pursue these goals as you work through the lesson:
- Distinguish between a discrete random variable and a continuous random variable
- Discuss and graph for probability distribution