Introduction to DRVs and Notation Discrete Random Variables
Introduction to DRVs and Notation Discrete Random Variables 1
Random Variables �A random variable is a probability model that assigns a value and probability to each outcome in the sample space of a random experiment. � Notation: ◦ An RV is typically denoted by an uppercase letter, such as X. ◦ A specific value is denoted by a lowercase letter, x. ◦ The probability associated with a specific outcome is denoted P(X=x) or shortened to px, P(x), or f(x). �EX. P(X=3), P(3), f(3) 2
Continuous vs. Discrete RVs discrete random variable is a rv with a finite (or countably infinite) range. They are usually integer counts. �A continuous random variable is a rv with uncoutably infinite values typically defined on an interval (either finite or infinite) of real numbers for its range. �A 3
Some DRV examples phone system for a business contains 48 lines. Let X denote the number of lines in use. ◦ Then, X can assume any of the integer values 0 through 48. 0 ≤ X ≤ 48. �A � Observe cars arriving at a tollbooth for 1 hour. You record the number of cars arriving. ◦ The possible values of X are any integers greater than 0 so it is defined on x ≥ 0. 4
Discrete Probability Distributions random variable X associates the outcomes of a random experiment to a number on the number line. �A probability distribution of the random variable X is a description of the probabilities associated with the possible numerical values of X. � The �A probability distribution of a discrete random variable can be a table or list, graph, formula 5
Probability Mass Functions (PMF) � The probability distribution of a DRV often comes in table form with lists the values and their probabilities: � The Probability Mass Function (PMF) gives us the probability of our random variable being equal to a single outcome: P(X=x) �A PMF has the following requirements: ◦ 0 ≤ P (x ) ≤ 1 ◦ ΣP(X=x) = 1 X P(X=x) x 1 p 1 x 2 p 2 x 3 p 3 … … xk pk
Cumulative Distribution Function (CDF) � The cumulative distribution function (CDF) is the sum of the all previous PMF values. � It gives us the probability of our random variable being less than or equal to a number: P(X≤x) � It can be built from the PMF and vice versa. X P(X=x) x 1 p 1 x 2 p 1+p 2 x 3 p 1+p 2+p 3 … … …. xk pk p 1+p 2+p 3…+pk = 1 7
PMF Formula Example � � � Let the random variable X denote the number of items that need to be analyzed to detect a flaw. Assume that the probability that an item has a flaw is 0. 1, and that the items are independent Determine the probability distribution of X. ◦ Let f denote an item having a flaw: P(f) = 0. 1 ◦ Let n denote an item not having a flaw: P(n) = 0. 9 ◦ The range of the values of X is: x = 1, 2, 3, 4, … ◦ The sample space is: S = {f, nnf, nnnf, …} Probability Distribution P(X=1) 0. 1 P(X=2) 0. 9*0. 1 0. 09 P(X=3) 0. 92*0. 1 0. 081 P(X=4) 0. 93*0. 1 0. 0729 … … … We could express the PMF as the formula: P(X=x) = 0. 9 x-1(0. 1) 8
Discrete Distribution Example � Gender of three children. Define the random variable, X, as the number of boys. � Build the discrete probability distribution from the sample space. � All probabilities are all between o and 1 and sum to 1. BGG BBG GBG BGB GGG GGB GBB BBB X f(x) F(x) 0 1/8 1 3/8 4/8 2 3/8 7/8 3 1/8 1
Discrete Distribution Example cont… � Use the PMF and CDF to answer the following questions: � What is the probability that the couple has at least two boys? ◦ P(X ≥ 2) = P(X = 2) + P(X = 3) = 3/8 + 1/8 = ½ � What is the probability that the couple has fewer than three boys? ◦ P(X < 3) = P(X = 0) + P(X = 1) + P(X = 2) = 1/8 + 3/8 = 7/8 ◦ OR: P(X < 3) = 1 – P(X = 3) = 1 – 1/8 = 7/8 X f(x) F(x) 0 1/8 1 3/8 4/8 2 3/8 7/8 3 1/8 1
- Slides: 10