discrete random variables Flashcards
random variables
This topic is largely about introducing some useful terminology, building on the notions of sample space and probability function. The key words are
1. Random variable
2. Probability mass function (pmf)
3. Cumulative distribution function (cdf)
discrete sample space Ξ©
a finite or listable set of outcomes {π1, π2 β¦}. The probability of an outcome π is denoted π(π).
event πΈ
a subset of Ξ©. The probability of an event πΈ is π(πΈ) = β π(π) where the sum is over πβπΈ
game with two dice
Roll a die twice and record the outcomes as (π, π), where π is the result of the first roll and
π the result of the second.
We can take the sample space to be
Ξ© = {(1,1),(1,2),(1,3),β¦,(6,6)} = {(π,π)|π,π = 1,β¦6}.
The probability function is π (π, π) = 1/36.
In this game, you win $500 if the sum is 7 and lose $100 otherwise. We give this payoff
function the name π and describe it formally by
We can change the game by using a different payoff function. For example
In this example if you roll (6, 2) then you win $2. If you roll (2, 3) then you win -$4 (i.e., lose $4).
Which game is the better bet?
discrete random variable
Let Ξ© be a sample space. A discrete random variable is a function
πβΆΞ©βR
that takes a discrete set of values. (Recall that R stands for the real numbers.)
Why is π called a random variable?
Itβs βrandomβ because its value depends on a random outcome of an experiment. And we treat π like we would a usual variable: we can add it to other random variables, square it, and so on.
Events and random variables
For any value π we write π = π to mean the event consisting of all outcomes π with π(π) = π.
Example 3. In Example 1 we rolled two dice and π was the random variable
The event π = 500 is the set {(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)}, i.e. the set of all outcomes that sum to 7.
So π (π = 500) = 1/6.
We allow π to be any value, even values that π never takes.
In Example 1, we could look at the event π = 1000. Since π never equals 1000 this is just the empty event (or empty set)
β΅π=1000β² = {} = β
π(π=1000)=0.
probability mass function (pmf)
The probability mass function (pmf) of a discrete random variable is the function π(π) = π (π = π).
Note:
1. We always have 0β€π(π)β€1.
2. We allow π to be any number. If π is a value that π never takes, then π(π) = 0.
Example 4: Let Ξ© be our earlier sample space for rolling 2 dice. Define the random variable π to be the maximum value of the two dice, i.e.
π (π, π) = max(π, π).
For example, the roll (3,5) has maximum 5, i.e. π (3, 5) = 5.
We can describe a random variable by listing its possible values and the probabilities associated to these values. For the above example we have:
Events and inequalities
Inequalities with random variables describe events. For example π β€ π is the set of all outcomes π such that π(π€) β€ π.
Example 5. If our sample space is the set of all pairs of (π, π) coming from rolling two dice and π(π,π) = π+π is the sum of the dice then what is π β€ 4 ?
The cumulative distribution function (cdf)
The cumulative distribution function (cdf) of a random variable π is the function πΉ given by πΉ (π) = π (π β€ π). We will often shorten this to distribution function.
Note well that the definition of πΉ(π) uses the symbol less than or equal to. This will be important for getting your calculations exactly right.
Example 6: Continuing with the example π, we have
πΉ(π) is called the cumulative distribution function because πΉ(π) gives the total probability that accumulates by adding up the probabilities π(π) as π runs from ββ to π. For example, in the table above, the entry 16/36 in column 4 for the cdf is the sum of the values of the pmf from column 1 to column 4.
True or false: F(a) is defined for all values of A
True:
Just like the probability mass function, πΉ(π) is defined for all values π. In the above example, πΉ(8) = 1, πΉ(β2) = 0, πΉ(2.5) = 4/36, and πΉ(π) = 9/36.
how to represent cdf in notation?
As events: βπ β€ 4β = {1,2,3,4}; πΉ(4) = π(π β€ 4) = 1/36+3/36+5/36+7/36 = 16/36.
Let X be the number of heads in 3 tosses of a fair coin
Probability Mass function for number of heads in 3 tosses of a fair coin
cumulative distribution function for number of heads in 3 tosses of a fair coin
pmf and cdf for the maximum of two dice
pmf and cdf for the sum of two dice
properties of the cdf F
- πΉ is non-decreasing. That is, its graph never goes down, or symbolically if π β€ π then πΉ(π) β€ πΉ(π).
- 0β€πΉ(π)β€1
- lim πΉ(π)=1 as πββ, lim πΉ(π)=0 as πβββ
πΉ is non-decreasing. That is, its graph never goes down, or symbolically if π β€ π then πΉ(π) β€ πΉ(π).
In words, this says the cumulative probability πΉ(π) increases or remains constant as π increases, but never decreases;
0β€πΉ(π)β€1
In words, this says the accumulated probability is always between 0 and 1
lim πΉ(π)=1 as πββ
and
lim πΉ(π)=0 as πβββ
In words, this says that as π gets very large, it becomes more and more certain that π β€ π and as π gets very negative it becomes more and more certain that π > π.