Conditional Probability. Expected Value.

Similar documents
Math 14 Lecture Notes Ch Mean

CHAPTER 10: Introducing Probability

6.1 Discrete and Continuous Random Variables. 6.1A Discrete random Variables, Mean (Expected Value) of a Discrete Random Variable

Probability mass function; cumulative distribution function

Chapter 8 Solutions Page 1 of 15 CHAPTER 8 EXERCISE SOLUTIONS

Random Variables. 6.1 Discrete and Continuous Random Variables. Probability Distribution. Discrete Random Variables. Chapter 6, Section 1

Stochastic Calculus, Application of Real Analysis in Finance

Chapter 4. Section 4.1 Objectives. Random Variables. Random Variables. Chapter 4: Probability Distributions

Statistical Methods for NLP LT 2202

The Binomial distribution

The binomial distribution

+ Chapter 7. Random Variables. Chapter 7: Random Variables 2/26/2015. Transforming and Combining Random Variables

MATH 118 Class Notes For Chapter 5 By: Maan Omran

Lesson 97 - Binomial Distributions IBHL2 - SANTOWSKI

Opening Exercise: Lesson 91 - Binomial Distributions IBHL2 - SANTOWSKI

Probability Distributions for Discrete RV

Part V - Chance Variability

Chapter 6: Random Variables

What do you think "Binomial" involves?

Sec$on 6.1: Discrete and Con.nuous Random Variables. Tuesday, November 14 th, 2017

Chapter 7. Random Variables

FE 5204 Stochastic Differential Equations

ECON 214 Elements of Statistics for Economists 2016/2017

Econ 6900: Statistical Problems. Instructor: Yogesh Uppal

CHAPTER 6 Random Variables

12. THE BINOMIAL DISTRIBUTION

12. THE BINOMIAL DISTRIBUTION

Version A. Problem 1. Let X be the continuous random variable defined by the following pdf: 1 x/2 when 0 x 2, f(x) = 0 otherwise.

Marquette University MATH 1700 Class 8 Copyright 2018 by D.B. Rowe

Mean, Median and Mode. Lecture 2 - Introduction to Probability. Where do they come from? We start with a set of 21 numbers, Statistics 102

Fall 2015 Math 141:505 Exam 3 Form A

Binomial population distribution X ~ B(

Statistics for Business and Economics: Random Variables (1)

ECO220Y Introduction to Probability Readings: Chapter 6 (skip section 6.9) and Chapter 9 (section )

HHH HHT HTH THH HTT THT TTH TTT

Stat 211 Week Five. The Binomial Distribution

Probability & Sampling The Practice of Statistics 4e Mostly Chpts 5 7

Chapter 5 Basic Probability

MATH1215: Mathematical Thinking Sec. 08 Spring Worksheet 9: Solution. x P(x)

Chapter 8: The Binomial and Geometric Distributions

Review. What is the probability of throwing two 6s in a row with a fair die? a) b) c) d) 0.333

I can use simulation to model chance behavior. I can describe a probability model for a chance process. I can use basic probability rules, including

Binomial Distribution and Discrete Random Variables

Lecture 6 Probability

Why Bankers Should Learn Convex Analysis

Module 4: Probability

Chapter 3 - Lecture 3 Expected Values of Discrete Random Va

Mathacle. PSet Stats, Concepts In Statistics Level Number Name: Date: Distribution Distribute in anyway but normal

Mean of a Discrete Random variable. Suppose that X is a discrete random variable whose distribution is : :

Statistics for IT Managers

6.1 Binomial Theorem

SECTION 4.4: Expected Value

Chapter 8. Variables. Copyright 2004 Brooks/Cole, a division of Thomson Learning, Inc.

MA 1125 Lecture 14 - Expected Values. Wednesday, October 4, Objectives: Introduce expected values.

Math 180A. Lecture 5 Wednesday April 7 th. Geometric distribution. The geometric distribution function is

Keeping Your Options Open: An Introduction to Pricing Options

Learning Goals: * Determining the expected value from a probability distribution. * Applying the expected value formula to solve problems.

6.042/18.062J Mathematics for Computer Science November 30, 2006 Tom Leighton and Ronitt Rubinfeld. Expected Value I

Binomial and Normal Distributions. Example: Determine whether the following experiments are binomial experiments. Explain.

variance risk Alice & Bob are gambling (again). X = Alice s gain per flip: E[X] = Time passes... Alice (yawning) says let s raise the stakes

MATH 112 Section 7.3: Understanding Chance

Example 1: Identify the following random variables as discrete or continuous: a) Weight of a package. b) Number of students in a first-grade classroom

The Elements of Probability and Statistics

Chapter 4 Discrete Random variables

Probability Distributions: Discrete

Binomial Random Variables

MATH 446/546 Homework 1:

HUDM4122 Probability and Statistical Inference. February 23, 2015

EXERCISES ACTIVITY 6.7

Chapter 6: Random Variables. Ch. 6-3: Binomial and Geometric Random Variables

Chapter 3 - Lecture 4 Moments and Moment Generating Funct

The Binomial Distribution

Chapter 4 Discrete Random variables

