Section 4.1 Summer 2013 - Math 1040 July 3, 2013 (1040) M 1040 - 4.1 July 3, 2013 1 / 16 Coin Flips (1040) M 1040 - 4.1 July 3, 2013 2 / 16 Roadmap Section 4.1 establishes terms for probability distributions. You will see familiar tables and mathematics, as we will see the first terms are similar to frequency distributions. I Random variables: discrete and continuous. I Rules for discrete probability distributions. I Mean and variance (and standard deviation) of discrete probability distributions. (1040) M 1040 - 4.1 July 3, 2013 3 / 16 Random Variables A random variable is a process that turns an outcome of a probability experiment into a numerical value. Example The sample space for a coin toss is S = {H, T }. A random variable could be x = 1 if the toss is heads, and x = 0 if the toss is tails. Outcome Event E T H Random Variable Value x 0 1 Probability P(x) 0.5 0.5 In this example, x counts once if there is a head, and no times if there is a tail. (1040) M 1040 - 4.1 July 3, 2013 4 / 16 Random Variables Example Two coins are tossed. The random variable x counts the number of heads. The sample space is S = {HH, HT , TH, TT }. Outcome Event E TT HT or TH HH Random Variable Value x 0 1 2 Probability P(x) 0.25 0.50 0.25 The probability distribution for the random variable is then Number of heads 0 1 2 (1040) M 1040 - 4.1 Probability 0.25 0.50 0.25 July 3, 2013 5 / 16 Random variable There are two types of random variables: discrete and continuous. In most settings, discrete r.v.’s represent counted data, and continuous r.v.’s represent measured data. Discrete random variables are when a finite or countable number of outcomes can be listed. Continuous random variables are when there is an uncountable number of outcomes. This is represented by an interval or number line. (1040) M 1040 - 4.1 July 3, 2013 6 / 16 Random Variables Examples of discrete random variables include: I Number of children delivered in a hospital per day. I Number of successful attempts at a matching quiz. Examples of continuous random variables include: I The volume of oxygen in a balloon. I The amount of minutes spent on a phone call. (1040) M 1040 - 4.1 July 3, 2013 7 / 16 Discrete Probability Distribution Discrete probability distributions list the values of a random variable, along with its probability. It must: 1. Have the probability of each value between 0 and 1, inclusive. 2. The sum of all the probabilities must be 1. In symbols, 1. 0 ≤ P(x) ≤ 1. P 2. P(x) = 1. (1040) M 1040 - 4.1 July 3, 2013 8 / 16 Discrete Probability Distribution Probabilities are relative frequencies. A discrete probability distribution is the relative frequency distribution, and they can be represented by relative frequency histograms. Example Let x be the sum of two six sided dice. Frequency distribution: x f 2 1 3 2 4 3 5 4 6 5 7 6 8 5 9 4 10 3 11 2 12 1 Probability distribution: x P(x) (1040) 2 3 4 5 6 7 8 9 10 11 12 1 36 2 36 3 36 4 36 5 36 6 36 5 36 4 36 3 36 2 36 1 36 M 1040 - 4.1 July 3, 2013 9 / 16 Discrete Probability Distribution (1040) M 1040 - 4.1 July 3, 2013 10 / 16 Mean / Expected Value The mean of a discrete random variable is: µ= X x · P(x) This is the same as the expected value E (x). Example For two coin flips, the average number of heads is: 1 1 1 µ=0· +1· +2· =1 4 2 4 (1040) M 1040 - 4.1 July 3, 2013 11 / 16 Mean / Expected Value Example A raffle has 900 tickets, sold at $4 each. There are four prizes: $500, $400, $200, and $100. You buy 1 ticket. What is the expected value of your gain? Gain is the prize value minus the ticket value. Top prize gain: $500 − $4 = $496, Losing ticket: $0 − $4 = −$4 Probabiliy distribution: Gain, x P(x) (1040) $496 $396 $196 $96 -$4 1 900 1 900 1 900 1 900 896 900 M 1040 - 4.1 July 3, 2013 12 / 16 Mean / Expected Value Gain, x P(x) E (x) = X $496 $396 $196 $96 -$4 1 900 1 900 1 900 1 900 896 900 x · P(x) 1 1 1 896 1 + $396 · + $196 · + $96 · + (−$4) · 900 900 900 900 900 = −$2.67 = $496 · The expected value is negative, so you can lose an average of $2.67 for each ticket you buy. (1040) M 1040 - 4.1 July 3, 2013 13 / 16 Variance and Standard Deviation Outcomes vary, so it is useful to seek a probability distribution’s variance and standard deviation. The variance: σ 2 = X (x − µ)2 · P(x). √ The standard deviation: σ = (1040) σ2 = M 1040 - 4.1 qX (x − µ)2 · P(x). July 3, 2013 14 / 16 Variance and Standard Deviation Example For two coin flips, x 0 1 2 P(x) 0.25 0.50 0.25 P P(x) = 1 x −µ -1 0 1 (x − µ)2 1 0 1 (x − µ)2 · P(x) 0.25 0 0.25 P (x − µ)2 · P(x) = 0.50 The √ variance is 0.50 number of heads, squared. And standard deviation is σ = 0.50 ≈ 0.7071 number of heads. Most of the data values will differ from the mean by no more than 0.7071 heads. (1040) M 1040 - 4.1 July 3, 2013 15 / 16 Assignments Assignment: 1. Read pages 190 - 196. 2. Exercises 1 - 45 odd on page 197. Vocabulary: random variable, continuous and discrete random variable, probability distribution, mean, expected value, variance and standard deviation Understand: Identify if a random variable is discrete or continuous. There are rules for a discrete distribution: probabilities of outcomes are between zero and one, and the sum of all the probability values is one. Find the mean and variance of a discrete probability distribution. (1040) M 1040 - 4.1 July 3, 2013 16 / 16