Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5.1 & 5.2: Random Variables and Probability Mass Functions

Similar presentations


Presentation on theme: "Chapter 5.1 & 5.2: Random Variables and Probability Mass Functions"— Presentation transcript:

1 Chapter 5.1 & 5.2: Random Variables and Probability Mass Functions
Chris Morgan, MATH G160 February 1, 2012 Lecture 10

2

3 Random Variables A 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 class Continuous Random Variables •Random variables that take on values in a continuum or infinitely many values. –Height –Weight –Time Time you can hold your breath Lifetime 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 Combination T T T T C0 T T T H C1 T H H T 4C2 T H H H 4C3 H H H H C4 X P(x) 0 1/16 1 4/16 2 6/16 3 4/16 4 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)
x f(x) 2 1/36 3 2/36 4 3/36 5 4/36 6 5/36 7 6/36 8 9 10 11 12 P(X < 4) = P(3 < x < 8) = P(3 ≤ x ≤ 8) =

9 Probability Mass Function (PMF)
x f(x) 2 1/36 3 2/36 4 3/36 5 4/36 6 5/36 7 6/36 8 9 10 11 12 P(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 Example I 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/16 X P(x) 0 1/16 1 4/16 2 6/16 3 4/16 4 1/16

13 Example I can also write this PMF as a function rather than a chart: X P(x) 0 1/16 1 4/16 2 6/16 3 4/16 4 1/16 For x = 0 For x = 1 For x = 2 For x = 3 For 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 #1 A 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: Colors X p(x) R and R 10 1/45 R and G 6 2*3 = 6/45 R and B 5 2*5 = 10/46 B and G 1 5*3 = 15/45 B and B 5C2 = 10/45 G and G 2 3C2 = 3/45

17 Practice Problem #1 What is the probability you will win at least five dollars? P(X ≥ 5) = 1/45 + 6/ /45 = 17/45 Colors X p(x) R and R 10 1/45 R and G 6 2*3 = 6/45 R and B 5 2*5 = 10/46 G and G 2 3C2 = 3/45 B and G 1 5*3 = 15/45 B and B 5C2 = 10/45

18 Practice Problem #1 If 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/45 10/45 2 3/45

20 Practice Problem #2a In 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 /4 1 tail, 1 head 5 1/2 2 tails ¼ E(X) = 10(1/4) + 5(1/2) – 10(1/4) = 2.5

22 Practice Problem #2b In 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 tails Win $5 for two different Lose $10 for two heads Let 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??


Download ppt "Chapter 5.1 & 5.2: Random Variables and Probability Mass Functions"

Similar presentations


Ads by Google