INTRODUCTION TO MATHEMATICAL MODELLING LECTURES 3-4: BASIC PROBABILITY THEORY

Probability Distributions

Statistics for Managers Using Microsoft Excel 7 th Edition

5.2 Random Variables, Probability Histograms and Probability Distributions

PROBABILITY AND STATISTICS, A16, TEST 1

Chapter 9. Idea of Probability. Randomness and Probability. Basic Practice of Statistics - 3rd Edition. Chapter 9 1. Introducing Probability

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

5.6 Special Products of Polynomials

MATH/STAT 3360, Probability FALL 2012 Toby Kenney

Math 243 Section 4.3 The Binomial Distribution

Experimental Probability - probability measured by performing an experiment for a number of n trials and recording the number of outcomes

Probability. An intro for calculus students P= Figure 1: A normal integral

Sales c.f.(<) Median has 50% = observations on l.h.s. (35 31)5 = & above 4 70=N. We put the values to get,

5. In fact, any function of a random variable is also a random variable

MAT 4250: Lecture 1 Eric Chung

Assignment 2 (Solution) Probability and Statistics

Probability Distribution

Math 166: Topics in Contemporary Mathematics II

Chapter 4 and 5 Note Guide: Probability Distributions

Elementary Statistics Blue Book. The Normal Curve

Binomial Distributions

CHAPTER 6 Random Variables

Chapter 7. Random Variables: 7.1: Discrete and Continuous. Random Variables. 7.2: Means and Variances of. Random Variables

Binomial Random Variable - The count X of successes in a binomial setting

Math141_Fall_2012 ( Business Mathematics 1) Weeks 11 & 12. Dr. Marco A. Roque Sol Department of Mathematics Texas A&M University

Chapter 3: Probability Distributions and Statistics

Figure 1: 2πσ is said to have a normal distribution with mean µ and standard deviation σ. This is also denoted

Transcription:

Conditional Probability. Expected Value. CSE21 Winter 2017, Day 22 (B00), Day 14-15 (A00) March 8, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17

Random Variables A random variable assigns a real number to each possible outcome of an experiment. Rosen p. 460,478

Random Variables A random variable assigns a real number to each possible outcome of an experiment. Rosen p. 460,478 The distribution of a random variable X is the function r P(X = r)

Random Variables A random variable assigns a real number to each possible outcome of an experiment. Rosen p. 460,478 The distribution of a random variable X is the function r P(X = r) The expectation (average, expected value) of random variable X on sample space S is

Expected Value Examples Rosen p. 460,478 The expectation (average, expected value) of random variable X on sample space S is Calculate the expected number of boys in a family with two children. A. 0 B. 1 C. 1.5 D. 2

Expected Value Examples Rosen p. 460,478 The expectation (average, expected value) of random variable X on sample space S is Calculate the expected number of boys in a family with three children. A. 0 B. 1 C. 1.5 D. 2

Expected Value Examples Rosen p. 460,478 The expectation (average, expected value) of random variable X on sample space S is Calculate the expected number of boys in a family with three children. A. 0 B. 1 C. 1.5 D. 2 The expected value might not be a possible value of the random variable like 1.5 boys!

Expected Value Examples Rosen p. 460,478 The expectation (average, expected value) of random variable X on sample space S is Calculate the expected sum of two 6-sided dice. A. 6 B. 7 C. 8 D. 9 E. None of the above.

Properties of Expectation Rosen p. 460,478 E(X) may not be an actually possible value of X. But m E X M, where m is the minimum possible value of X and M is the maximum possible value of X.

Rosen p. 460,478 The expectation can be computed by conditioning on an event and its complement Theorem: For any random variable X and event A, E(X) = P(A) E(X A) + P( A c ) E ( X A c ) where A c is the complement of A. Conditional Expectation

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? e.g. X(HHT) = 1 X(HHH) = 2.

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? Solution: Directly from definition For each of eight possible outcomes, find probability and value of X: HHH (P(HHH)=1/8, X(HHH) = 2), HHT, HTH, HTT, THH, THT, TTH, TTTetc.

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? Solution: Using conditional expectation Let A be the event "The middle flip is H". Which subset of S is A? A. { HHH } B. { THT } C. { HHT, THH} D. { HHH, HHT, THH, THT} E. None of the above.

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? Solution: Using conditional expectation Let A be the event "The middle flip is H". E(X) = P(A) E(X A) + P( A c ) E ( X A c )

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? Solution: Using conditional expectation Let A be the event "The middle flip is H". P(A) = 1/2, P(A c ) = 1/2 E(X) = P(A) E(X A) + P( A c ) E ( X A c )

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? Solution: Using conditional expectation Let A be the event "The middle flip is H". P(A) = 1/2, P(A c ) = 1/2 E(X) = P(A) E(X A) + P( A c ) E ( X A c ) E( X A c ) : If middle flip isn't H, there can't be any pairs of consecutive Hs

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? Solution: Using conditional expectation Let A be the event "The middle flip is H". P(A) = 1/2, P(A c ) = 1/2 E(X) = P(A) E(X A) + P( A c ) E ( X A c ) E( X A c ) : If middle flip isn't H, there can't be any pairs of consecutive Hs E( X A ) : If middle flip is H, # pairs of consecutive Hs = # Hs in first & last flips

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? Solution: Using conditional expectation Let A be the event "The middle flip is H". P(A) = 1/2, P(A c ) = 1/2 E( X A c ) = 0 E( X A ) = ¼ * 0 + ½ * 1 + ¼ * 2 = 1 E(X) = P(A) E(X A) + P( A c ) E ( X A c )

