chapter 3 discrete random variables - amazon...

29
MICHIGAN STATE UNIVERSITY STT 351 SECTION 2 FALL 2008 LECTURE NOTES Chapter 3 Discrete Random Variables Nao Mimoto Contents 1 Random Variables 2 2 Probability Distributions for Discrete Variables 3 3 Expected Values and Variance 10 4 Popular Discrete Random Variables 13 4.1 Bernoulli Random Variable ........................... 14 4.2 Binomial Random Variable ........................... 15 4.3 Geometric Random Variable .......................... 21 4.4 Negative Binomial Random Variable ..................... 22 4.5 Hypergeometric Random Variable ....................... 23 4.6 Poisson Random Variable ........................... 26 1

Upload: vutram

Post on 10-Jun-2018

245 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

MICHIGAN STATE UNIVERSITY

STT 351 SECTION 2 FALL 2008 LECTURE NOTES

Chapter 3

Discrete Random Variables

Nao Mimoto

Contents

1 Random Variables 2

2 Probability Distributions for Discrete Variables 3

3 Expected Values and Variance 10

4 Popular Discrete Random Variables 13

4.1 Bernoulli Random Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4.2 Binomial Random Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.3 Geometric Random Variable . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.4 Negative Binomial Random Variable . . . . . . . . . . . . . . . . . . . . . 22

4.5 Hypergeometric Random Variable . . . . . . . . . . . . . . . . . . . . . . . 23

4.6 Poisson Random Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

1

Page 2: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 2

1 Random Variables

Random Variable is a function whose domain is a sample space, and whose range is

a real numbers.

Example

Roll a die once. Let a random variable X to be a number on the die.

S = {1, 2, 3, 4, 5, 6}

The the function X is mapping

1 → 1

2 → 2

3 → 3

4 → 4

5 → 5

6 → 6

Example

Roll a die twice. Let a random variable X to be the sum of two numbers.

S = { (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6)

(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6)

(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6)

(4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6)

(5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6)

(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6) }

The the function X is mapping

(1, 2) → 3

(3, 3) → 6

(4, 5) → 9

(2, 2) → 4...

Page 3: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 3

Discrete Random Variable is a r.v. whose range is a finite or countably infinite set.

Continuous Variable is a r.v. whose range is a interval on a real line or a disjoint

union of such intervals. It also must satisfy that for any constant c, P (X = c) = 0.

Exercise 1

A concrete beam may fail either by shear(S) or flexure (F). Suppose three of failed beams

are randomly selected, and the type of failure is determined for each one. Let X be the

number of beams among the three selected that failed by shear. List each outcome in the

sample space, along with the associated value of X.

S X

(F, F, F ) → 0

(F, F, S) → 1

(F, S, S) → 2

(S, S, S) → 3

2 Probability Distributions for Discrete Variables

Probability Mass Function: (pmf) or probability distribution of a discrete random

variable Xis defined as

p(x) = P (X = x)

If x1, x2, x3, . . . represent the range of random variable X, then

p(xi) ≥ 0 for i = 1, 2, 3, . . .

p(x) ≥ 0 for all other values of x∑∞i=1 p(xi) = 1

Page 4: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 4

Example

Roll a die once. Let a random variable X to be a number on the die. The pmf of X is

p(1) = P (X = 1) = 1/6

p(2) = P (X = 2) = 1/6

p(3) = P (X = 3) = 1/6

p(4) = P (X = 4) = 1/6

p(5) = P (X = 5) = 1/6

p(6) = P (X = 6) = 1/6

Page 5: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 5

Example

Roll a die twice. Let a random variable X to be the sum of two numbers.

S = { (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6)

(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6)

(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6)

(4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6)

(5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6)

(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6) }

The pmf of X is

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

p(2) = P (X = 2) = 1/36

p(3) = P (X = 3) = 2/36

p(4) = P (X = 4) = 3/36

p(5) = P (X = 5) = 4/36

p(6) = P (X = 6) = 5/36

p(7) = P (X = 7) = 6/36

p(8) = P (X = 8) = 5/36

p(9) = P (X = 9) = 4/36

p(10) = P (X = 10) = 3/36

p(11) = P (X = 11) = 2/36

p(12) = P (X = 12) = 1/36

p(13) = P (X = 13) = 0

