Definition: In probability theory, the sample space of an experiment is the set of all possible outcomes of that experiment. Here, we will refer to the sameple space as , though you may also see it denoted as of (for universal set).
For example, if our experiment is flipping a coin once, our sample space is .
Definition: A random variable (RV), denoted X, is a function The range of this function is denoted .
Definition: X is a discrete random variable (DRV) if its range is countable.
Definition: Let X be a discrete random variable with . The function defined by is called the probability mass function (PMF) of X.
In general, the probability mass function will look like
Example 3.3 We toss a fair coin twice and let our random variable X be the number of heads. Find and the probability mass function of X.
Solution: First, we can form the sample space from all possible results of flipping a coin twice: Flipping a coin twice, we will either get 0 heads, 1 head, or 2 heads, making our range To find the probability mass function, we need to find the probability that each of these options will occur. All together, our probability mass function will be
Example 3.4: Now say we have an unfair coin for which , . We toss the coin repeatedly until we get our first heads. Let Y be the number of coin tosses. Find the PMF of Y.
Solution: Here, our range is all natural numbers. To find the distribution of Y, we need to find Given an arbitrary , we have This represents the probability that we get tails followed by 1 head, or .
So our probability mass function is
Properties of the Probability Mass Function:
(a)
(b)
(c)
Example 3.5 For the random variable Y from Example 3.4:
(a) Show that
(b) Letting , find
Solution:
(a)
(b)
Definition 3.2: Let X and Y be two random variables. We say that X and Y are independent if or, in general,
Example 3.6: Say we toss and coin twice and let X be the number of heads. Then, we toss the coin another two times and let Y be the number of heads from these two tosses. Find .
Solution: Since X and Y are the results of separate, independent coin tosses, we can say that the two random variables are independent. Hence:
Definition 3.3: Consider discrete random variables . We can say that these variables are independent if
Definition: A probability distribution is a function which gives the probabilities of which different possible outcomes of an experiment occur.
Certain probability distributions are significant enough that they are given specific names. One example is the well-known normal distribution. Some important probability distributions for discrete random variables are defined the following section.
Definition: A random variable X is said to be a Bernoulli random variable with parameter p, written as , if its probability mass function if given by
where .
Definition: The indicator random variable for some event is defined by
is an example of a random variable which has a Bernoulli distribution with parameter , so we can write
Suppose we have a coin where . We toss the coin until we get our first heads and define X as the number of coin tosses. This X is said to have a geometric distribution with parameter , , and .
Definition 3.5: A random variable X is said to be a geometric random variable with parameter , written as , if its probability mass function is given by
where .
Suppose we have a coin with . We toss the coin times and define X to be the total number of heads. X, in this case, is said to have a binomial distribution with parameters and .
Definition: A random variable X is said to be a Binomial Random Variable with parameters and , written if its probability mass function is given by
where and is the binomial coefficient .
Lemma 3.1: While the Bernoulli distribution models the probabilities for a single trial, the Binomial distribution considers any number of independent trials. Hence, we can think of the Binomial distribution above as the sum of Bernoulli random variables.
In other words, if are independent Bernoulli random variables, then the random variable X defined as has a Binomial distribution.
Example: Say we flip a coin with three times. Let X be the number of heads we observe. Show that .
Solution: We can break X up into three random variables. Let represent the results of the first coin toss, where
We can see that .
Now let and represent the second and third coin tosses the same way. These are all Bernoulli random variables and are independent from one another, each with the probability mass function
Now we can use to find the probability mass function of X:
So we have
or, equivalently,
Therefore .
Example 3.7: Say we have two independent random variables and . Define a new random variable . Find the probability mass function of .
Solution: We can write as the sum of independent random variables where each .
We can write Y the same way as the sum of independent Bernoulli random variables So adding these together we have that making Z the sum of independent Bernoulli random variables, all with parameter . Hence , giving us the probability mass function
Let’s once again suppose we have a coin with . We toss the coin until we observe heads and define to be the total number of coin tosses. This X is said to have a negative binomial or Pascal distribution with parameters and .
Why is this called the negative binomial distribution? While the binomial distribution models the number of successes, the negative binomial distribution models the number of failures.
The parameter represents the smallest number X can take, the case where every coin comes up heads. So our range is To find the probability mass function of X, define , where is the event that we observe heads in the first trials and is the event that we get a heads in the th trial. So we can write.
Definition: A random variable X is said to be a Pascal random variable, written if its probability density function is given by where .
Now suppose we have a bag that contains blue marbles and red marbles. We choose marbles at random without replacement. Let be the number of blue marbles in our sample. By definition, we must have and our number of red marbles must be less than or equal to . We can conclude from this that .
Therefore we have that This is an example of a hypergeometric distribution.
textbfDefinition: A random variable X is said to be a hypergeometric random variable with parameters , , and , written if its range is and it has the probability mass function
Example: Say we have a bag 4 blue marbles and 2 red marbles. We choose 3 randomly without replacement. Let X be the number of blue marbles we choose. Show that .
Solution: In this case, , , , and our range is
Now let’s look at probabilities. would mean that we have 1 "success" (blue marble) and 2 "failures" (red marbles). The probability that we’ll have this combination out of all possible combinations of 3 marbles will look like or We can use the same argument for , giving us the probability mass function
Say we run a website, www.probabilityiscool.org, which receives an average of 12.5 visitors an hour. We let our random variable X be the number of visitors we receive during some random hour. First we note that even though our mean is 12.5, the actual number of visitors has to be an integer. We should expect the probability to peak at the 12-13 range. The lowest possible number we can receive is zero and, speaking theoretically, the upper limit does not exist. Although the probability of such an event is infintessimally small, we could, in theory, find ourselves in a situation where every person on earth has 4 browsers open and is using all of them to access our website. So our probability as we approach infinitely large numbers will approach zero, but never actually touch it. This situation is an example of a Poisson distribution with paramter 2.5.
Definition: A random variable X is said to have a Poisson distribution with parameter , written if its range is and its probability mass function is given by
Notice that
(a)
(b)
Here are the graphs of some Poisson distributions for (blue, red, and brown respectively).
Example 3.8: The number of emails you get in a weekday can be modeled by a Poisson distribution with an average of 0.2 emails per minute.
(a) What is the probability that you get 0 emails over a span of five minutes.
(b) What is the probability that you get more than 3 emails over a span of 10 minutes?
Solution:
(a) The parameter will represent the expected number of emails during the given time period. In this case So (b) Here we have and so our probability of X being greater than 3 will be
Theorem 3.1: Let where is fixed. Then, for and , we have
Proof: For our binomial distribution, the PMF looks like
Taking the limit as , we get
Problem 1: Let X be a discrete random variable with
Find:
(a)
(b)
(c)
(d)
Solution:
(a)
(b)
(c)
(d)
Problem 2: You roll two 6-sided dice and observe two numbers, X and Y.
(a) Find , , and the PMFs of X and Y.
(b) Find
(c) Find
(d) Let . Find the range and PMF of Z.
(e) Find
Solution:
(a)
(b) X and Y are clearly independent so
(c)
(d)
To find the PMF, let’s look at all of our possible options:
So we have
Just to make sure:
Putting it all together we get
(e) We can use our PMF above to solve this one. We can either refer to our grid above or use Bayes’ Rule:
Problem 3: Say we roll a fair 6-sided die repeatedly until a number larger than 4 is observed. If N is the total number of rolls, find for .
Solution: N is an example of a geometric random variable. The parameter will be the probability that a roll gives a number greater than 4, or .
So , which means
Problem 4: You take an exam which contains 20 multiple choice questions with 4 options each. You know the answer to 10 questions, but have no idea about the other 10 so you choose your options randomly. Let X represent your total number of correct answers.
(a) Find the PMF of X
(b) What is ?
Solution:
(a) Let where Y is the number of correct answers to the 10 questions you’ve randomly guessed. Y is an example of a binomial random variable with parameters and .
So Now to find the PMF of X, we just need to shift into our new range (b)
Problem 5: Let and be two independent random variables. Define a new random variable . Find the PMF of Z.
Solution: This one is easy if we understand the definition of the Pascal distribution. Remember represents the number of trials needed to achieve successes given the probability of each success is .
Hence, represents the number of trials needed to achieve successes given given the probability of each success is , meaning .
So we have
Problem 6: The number of customers arriving at a grocery store can be represented as a Poisson random variable. On average, 10 customers will arrive per hour. Let X be the number of customers arriving from 10:00 to 11:30. What is ?
Solution: In this case, we have , so .
Thus
Problem 7: Let and be two independent random variables. Define a new random variable . Find the PMF of Z.
Solution: First note that the range for a Poisson random variable will always be the same Now let’s find our PMF
Therefore, and has the PMF
Problem 8: Let X be a discrete random variable with PMF
Define a new random variable . Find the range and PMF of Y.
Solution: We have that , so .
Now let’s find the probabilities for each value in the range. Check: So we have