3 Random VariablesA random variable (RV) is a real valued function whose domain is a sample space.- We will usually denote random variables by X, Y, Z and their respective values by x, y, z
4 Random Variables Discrete Random Variables •Random variables that take on a finite (or countable) number of values.–Sum of two dice (2,3,4,…,12)–Number of children (0,1,2,…)–Number in attendance at the movies–Number of hired employees- Number of students coming to classContinuous Random Variables•Random variables that take on values in a continuum or infinitely many values.–Height–Weight–TimeTime you can hold your breathLifetime of your cell phone batter
5 Random Variables X P(x) 0 1/16 1 4/16 2 6/16 3 4/16 4 1/16 Toss a fair coin 4 times. Suppose we are interested in the random variable X = number of heads.Outcome CombinationT T T T C0T T T H C1T H H T 4C2T H H H 4C3H H H H C4X P(x)0 1/161 4/162 6/163 4/164 1/16
6 Probability Mass Function (PMF) The values on the right of the table above are called the Probability Mass Function of the random variable X :The probability of x = the probability(X = one specific x)A probability mass function (p.m.f) is a function which describes the probabilities a discrete type random variable will take on for any given value. They can be used to calculate the probabilities corresponding to an event relating to a random variable.
7 Probability Mass Function (PMF) We can take the PMF, graph it, and display it in the form of a histogram.
8 Probability Mass Function (PMF) xf(x)21/3632/3643/3654/3665/3676/3689101112P(X < 4) =P(3 < x < 8) =P(3 ≤ x ≤ 8) =
9 Probability Mass Function (PMF) xf(x)21/3632/3643/3654/3665/3676/3689101112P(x < 8 | x < 10) =P(x > 3) =P(4 < x < 7 | x < 9) =
10 Basic Properties of a PMF (PMFs are nonnegative)2. There are only finitely (or countably infinitely many) x’s for which:3.
11 Fundamental Probability Formula How do you compute probabilities for a random variable X?Welll….. We have the PMF that tell us the probability that the random variable X takes on the specific value x. Sometimes, you may be interested in a whole range of possible values of X.For instance, the Pr(1 ≤ x≤ 3)
12 ExampleI toss a fair coin 4 times. What the probability of getting at most two most?P(x ≤ 2) = ?P(x ≥ 1) = 1 – P(x=0) = 1 - 1/16 = 15/16X P(x)0 1/161 4/162 6/163 4/164 1/16
13 ExampleI can also write this PMF as a function rather than a chart:X P(x)0 1/161 4/162 6/163 4/164 1/16For x = 0For x = 1For x = 2For x = 3For x =otherwise
14 Fundamental Probability Formula Suppose X is a discrete RV and that A is a set of real numbers. Then:In words: the sum of the probability mass function over all possible value you are interested in
15 Practice Problem #1A partially eaten bag of M&M’s contains 2 red, 5 blue, and 3 green M&M’s. You and your buddy decide to place a bet.You will choose two M&M’s at random without replacement. For every red M&M you win $5, for every green M&M you win $1 and you do not win anything for a blue M&M.Let X be the amount of money you will win.
16 Practice Problem #1 [2 red, 5 blue, and 3 green M&M’s….pick two] Let X be the amount of money you will win. Begin by writing down the PMF:ColorsXp(x)R and R101/45R and G62*3 = 6/45R and B52*5 = 10/46B and G15*3 = 15/45B and B5C2 = 10/45G and G23C2 = 3/45
17 Practice Problem #1What is the probability you will win at least five dollars?P(X ≥ 5) = 1/45 + 6/ /45 = 17/45ColorsXp(x)R and R101/45R and G62*3 = 6/45R and B52*5 = 10/46G and G23C2 = 3/45B and G15*3 = 15/45B and B5C2 = 10/45
18 Practice Problem #1If you win something, what is the probability it will be worth at least five dollars??P(X ≥ 5 | X ≠ 0) =
19 Practice Problem #1b E(X)= E(X)2= E(X2)= X p(x) 10 1/45 6 6/45 5 10/46 15/4510/4523/45
20 Practice Problem #2aIn a simple game, two fair coins are tossed and the payoff is to be determined from the outcome. The payoff strategy is as follows:Win $5 for each head, lose $10 for two tails.Let X denote your winnings if you play this game once.
21 Practice Problem #2a Win $5 for each head, lose $10 for two tails. Write out the PMF for x:X p(x)2 heads /41 tail, 1 head 5 1/22 tails ¼E(X) = 10(1/4) + 5(1/2) – 10(1/4) = 2.5
22 Practice Problem #2bIn a simple game, two fair coins are tossed and the payoff is to be determined from the outcome. The payoff strategy is as follows:Lose $5 for two tailsWin $5 for two differentLose $10 for two headsLet X denote your winnings if you play this game once.
23 Practice Problem #2b Calculate the PMF for this payoff strategy: Calculate the expected payoff E(X) =Which payoff would you rather play with, a or b, and why??
Your consent to our cookies if you continue to use this website.