Page 6: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 6

Cumulative Distribution Function: (cdf) of a discrete random variable X with pmf

p(x) is defined for all x on real line by

F (x) = P (X ≤ x) =∑

y:y≤x

p(y)

For any number x, F (x) is the probability that the observed value of X will be at most

x.

Example

Roll a die once. Let a random variable X to be a number on the die. The cdf of X is

F (1) = P (X ≤ 1) = 1/6

F (2) = P (X ≤ 2) = 2/6

F (3) = P (X ≤ 3) = 3/6

F (4) = P (X ≤ 4) = 4/6

F (5) = P (X ≤ 5) = 5/6

F (6) = P (X ≤ 6) = 6/6

Example

Roll a die twice. Let a random variable X to be the sum of two numbers. The cdf of X is

F (1) = P (X ≤ 1) = 0

F (2) = P (X ≤ 2) = 1/36

F (3) = P (X ≤ 3) = 3/36

F (4) = P (X ≤ 4) = 6/36

F (5) = P (X ≤ 5) = 10/36

F (6) = P (X ≤ 6) = 15/36

F (7) = P (X ≤ 7) = 21/36

F (8) = P (X ≤ 8) = 26/36

F (9) = P (X ≤ 9) = 30/36

F (10) = P (X ≤ 10) = 33/36

F (11) = P (X ≤ 11) = 35/36

F (12) = P (X ≤ 12) = 36/36

F (13) = P (X ≤ 13) = 36/36

Page 7: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 7

pmf

cdf �

If X is a discrete random variable, then

P (a ≤ X ≤ b) = P (X ≤ b)− P (X ≤ a)

= F (b)− F (a)

For example,

P (3 ≤ X ≤ 5) = F (5)− F (2)

Page 8: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 8

Exercises 13

A mail-order sales business have six telephone lines. Let X denote the number of lines in

use at a specified time. Suppose the pmf of X is as follows:

x 0 1 2 3 4 5 6

p(x) .1 .15 .2 .25 .2 .06 .04

Calculate the each of following probabilities:

a P{ at most three lines are in use}

= P (X ≤ 3) = (.1) + (.15) + (.2) + (.25) = .7

b P{ fewer than three lines are in use}

= P (X < 3) = (.1) + (.15) + (.2) = .45

c P{ at least three lines are in use }

= P (X ≥ 3) = 1− P (X ≤ 2) = 1− .45 = .55

d P{ between two and five lines, inclusive, are in use}

= P (2 ≤ X ≤ 5) = (.2) + (.25) + (.2) + (.06) = .71

e P{ between two and four lines, inclusive, are not in use}

= P (2 ≤ X ≤ 4) = (.2) + (.25) + (.2)+ = .65

f P{ at least four lines are not in use}

= P (X ≤ 2) = (.1) + (.15) = .25

Page 9: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 9

Exercises 23

Given

F (x) =

0 x < 0 P (X ≤ 0)

.06 0 ≤ x < 1 P (X ≤ 1)

.19 1 ≤ x < 2 P (X ≤ 2)

.39 2 ≤ x < 3 P (X ≤ 3)

.67 3 ≤ x < 4 P (X ≤ 4)

.92 4 ≤ x < 5 P (X ≤ 5)

.97 5 ≤ x < 6 P (X ≤ 6)

.1 6 ≤ x < 7 P (X ≤ 7)

Calculate

a p(2)

= P (X = 2) = F (2)− F (1) = .39− .19 = .2

b P (X > 3)

= 1− P (X ≤ 3) = 1− F (3) = 1− .39 = .61

c P (2 ≤ X ≤ 5)

= P (X ≤ 5)− P (X ≤ 2) = F (5)− F (1) = .97− .19 = .78

d P (2 < X < 5)

= P (X < 5)− P (X < 2) = F (4)− F (2) = .92− .39 = .53

Page 10: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 10

3 Expected Values and Variance

Expected Value of a random variable X, whose range is x1, x2, x3, . . . xn is defined as

E(X) = µ =n∑

i=1

xi · p(xi)

Example

Roll a die once. Let a random variable X to be a number on the die. Then the expected

value of X is

E(X) = 1 · 1

6+ 2 · 1

6+ 3 · 1

6+ 4 · 1

6+ 5 · 1

