23
STAT 430/510 Lecture 8 STAT 430/510 Probability Lecture 8: Variance, Bernoulli Distribution, Binomial Distribution Pengyuan (Penelope) Wang June 6, 2011

STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

STAT 430/510 ProbabilityLecture 8: Variance, Bernoulli Distribution,

Binomial Distribution

Pengyuan (Penelope) Wang

June 6, 2011

Page 2: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Review

Properties of ProbabilityDefinition of Random Variablepmf and cdf of Discrete Random VariablesExpected Value

Page 3: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Introduction

Expected value yields the weighted average of the possiblevalues of the random variable.Variance gives us the information on the variation orspread of these values.

Page 4: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Definition

If X is a random variable with expectation µ, then thevariance of X , denoted by Var(X ), is defined by

Var(X ) = E [(X − µ)2]

An alternative formula:

Var(X ) = E [X 2]− (E [X ])2

The square root of the Var(X ) is called the standarddeviation of X . Denote it by SD(X ), that is,

SD(X ) =√

Var(X )

Page 5: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Definition

If X is a random variable with expectation µ, then thevariance of X , denoted by Var(X ), is defined by

Var(X ) = E [(X − µ)2]

An alternative formula:

Var(X ) = E [X 2]− (E [X ])2

The square root of the Var(X ) is called the standarddeviation of X . Denote it by SD(X ), that is,

SD(X ) =√

Var(X )

Page 6: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Example

X represents the outcome when a fair die is rolled. FindVar(X ).

Var(X ) = 3512 .

Page 7: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Example

X represents the outcome when a fair die is rolled. FindVar(X ).Var(X ) = 35

12 .

Page 8: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Property of Variance

For any constant a and b,

Var(aX + b) = a2Var(X )

For any constant a and b,

SD(aX + b) = |a|SD(X )

Page 9: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Example

Assume that Var(X ) = 1. Calculate Var(7X + 2).Solution: Var(7X + 2) = 72Var(X ) = 49

Page 10: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Property of Variance - continued

For any constant a and b, and independent randomvariables X and Y ,

Var(aX + bY ) = a2Var(X ) + b2Var(Y )

For any constant a and b, and independent randomvariables X and Y ,

SD(aX + bY ) =√

a2Var(X ) + b2Var(Y )

Page 11: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Example

Assume that Var(X ) = 1, Var(Y ) = 2 and they areindependent. Calculate Var(2X − Y ).

Page 12: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Example

Suppose X is a random variable with expected value µ andstandard deviation σ, find the expected value and varianceof X−µ

σ .

It is a very important property. You’ll see it again when we getsto Normal Distribution.

Page 13: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Bernoulli Random Variable

Suppose that we make one trial, and the outcomes iseither success or failure. It is success with probability p,failure with probability q = 1− p.The indicator of the success, which means X = 1 if theoutcome is success and X = 0 if the outcome is failure , iscalled a Bernoulli random variable with success rate p.Example: Toss a coin once. Let X = 1 if the outcome ishead and X = 0 if the outcome is tail.

Page 14: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

pmf of Bernoulli Random Variable

The probability mass function of a Bernoulli randomvariable X is given by

p(0) = P(X = 0) = 1− pp(1) = P(X = 1) = p

where p, 0 ≤ p ≤ 1, is the probability that the trial issuccess.

Page 15: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Relationship with Binomial Distribution

There are 10 bulbs, each of them would function withprobability 0.9.Thus each bulb leads to a Bernoulli random variable withsuccess rate 0.9.Let X be the total number of bulbs that function.⇒ Binomial Distribution.

Page 16: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Relationship with Geometric Distribution

There are infinite bulbs, each of them would function withprobability 0.9.I keep drawing bulbs until I get a good one. Let Y be thenumber of bulbs I need to draw.⇒ Geometric Distribution.

Page 17: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Binomial Experiment

A Binomial experiment consists of n Bernoulli trials:

n trials with n fixed in advance.Each trial has two possible outcomes, "success" (S) and"failure" (F).The probability of success, p, is constant from one trial tothe next.The trials are independent, the outcome of each trial isindependent of the outcome of other trials.

Then the total number of successes (denoted by X ) inthose n trials is a Binomial random variable. We can writesuch distribution as X ∼ Bin(n,p).

Page 18: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Example

The experiment: Randomly draw 15 balls with replacementfrom an urn containing 10 red balls and 20 black balls.Use X to denote the number of red balls.This is a binomial experiment with p = 1/3.X ∼ Bin(15,1/3).

Would it still be a binomial experiment if the balls weredrawn without replacement?

Page 19: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Binomial Distribution

For X ∼ Bin(n,p), for i = 0,1,2, · · · ,n, the pmf is

P(X = i) =(

ni

)pi(1− p)n−i

For X ∼ Bin(n,p), for i = 0,1,2, · · · ,n, the cdf is

P(X ≤ i) =i∑

k=0

P(X = k)

Page 20: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Example

What is the probability of getting 4 or more heads in 6tosses of a fair coin?

Page 21: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Expected Value and Variance

For a binomial random variable X with parameters n and p,E [X ] = npVar(X ) = np(1− p)

Page 22: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Example

There are 10 bulbs, each of them would function withprobability 0.9.Let X be the total number of bulbs that function. What isE(X ) and Var(X )?What is E(X 2)?

Page 23: STAT 430/510 Probability Lecture 8: Variance, Bernoulli ...stat.wharton.upenn.edu/~pengyuan/stat430/notes/Lecturenote8.pdf · Lecture 8: Variance, Bernoulli Distribution, Binomial

STAT 430/510 Lecture 8

Last Example

What is the chance that among 5 families, each with 3children, exactly 4 of the families have 2 or more boys?Assuming boys and girls are equally likely. Assuming thesexes of children are independent. Assuming the familiesare independent.