Topic 3: The Expectation of a Random Variable

Similar documents
Topic 3: The Expectation of a Random Variable

Fundamental Tools - Probability Theory II

Random variables (discrete)

SDS 321: Introduction to Probability and Statistics

Analysis of Engineering and Scientific Data. Semester

STAT 430/510 Probability Lecture 7: Random Variable and Expectation

More on Distribution Function

3 Multiple Discrete Random Variables

STAT2201. Analysis of Engineering & Scientific Data. Unit 3

Lecture 16. Lectures 1-15 Review

Expectation of Random Variables

Random Variables. Lecture 6: E(X ), Var(X ), & Cov(X, Y ) Random Variables - Vocabulary. Random Variables, cont.

Lecture 3. Discrete Random Variables

Lecture 10. Variance and standard deviation

p. 4-1 Random Variables

Discrete Probability Refresher

SDS 321: Introduction to Probability and Statistics

Discrete Random Variables

Common Discrete Distributions

Random Variable. Discrete Random Variable. Continuous Random Variable. Discrete Random Variable. Discrete Probability Distribution

Joint Distribution of Two or More Random Variables

Chapter 2: Discrete Distributions. 2.1 Random Variables of the Discrete Type

Bernoulli Trials, Binomial and Cumulative Distributions

Suppose that you have three coins. Coin A is fair, coin B shows heads with probability 0.6 and coin C shows heads with probability 0.8.

Arkansas Tech University MATH 3513: Applied Statistics I Dr. Marcel B. Finan

Mathematical Statistics 1 Math A 6330

Things to remember when learning probability distributions:

Random Variables and Their Distributions

Probability Distributions

Part (A): Review of Probability [Statistics I revision]

Name: Firas Rassoul-Agha

Random Variables. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

MA/ST 810 Mathematical-Statistical Modeling and Analysis of Complex Systems

STAT509: Discrete Random Variable

1 Random Variable: Topics

Relationship between probability set function and random variable - 2 -

Topic 9 Examples of Mass Functions and Densities

Chapter 3 Discrete Random Variables

Math LM (27794) - Lectures 01

Expectation MATH Expectation. Benjamin V.C. Collins, James A. Swenson MATH 2730

Discrete Random Variables. David Gerard Many slides borrowed from Linda Collins

MATH 3510: PROBABILITY AND STATS June 15, 2011 MIDTERM EXAM

Lecture 4: Probability and Discrete Random Variables

Statistics for Economists. Lectures 3 & 4

1 Review of Probability

Binomial and Poisson Probability Distributions

MAS113 Introduction to Probability and Statistics. Proofs of theorems

Probability and Distributions

1 Bernoulli Distribution: Single Coin Flip

CMPSCI 240: Reasoning Under Uncertainty

Chapter 2. Random Variable. Define single random variables in terms of their PDF and CDF, and calculate moments such as the mean and variance.

Random Variables. Cumulative Distribution Function (CDF) Amappingthattransformstheeventstotherealline.

IAM 530 ELEMENTS OF PROBABILITY AND STATISTICS LECTURE 3-RANDOM VARIABLES

ELEG 3143 Probability & Stochastic Process Ch. 2 Discrete Random Variables

Random variables. DS GA 1002 Probability and Statistics for Data Science.

Functions of random variables

The expected value E[X] of discrete random variable X is defined by. xp X (x), (6.1) E[X] =

Random Variables Example:

Notice how similar the answers are in i,ii,iii, and iv. Go back and modify your answers so that all the parts look almost identical.

4.1 Expected value of a discrete random variable. Suppose we shall win $i if the die lands on i. What is our ideal average winnings per toss?

1 Presessional Probability

SUMMARY OF PROBABILITY CONCEPTS SO FAR (SUPPLEMENT FOR MA416)

Physics 403 Probability Distributions II: More Properties of PDFs and PMFs

Chapter 4. Chapter 4 sections

Notes for Math 324, Part 17

Review of Probability. CS1538: Introduction to Simulations

18.440: Lecture 28 Lectures Review

CME 106: Review Probability theory

ACM 116: Lecture 2. Agenda. Independence. Bayes rule. Discrete random variables Bernoulli distribution Binomial distribution

Expectation and Variance

What is a random variable

Debugging Intuition. How to calculate the probability of at least k successes in n trials?

MATH Notebook 5 Fall 2018/2019

Discrete Random Variables

Guidelines for Solving Probability Problems

Brief Review of Probability

The random variable 1

GEOMETRIC -discrete A discrete random variable R counts number of times needed before an event occurs

Special distributions

1 Review of Probability and Distributions

Sample Spaces, Random Variables

Lecture 10: Probability distributions TUESDAY, FEBRUARY 19, 2019

Chapter 3: Discrete Random Variable

Conditional distributions (discrete case)

BINOMIAL DISTRIBUTION

Joint Probability Distributions and Random Samples (Devore Chapter Five)