Example: If X is the number of pairs of consecutive Hs when we flip a fair coin three times, what is the expectation of X? Solution: Using conditional expectation Let A be the event "The middle flip is H". P(A) = 1/2, P(A c ) = 1/2 E(X) = P(A) E(X A) + P( A c ) E ( X A c ) = ½ ( 1 ) + ½ ( 0 ) = 1/2 E( X A c ) = 0 E( X A ) = ¼ * 0 + ½ * 1 + ¼ * 2 = 1

Examples: Ending condition Each time I play solitaire I have a probability p of winning. I play until I win a game. Each time a child is born, it has probability p of being left-handed. I keep having kids until I have a left-handed one. Let X be the number of games OR number of kids until ending condition is met. What's E(X)? A. 1. B. Some big number that depends on p. C. 1/p. D. None of the above.

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Directly from definition Need to compute the sum of all possible P(X = i) i.

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Directly from definition Need to compute the sum of all possible P(X = i) i. P(X = i) = Probability that don't stop the first i-1 times and do stop at the i th time = (1-p) i-1 p

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Directly from definition Need to compute the sum of all possible P(X = i) i. P(X = i) = Probability that don't stop the first i-1 times and do stop at the i th time = (1-p) i-1 p Math 20B?

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Using conditional expectation E(X) = P(A) E(X A) + P( A c ) E ( X A c )

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Using conditional expectation Let A be the event "success at first try". E(X) = P(A) E(X A) + P( A c ) E ( X A c )

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Using conditional expectation Let A be the event "success at first try". E(X) = P(A) E(X A) + P( A c ) E ( X A c ) P(A) = p P(A c ) = 1-p

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Using conditional expectation Let A be the event "success at first try". E(X) = P(A) E(X A) + P( A c ) E ( X A c ) E(X A) = 1 P(A) = p P(A c ) = 1-p because stop after first try

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Using conditional expectation Let A be the event "success at first try". E(X) = P(A) E(X A) + P( A c ) E ( X A c ) E(X A) = 1 E(X A c ) = 1 + E(X) P(A) = p P(A c ) = 1-p because tried once and then at same situation from start

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Using conditional expectation Let A be the event "success at first try". E(X) = P(A) E(X A) + P( A c ) E ( X A c ) E(X A) = 1 E(X A c ) = 1 + E(X) P(A) = p P(A c ) = 1-p E(X) = p(1) + ( 1-p ) (1 + E(X) )

Ending condition Let X be the number of games OR number of kids until ending condition is met. Solution: Using conditional expectation Let A be the event "success at first try". E(X) = p(1) + ( 1-p ) (1 + E(X) ) Solving for E(X) gives:

Useful trick 2: Linearity of expectation Rosen p. 477-484 Theorem: If X i are random variables on S and if a and b are real numbers then E(X 1 + +X n ) = E(X 1 ) + + E(X n ) and E(aX+b) = ae(x) + b.

Useful trick 2: Linearity of expectation Example: Expected number of consecutive heads when we flip a fair coin n times? A. 1. B. 2. C. n. D. None of the above. E.??

Useful trick 2: Linearity of expectation Example: Expected number of consecutive heads when we flip a fair coin n times? Solution: Define X i = 1 if both the i th and (i+1) st flips are H; X i = 0 otherwise. Looking for E(X) where. For each i, what is E(X i )? A. 0. B. ¼. C. ½. D. 1. E. It depends on the value of i.

Useful trick 2: Linearity of expectation Example: Expected number of consecutive heads when we flip a fair coin n times? Solution: Define X i = 1 if both the i th and (i+1) st flips are H; X i = 0 otherwise. Looking for E(X) where.

Useful trick 2: Linearity of expectation Example: Expected number of consecutive heads when we flip a fair coin n times? Solution: Define X i = 1 if both the i th and (i+1) st flips are H; X i = 0 otherwise. Looking for E(X) where. Indicator variables: 1 if pattern occurs, 0 otherwise

Other functions? Expectation does not in general commute with other functions. Rosen p. 460,478 E ( f(x) ) f ( E (X) ) For example, let X be random variable with P(X = 0) = ½, P(X =1) = ½ What's E(X)? What's E(X 2 )? What's ( E(X) ) 2?

Other functions? Expectation does not in general commute with other functions. Rosen p. 460,478 E ( f(x) ) f ( E (X) ) For example, let X be random variable with P(X = 0) = ½, P(X =1) = ½ What's E(X)? What's E(X 2 )? What's ( E(X) ) 2? (½)0 + (½)1 = ½ (½)0 2 + (½)1 2 = ½ (½) 2 = ¼

Announcements