6+ 6 · 1

6= 3.5

Example

Roll a die twice. Let a random variable Y to be the sum of two numbers. Then,

E(Y ) = 2 · 1

36+ 3 · 2

36+ 4 · 3

36+ 5 · 4

36+ 6 · 5

36

+7 · 6

36+ 8 · 5

36+ 9 · 4

36+ 10 · 3

36+ 11 · 2

36+ 12 · 1

36= 7

Expected Value of a function of random variable X, say g(X) is defined as

E(g(X)

)=

n∑i=1

g(xi) · p(xi)

Example

Let a random variable X to be a number of the rolled die. Then

E(X2) = 12 · 1

6+ 22 · 1

6+ 32 · 1

6+ 42 · 1

6+ 52 · 1

6+ 62 · 1

6= 15.16667

E( 1

X

)= 1/1 · 1

6+ 1/2 · 1

6+ 1/3 · 1

6+ 1/4 · 1

6+ 1/5 · 1

6+ 1/6 · 1

6= 0.40833

Note that they are not equal to(E(X)

)2and 1/E(x).

Page 11: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 11

E(3X + 5) = (3 · 1 + 5) · 1

6+ (3 · 2 + 5) · 1

6+ (3 · 3 + 5) · 1

6

+(3 · 4 + 5) · 1

6+ (3 · 5 + 5) · 1

6+ (3 · 6 + 5) · 1

6= 15.5

Note that it is equal to 3E(X) + 5. �

Property 1 If a and b are constants, then

E(aX + b) = aE(X) + b

Variance of a random variable X is defined as

V (X) = σ2 =n∑

i=1

(xi − µ)2 · p(xi) = E(X −E(X)

)2.

Note that µ = E(X). Standard Deviation of X is defined as

σ =√

σ2.

An alternate formula for a variance of a random variable X can be derived as follows:

σ2 =n∑

i=1

(xi − µ)2 · p(xi)

=n∑

i=1

(x2i − 2xiµ + µ2) · p(xi)

=n∑

i=1

x2i · p(xi)−

n∑i=1

2xiµ · p(xi) +n∑

i=1

µ2 · p(xi)

= E(X2)− 2µn∑

i=1

xi · p(xi)︸ ︷︷ ︸µ

+µ2

n∑i=1

p(xi)︸ ︷︷ ︸1

= E(X2)− µ2

= E(X2)−(E(X)

)2

Page 12: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 12

Property 1 If a and b are constants, then

V (aX + b) = a2V (X)

Example

Let a random variable X to be a number of the rolled die. Then

V (X) = (1−3.5)2·16+(2−3.5)2·1

6+(3−3.5)2·1

6+(4−3.5)2·1

6+(5−3.5)2·1

6+(6−3.5)2·1

6= 2.9167

You could have gotten this by the alternative formula;

V (X) = E(X2)− (E(X))2 = 15.16667− (3.5)2 = 2.9167.

Exercise 30

An individual who has auto insurance from a company A is randomly selected. Let Y

be the number of moving violations for which the individual was cited during the last 3

years. The pdf of Y is

y 0 1 2 3

p(y) .60 .25 .10 .05

a Compute E(Y ).

E(Y ) = 0(.6) + 1(.25) + 2(.1) + 3(.05) = .6.

b Suppose an individual with Y violations incurs a surcharge of $100Y 2. Calculate

the expected amount of the surcharge.

E(100Y 2) = 100(02(.6) + 12(.25) + 22(.1) + 32(.05)

)= 110.

Page 13: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 13

4 Popular Discrete Random Variables

If you have a coin which has probability p of landing head up when tossed, then,

Bernoulli(p) Toss a coin once. 1 if head, 0 if tail.

Binomial(p, n) Number of heads in n tosses

Geometric(p, n) Number of tosses until you get the first head

Negative Binomal(p, r) Number of tails until you get r heads

Other type of discrete random variables includes:

Hypergeometric(n,N, m) Number of white balls if n balls selected

from an urn with N balls which includes m whites.

Poisson(λ) Rare event with rate λ per unit time.

Page 14: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 14

4.1 Bernoulli Random Variable

Analogy: Toss a coin once. 1 if head, 0 if tail.