STAT/MATH 395 A - PROBABILITY II UW Winter Quarter Moment functions. x r p X (x) (1) E[X r ] = x r f X (x) dx (2) (x E[X]) r p X (x) (3)

Random Variables. Random variables. A numerically valued map X of an outcome ω from a sample space Ω to the real line R

Stochastic Models of Manufacturing Systems

Continuous Random Variables and Continuous Distributions

Lecture Notes 2 Random Variables. Discrete Random Variables: Probability mass function (pmf)

Lectures on Elementary Probability. William G. Faris

MAT X (Spring 2012) Random Variables - Part I

Random Variables and Expectations

Statistika pro informatiku

MAS113 Introduction to Probability and Statistics. Proofs of theorems

Homework 4 Solution, due July 23

Discrete Random Variable Practice

random variables T T T T H T H H

Bernoulli and Binomial

Transcription:

Topic 3: The Expectation of a Random Variable Course 003, 2017 Page 0

Expectation of a discrete random variable Definition (Expectation of a discrete r.v.): The expected value (also called the expectation or mean) of a discrete random variable whose distinct possible values are x 1, x 2,... is defined by E(X) = x j P(X = x j ) j=1 The expectation is simply a weighted average of possible outcomes of X, weighted by their probabilities. We can think of the expectation as a point of balance: if weights are placed on a weightless rod, where should a fulcrum be placed so that the rod balances? E(X) need not occur with positive probability. For example, consider the experiment of rolling a fair die and X = number of dots. E(X) = 6 x=1 x 6 I {1,2...6} (x) = 3.5 If X can take only a finite number of different values, this expectation always exists. With an infinite sequence of possible values, it will exist if high values of X have low probability weights. Page 1

Expectations: some useful results Result 1: If X and Y are r.v. s with the same distribution, then (if either side exists) E(X) = E(Y) The proof follows immediately from the definition of E(X). Note that the converse of the above statement is NOT true. This is a common mistake. Result 2: For any r.v. X and a constant c E(cX) = ce(x) Result 3 (linearity of expectation): For any r.v.s X, Y, E(X + Y) = E(X) + E(Y) Note: We do not require independence of these two r.v.s. It is instructive to consider the experiment of tossing two fair coins. Let X and Y be indicator variables for at least one head and at least one tail. Verify linearity for this case by constructing the distribution of X + Y. Let the events {s} denote the smallest events in the sample space over which X and Y are defined. Then E(X) + E(Y) = s X(s)P({s}) + s Y(s)P({s}) = s (X + Y)(s)P({s}) = E(X + Y) Page 2

The expectations of Bernoulli and Binomial r.v.s Bernoulli: Using the definition of the expectation, this is 1p + 0q = p Binomial: A binomial r.v. can be expressed as the sum of n Bernoulli r.v.s: X = I 1 + I 2 +... I n. By linearity, E(X) = E(I 1 ) + E(I 2 ) +... E(I n ) = np. Page 3

The Geometric distribution Definition (Geometric distribution): Consider a sequence of independent Bernoulli trials, all with success probability p (0, 1). Let X be the number of failures before the first successful trial. Then X Geom(p) The PMF is given by P(X = k) = q k p for k = 0, 1, 2,... where q = 1 p. This is a valid PMF since the sum p q k = p 1 q = 1 The expectation of a geometric r.v. is defined as E(X) = kq k p We know that q k = 1 1 q. Differentiating both sides w.r.t. q, we get multiplying both sides by pq, we get 1 E(X) = pq (1 q) 2 = q p kq k 1 = 1 (1 q) 2. Now Page 4

The Negative Binomial distribution Definition (Negative Binomial distribution): Consider a sequence of independent Bernoulli trials, all with success probability p (0, 1). Let X be the number of failures before the rth success. Then X NBin(r, p) The PMF is given by for k = 0, 1, 2,... where q = 1 p. ( ) n + r 1 P(X = n) = p r q n r 1 We can write the Negative Binomial as a sum of r Geom(p) r.v.s: X = X 1 + X 2 + X r The expectation of a Negative Binomial r.v. is therefore E(X) = r q p Page 5

Expectation of a function of X Result: If X is a discrete random variable and g is a function from R to R, then E(g(X)) = x g(x)p(x = x) where the sum is taken over all possible values of X. Intuition: Whenever X = x, g(x) = g(x), so we can assign p(x) to g(x). An easy but illustrative example is g(x) = X 3 This is a very useful result, because it tells us we don t need the PMF of g(x) to find its expected value, and we are often interested in functions of random variables. Examples: expected revenues from the distribution of yields, earnings from a chance game... Page 6

Variance of a random variable Definition (variance and standard deviation): The variance of and r.v. X is Var(X) = E[(X EX) 2 ] The square root of the variance is called the standard deviation of X. Notice that by linearity we have E(X EX) = 0 SD(X) = Var(X) We can expand the above expression to rewrite the variance in a form that is often more convenient: Var(X) = E(X 2 ) (EX) 2 Page 7