pmf of Bernoulli(p) is {p(X = 0) = (1− p)

p(X = 1) = p

pmf for Bernoulli(p) looks like

Does it add up?

1∑x=0

p(X = x) = p + (1− p)

= 1

Mean

If r.v. X has Bernoulli(p) distribution, then

E(X) =n∑

i=1

xi · p(xi) = (1)p + (0)(1− p) = p.

Variance

If r.v. X has Bernoulli(p) distribution, then

E(X2) =n∑

i=1

x2i · p(xi) = (12)p + (02)(1− p) = p.

Therefore,

V (X) = E(X2)−(E(X)

)2

= p− p2 = p(1− p)

Page 15: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 15

4.2 Binomial Random Variable

Analogy: Number of heads in n tosses.

pmf of Binomial(n, p) is{b(X = x) =

(nx

)(1− p)n−xpx for x = 0, 1, 2, . . . n

0 otherwise

pmf for Binomial(6, .5) looks like this

pmf for Binomial(10, .2) looks like this

Page 16: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 16

cdf of Binomial(n, p) is

B(x) =x∑

y=0

(n

y

)(1− p)n−ypy.

Does it add up?

If you sum the pmf,

1∑x=0

p(X = x) =n∑

i=1

p(xi)

=n∑

x=0

(n

x

)(1− p)n−xpx

=(p + (1− p)

)n

= 1.

Mean

If r.v. X has Binomial(n, p) distribution, then

E(X) =n∑

i=1

xi · p(xi) =n∑

x=0

x

(n

x

)(1− p)n−xpx

=n∑

x=1

x

(n

x

)(1− p)n−xpx

=n∑

x=1

n

(n− 1

x− 1

)(1− p)n−xpx

by using the identity

x

(n

x

)=

xn!

(n− x)!x!=

n(n− 1)!

(n− x)!(x− 1)!= n

(n− 1

x− 1

),

for x = 1, 2, 3, . . . n. Then we have

E(X) =n∑

x=1

n

(n− 1

x− 1

)(1− p)n−xpx

= n

n∑j=0

(n− 1

j

)(1− p)n−j−1pj︸ ︷︷ ︸

pmf of Bin(n-1, p)

p

= np

Page 17: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 17

Variance

If r.v. X has Binomial(n, p) distribution, then

E(X2) =n∑

x=0

x2

(n

x

)(1− p)n−xpx

=n∑

x=1

x2

(n

x

)(1− p)n−xpx

=n∑

x=1

xn

(n− 1

x− 1

)(1− p)n−xpx

by again using the identity

x

(n

x

)= n

(n− 1

x− 1

),

for x = 1, 2, 3, . . . n. By changing the index to j = x− 1, we have

E(X) = nn∑

j=0

(j + 1)

(n− 1

j

)(1− p)n−j−1pj︸ ︷︷ ︸

pmf of Bin(n-1, p)

p

= np ·E(Y + 1)

where Y is a r.v. with Bin(n− 1, p) distribution. Since E(Y + 1) = E(Y ) + 1, we have

E(X2) = n((n− 1)p + 1

)Therefore,

V (X) = E(X2)−(E(X)

)2

= n((n− 1)p + 1

)− (np)2

= np(1− p)

Page 18: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 18

Exercise 47

Use Appendix Table A.1 to obtain the followings:

a B(4; 15, .3)

= .515

b b(4; 15, .3)

= B(4; 15, .3)−B(3; 15, .3) = .515− .297

c b(6; 15, .7)

= B(6; 15, .7)−B(5; 15, .7) = .015− .004 = .09

d P (2 ≤ X ≤ 4) when X ∼ Bin(15,.3)

= B(4; 15, .3)−B(1; 15, .3) = .515− .035 = .480

e P (2 ≤ X when X ∼ Bin(15,.3)

= 1− P (X < 2) = 1−B(1; 15, .3) = 1− .035 = .965

f P (X ≤ 1) when X ∼ Bin(15,.7)

= B(1, 15, .7) = .000

g P (2 < X < 6) when X ∼ Bin(15,.3)

= B(5; 15, .3)−B(2; 15, .3) = .722− .127 = .595

Exercise 49

A company that produces fine crystal knows from experience that 10% of its goblets have

cosmetic flaws and must be classified as “seconds”.

a Among six randomly selected goblets, how likely is it that only one is a second?

This is Binomial(6, .1). So answer is

b(1; 6, .1) =

(6

1

)(.9)5(.1) = 0.354

Page 19: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 19

b Among six randomly selected goblets, what is the probability that at least two are

seconds?

= 1− P ( one is second) = 1− b(1; 6, .1) = .646

Exercise 58

A very large batch of components has arrived at a distributor. The batch can be char-

acterized as acceptable only if the proportion of defective components is at most .1. The

distributor decides to randomly select 10 samples from the batch, and accept the batch

only if the number of defective components is the sample is at most 2.

a What is the probability that the batch will be accepted when the actual proportion

of defectives is .01? .05? .1? .2? .25?

b Sketch operating characteristic curve.

This problem can be modeled by Binomial(10, .1). So the probability of accepting

the batch is P (X ≤ 2) = B(2; 10, .1) = .930 If actual proportion of defectives are

different, then

B(2; 10, .01) = 1

B(2; 10, .05) = .988

B(2; 10, .1) = .930

B(2; 10, .2) = .678

B(2; 10, .25) = .526

Page 20: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 20

c Repeat the analysis with new rule of accepting the batch only if less than 1 out of

10 sample is defective.

B(1; 10, .01) = .996

B(1; 10, .05) = .914

B(1; 10, .1) = .736

B(1; 10, .2) = .376

B(1; 10, .25) = .244

d Repeat the analysis with new rule of accepting the batch only if less than 2 out of

15 sample is defective.

B(2; 15, .01) = 1

B(2; 15, .05) = .964

B(2; 15, .1) = .816

B(2; 15, .2) = .398

B(2; 15, .25) = .236

Page 21: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 21

4.3 Geometric Random Variable

Analogy: Number of tosses until you get the first head.

pmf of Geometric(p) is

p(X = x) = (1− p)x−1p for x = 1, 2, . . .

pmf for Geometric(.5) looks like

Does it add up?

∞∑x=1

p(X = x) =∞∑

x=1

(1− p)xp

= p∞∑

x=1

(1− p)x−1

= p∞∑

j=0

(1− p)j

= p · 1

1− (1− p)= 1

Mean

If r.v. X has Geometric(n, p) distribution, then

E(X) =1

p

Page 22: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 22

Variance

If r.v. X has Geometric(n, p) distribution, then

V (X) =1− p

p2

4.4 Negative Binomial Random Variable

Analogy: Number of tails until you get r heads.

pmf of Negativebinomial(r, p)

p(X = x) = nb(x; r, p) =(

x+r−1r−1

)(1− p)xpr for x = 0, 1, 2, . . .

pmf for Negativebinomial(3, .5) looks like

Mean

If r.v. X has Negativebinomial(r, p) distribution, then

E(X) =r

p

Page 23: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 23

Variance

If r.v. X has Negativebinomial(r, p) distribution, then

V (X) =r(1− p)

p2

4.5 Hypergeometric Random Variable

Analogy: Number of white balls if n balls selected from an urn with N balls which

includes m whites.

Pmf of Hypergeometric(n, m,N) is

p(X = x) = h(x; n, M, N) =

(mx

)(N−mn−x

)(Nn

)for max(0, n−N + m) ≤ x ≤ min(n,m), and 0 otherwise. pmf for Hypergeometric(10, 10, 30)

looks like

Mean

If r.v. X has Hypergeometric(n, m,N) distribution, then

E(X) =nm

N

Page 24: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 24

Variance

If r.v. X has Hypergeometric(n, m,N) distribution, then

V (X) =N − n

N − 1n

m

N

(1− m

N

)�

Exercise 49

A company that produces fine crystal knows from experience that 10% of its goblets have

cosmetic flaws and must be classified as “seconds”.

c If goblets are examined one by one, what is the probability that at most five must

be selected to find four that are not seconds?

The number of “seconds” examined until four non-seconds is Negativebinomial(4,

.9) distribution. Therefore, the answer is

P (X ≤ 1) = p(0) + p(1)

Page 25: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 25

Exercise 71

A geologist has collected 10 specimens of basaltic rock and 10 specimens of granite.

The geologist instructs a laboratory assistant to randomly select 15 of the specimen for

analysis.

a What is the pmf of the number of granite specimen selected for analysis.

b What is the probability hat all specimens of one of the two types of rock are selected

for analysis.

c What is the probability that the number of granite specimens selected for analysis

is within 1 standard deviation of its mean value?

So if you let X to be the number of granite specimen selected, then X is Hypergeo-

metric(15, 10, 20). Therefore,

b

P(( all are basaltic ) ∪ ( all are granite)

)= P (( all are basaltic ) + P ( all are basaltic )

−P(( all are basaltic ) ∩ ( all are granite)

)= P (X = 0) + P (X = 15)

= h(0; 15, 10, 20) + h(15; 15, 10, 20)

c SD for Hypergeometric(15, 20, 10) is

σ =

√N − n

N − 1n

m

N

(1− m

N

)=

√20− 15

20− 115

10

20

(1− 10

20

)=

√5

19

15

4

Page 26: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 26

4.6 Poisson Random Variable

Analogy: Rare event with rate λ per unit time.

pmf of Poisson(λ) is

p(X = x) = e−λλx

x!for x = 0, 1, 2, . . .

pmf for Poisson(λ) looks like

Does it add up?

∞∑x=0

p(x) =∞∑

x=0

e−λλx

x!

= e−λ

∞∑x=0

λx

x!

= e−λeλ

= 1.

Using the identity

ex = 1 + x +x2

2!+

x3

3!+

x4

4!+ · · ·

Page 27: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 27

Mean

If r.v. X has Poisson(λ) distribution, then

E(X) =∞∑

x=0

xe−λλx

x!

= λ

∞∑x=1

e−λλx−1

(x− 1)!

= λ

∞∑j=0

e−λλj

j!︸ ︷︷ ︸ by changing index to j = x-1

= λ

Variance

If r.v. X has Poisson(λ) distribution, then

E(X2) =∞∑

x=0

x2 e−λλx

x!

= λ∞∑

x=1

xe−λλx−1

(x− 1)!

= λ∞∑

j=0

(j + 1)e−λλj

j!by changing index to j = x-1

= λ

( ∞∑j=0

je−λλj

j!︸ ︷︷ ︸E(X)

+∞∑

j=0

e−λλj

j!

)

= λ(λ + 1)

Therefore,

V (X) = E(X2)−(E(X)

)2

= λ(λ + 1)− λ2

= λ.

Poisson as a limit

If we let n →∞, p → 0, in such a way that np → λ, then the pmf

b(x; n, p) → p(x; λ).

Page 28: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 28

Exercise 80

Suppose the number X of tornadoes observed in a particular region during a 1-year period

has a Poisson distribution with λ = 8.

a Compute P (X ≤ 5)

= p(0; 8) + p(1; 8) + p(2; 8) + p(3; 8) + p(4; 8) + p(5; 8).

c What is the probability that the observed number of tornadoes exceeds the expected

number by more than 1 standard deviation?

Mean an SD for Poisson(8) is 8 and√

8 = 2.83. So the answer is

P (X > 10.83) = P (X > 11) = 1− P (X ≤ 10).

Exercise 88

If proof testing of circuit boards, the probability that an particular diode will fail is .01.

Suppose a circuit board contains 200 diodes.

a How many diodes would you expect to fail, and what is the standard deviation of

the number that are expected to fail?

Here we have Binomial(200, .01), which can be approximated by Poisson(200 ×.01). Therefore, expected value is 2, and standard deviation is

√2.

b What is the approximate probability that at least four diodes will fail on a randomly

selected board?

Since we are looking at Poisson(2),

P ( at least 4) = 1− P (X ≤ 3) = 1− .857 = .143

from the table A.2.

Page 29: Chapter 3 Discrete Random Variables - Amazon S3s3.amazonaws.com/cramster-resource/29713_STT351_Ch3.pdf · 2009-07-05 · Chapter 3 Discrete Random Variables Nao Mimoto Contents 1

Lecture notes for Devore 7ed. Chapter 3 29

c If five boards are shipped to a particular customer, how likely is it that at least four

of them will work properly?

Board will work only if all of 200 diodes works. Then

P ( Board will work) = P (X = 0) = .135

Now each board will work with probability of .135, Choosing five board and see how

many of them work is like Binomial(5, .135). Therefore,

P ( at least four boards work) = b(4; 5, .135) + b(5; 5, .135) = 0.00418