Variance properties 1. Var(X) 0 with equality if and only if P(X = a) = 1 for some constant a. 2. Var(aX + b) = a 2 Var(X) for any constants a and b. It follows that Var(X) = Var( X) Proof: Var(aX + b) = E[(aX + b (aex + b)) 2 ] = E[(a(X EX)) 2 ] = a 2 E[(X EX) 2 ] = a 2 Var(X) 3. Var(X 1 + + X n ) = Var(X 1 ) + + Var(X n ) for independent random variables X 1,..., X n. Proof: Denote EX by µ. For n = 2, E(X 1 + X 2 ) = µ 1 + µ 2 and therefore Var(X 1 + X 2 ) = E[(X 1 + X 2 µ 1 µ 2 ) 2 ] = E[(X 1 µ 1 ) 2 + (X 2 µ 2 ) 2 + 2(X 1 µ 1 )(X 2 µ 2 )] Taking expectations, we get E[(X 1 µ 1 ) 2 + (X 2 µ 2 ) 2 + 2(X 1 µ 1 )(X 2 µ 2 )] = Var(X 1 ) + Var(X 2 ) + 2E[(X 1 µ 1 )(X 2 µ 2 )] But since X 1 and X 2 are independent, E[(X 1 µ 1 )(X 2 µ 2 )] = E(X 1 µ 1 )E(X 2 µ 2 ) = (µ 1 µ 1 )(µ 2 µ 2 ) = 0 It therefore follows that Var(X 1 + X 2 ) = Var(X 1 ) + Var(X 2 ) Using an induction argument, this can be established for any n Note that this result is only true with independent random variables Page 8

The Poisson distribution Definition (Poisson distribution): An r.v. X has the Poisson distribution with parameter λ > 0 if the PMF of X is P(X = k) = e λ λ k for k = 0, 1, 2,.... We write this as X Pois(λ). This is a valid PMF because the Taylor series 1 + λ + λ2 f(k) = e λ λ k = e λ e λ = 1. k As λ gets larger, the PMF becomes more bell-shaped. 2! + λ3 3! +... converges to e λ so Page 9

The Poisson mean and variance The expectation E(X) = e λ k λk = e λ k=1 k λk = λe λ The variance is also λ. To see this let s start with finding E(X 2 ): Since e λ λ k = 1, since this vanishes): Differentiate again to get k=1 λ k 1 (k 1)! = λe λ e λ = λ λ k = e λ. Now differentiate both sides w.r.t λ (and ignore the k = 0 term k=1 k λk 1 = e λ or k=1 k λk = λeλ k=1 k 2 λk 1 = e λ + λe λ or k=1 k 2 λk = eλ λ(1 + λ) So E(X 2 ) = e λ k=1 k 2 λk = λ(1 + λ) and Var(X) = λ(1 + λ) λ 2 = λ We ll see later that both these can be derived easily from the moment generating function of the Poisson. Page 10

Poisson additivity Result: If X Pois(λ 1 ) and Y Pois(λ 2 ) are independent, then X + Y Pois(λ 1 + λ 2 ) Proof: To get the PMF of X + Y, we use the law of total probability: P(X + Y = k) = = = = = k P(X + Y = k X = j)p(x = j) j=0 k P(Y = k j)p(x = j) j=0 k j=0 e λ 2 λ k j 2 (k j)! e (λ 1+λ 2 ) k j=0 e λ 1 λ j 1 j! ( ) k λ j 1 j λk j 2 e (λ 1+λ 2 ) (λ 1 + λ 2 ) k (using the binomial theorem) Page 11

The Poisson as a limiting distribution We can show that a binomial distribution with large n and small p can be approximated by a Poisson, which is computationally much easier. Useful result: e v = lim n (1 + v n )n We can rewrite the binomial density for non-zero values as f(x; n, p) = x (n i+1) i=1 x! p x (1 p) n x. If np = λ, we can subsitute for p by ( λn ) to get lim n f(x; n, p) = lim n = e λ λ x x! = lim n x (n i + 1) i=1 x! x (n i + 1) i=1 n x [ n (n 1) = lim n..... n n ( λ ) x ( 1 λ ) n x n n λ x x! ( 1 λ ) n ( 1 λ ) x n n (n x + 1) n λ x ( 1 λ ) n ( 1 λ ) x ] x! n n (using the above result and the property that the limit of a product is the product of the limits) Page 12

A Poisson example We have a 300 page novel with 1, 500 letters on each page. Typing errors are as likely to occur for one letter as for another, and the probability of such an error is given by p = 10 5. The total number of letters n = (300) (1500) = 450, 000 Using λ = np, the poisson distribution function gives us the probability of the number of errors being less than or equal to 10 as: P(x 10) 10 x=0 e 4.5 (4.5) x x! =.9933 Rules of Thumb: close to binomial probabilities when n 20 and p.05, excellent when n 100 and np 10. Page 13