math 3680 lecture #4 discrete random variables

30
Math 3680 Lecture #4 Discrete Random Variables

Upload: lael

Post on 07-Jan-2016

55 views

Category:

Documents


3 download

DESCRIPTION

Math 3680 Lecture #4 Discrete Random Variables. Let X denote the number of spots that appear when a fair die is thrown. Then we would expect that f X (1) = P( X = 1) = 1/6 f X (2) = P( X = 2) = 1/6 f X (3) = P( X = 3) = 1/6 f X (4) = P( X = 4) = 1/6 f X (5) = P( X = 5) = 1/6 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Math 3680 Lecture #4 Discrete Random Variables

Math 3680

Lecture #4

Discrete RandomVariables

Page 2: Math 3680 Lecture #4 Discrete Random Variables

Let X denote the number of spots that appear when a fair die is thrown. Then we would expect that

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

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

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

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

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

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

The variable X is called a random variable. In this case, X is discrete (as opposed to continuous). The function f is called the probability mass function.

Page 3: Math 3680 Lecture #4 Discrete Random Variables

Example: A fair die is rolled once. If it lands six, you win $4. Otherwise, you lose $1. Let M denote the amount of money you win. Find the distribution of M.

Note: To specify a distribution, you must list

– The possible values (the range), and– The probabilities associated with each value.

Page 4: Math 3680 Lecture #4 Discrete Random Variables

Probability distributions may be graphically represented by probability histograms.

This time, the area of each rectangle represents a probability instead of a frequency.

Page 5: Math 3680 Lecture #4 Discrete Random Variables

Definition: EXPECTED VALUE:

Example:

a)Compute E(X) and E(M), where X and M were defined earlier.

b)How does the expected value relate to the histograms presented earlier?

 

)()( jj

j xfxXE

Page 6: Math 3680 Lecture #4 Discrete Random Variables

Let’s recall some sixth-grade observations about the average of x1, x2, …, xn.

1) If xk = c for each k, then = c.

• E(c) = c

2) If yk = c xk, then

• E( c X ) = c E( X )

x

Page 7: Math 3680 Lecture #4 Discrete Random Variables

Let’s recall some sixth-grade observations about the average of x1, x2, …, xn.

3) If zk = xk + yk , then

• E( X + Y ) = E( X ) + E ( Y )

x

.yxz

Page 8: Math 3680 Lecture #4 Discrete Random Variables

Let’s recall some sixth-grade observations about the average of x1, x2, …, xn.

• If zk = xk yk , then usually For example, take xk = k and yk = k for k = 1, 2, 3:

•Warning! In general, E( X Y ) ≠ E( X ) . E ( Y ).

x

.yxz

Page 9: Math 3680 Lecture #4 Discrete Random Variables

Definition. VARIANCE AND SD:

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

SD( X ) = √Var( X )

Notice that these definitions are analogous to those seen earlier with data sets. As before, SD( X ) measures the spread of a distribution.

 

Page 10: Math 3680 Lecture #4 Discrete Random Variables

SHORT-CUT formula:

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

PROOF.

 

Page 11: Math 3680 Lecture #4 Discrete Random Variables

Example.

a)Compute SD(X) and SD(M), where X and M were defined earlier.

b)How do these values relate to the respective histograms?  

Page 12: Math 3680 Lecture #4 Discrete Random Variables

THEOREM. (Scaling and shifting) If a and b are real constants and X is a random variable, then

Var( a X + b ) = a2 Var( X )

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

Did we observe this property with data sets?

 

Page 13: Math 3680 Lecture #4 Discrete Random Variables

PROOF.

 

Page 14: Math 3680 Lecture #4 Discrete Random Variables

The Binomial Distribution

Page 15: Math 3680 Lecture #4 Discrete Random Variables

Certain probabilities bear a resemblance to each other. Consider the following questions, which are all examples of binomial experiments:

Example 1: A parolee has a 24% chance of becoming a repeat offender, independent of other parolees. What is the chance that exactly two of five parolees will become repeat offenders?

Example 2: A roulette wheel is spun 20 times. What is the chance that the ball will land in a black slot at least 11 times?

Example 3: A fair coin is flipped 400 times. What is the probability that it will land heads 220 times or more?

Page 16: Math 3680 Lecture #4 Discrete Random Variables

When to use the binomial distribution:

1. There are a fixed number of trials. We call this number n.

2. The trials are independent and are repeated under identical conditions.

3. Each trial has only two possible outcomes – success (S) or failure (F)

4. Each trial has the same probability of success. We denote the probability of success by

5. The central problem is to find the probability of r successes out of n trials.

Page 17: Math 3680 Lecture #4 Discrete Random Variables

Example #1: Parolees

1. n = 5

2. Independence is assumed for the parolees.

3. S = becomes a repeat offender

F = does not become a repeat offender

4. = 0.24

5. We seek the probability of 2 successes out of 5 trials.

Page 18: Math 3680 Lecture #4 Discrete Random Variables

Example #2: Roulette

1. n = 20

2. We assume that the wheel is not rigged

3. S = lands black

F = does not land black

4.

5. We seek the probability of at least 11 successes out of 20 independent trials.

3818

Page 19: Math 3680 Lecture #4 Discrete Random Variables

Example #3: Coin Flips

1. n = 400

2. We assume the coin is fair.

3. S = heads

F = tails

4.

5. We seek the probability of at least 220 successes out of 400 independent trials.

21

Page 20: Math 3680 Lecture #4 Discrete Random Variables

Example: Explain why the following are NOT binomial experiments.

 

a)A company manager has ten employees – six females, four males. Two are selected at random to attend a conference. What is the probability that both are females?

b)The students in this class are asked, "What is your favorite TV show?"

Page 21: Math 3680 Lecture #4 Discrete Random Variables

The Binomial Formula – Derivation

Example: A student takes a multiple-choice exam, where each question has five possible answers. At the end of the exam, she answers all questions except for three, for which she picks answers randomly.

What is the probability that she got all three questions correct? Two of the three correct? One of the three correct? None of the guesses correct?

Page 22: Math 3680 Lecture #4 Discrete Random Variables

Solution: Notice that this is a binomial experiment:

 

1. There are three trials – questions to answer. So n = 3.

2. The trials are independent.

3. S = correct answer

F = incorrect answer

4. For each trial, π = 1/5 = 0.2

5. The central problem is determining the probability of 0, 1, 2, or 3 successes.

Page 23: Math 3680 Lecture #4 Discrete Random Variables

Method #1: Calculate each possible outcome individually and compute appropriately.

 

First, notice there are eight possible outcomes:

FFFFFSFSFFSS

SFFSFSSSFSSS

Page 24: Math 3680 Lecture #4 Discrete Random Variables

Next, find the probabilities of each of these.

P(SSS) = P(S)P(S)P(S) = 3 = (0.2)3 = 0.008 3

P(SSF) = P(S)P(S)P(F) = 2 (1- = (0.2)2(0.8) = 0.032 2

P(SFS) = P(S)P(F)P(S) = 2 (1- = (0.2)2(0.8) = 0.032 2

P(SFF) = P(S)P(F)P(F) = (1-2 = (0.2) (0.8)2 = 0.128 1

P(FSS) = P(F)P(S)P(S) = 2 (1- = (0.2)2(0.8) = 0.032 2

P(FSF) = P(F)P(S)P(F) = (1-2 = (0.2) (0.8)2 = 0.128 1

P(FFS) = P(F)P(F)P(S) = (1-2 = (0.2) (0.8)2 = 0.128 1

P(FFF) = P(F)P(F)P(F) = (1-3 = (0.8)3 = 0.512 0

Page 25: Math 3680 Lecture #4 Discrete Random Variables

P(SFF or FSF or FFS)

P(FFF)

P(SSS) P(3)

P(SFF) + P(FSF) + P(FFS)

P(1)

P(0)

P(SSF or SFS or FSS)

P(SSF) + P(SFS) + P(FSS)

P(2)

Page 26: Math 3680 Lecture #4 Discrete Random Variables

The Binomial Distribution – If R denotes the number of successes in a binomial experiment of n trials, then we say R ~ Binomial(n, ):

for r = 0, 1, 2, …, n. For other values of r, fR(r) = 0.

r-nr(1 - )rn

fR(r)

r)!-(nr!n!

binomial coefficient rn

1 - probability of success

probability of failure

Page 27: Math 3680 Lecture #4 Discrete Random Variables

233!

Definition: Factorial. The factorial n!, where n is a positive integer, is defined by:

123 2)-(n1)-(nn

n!

Example:

0!

1 = 11!

1 = 12023455!

1 = 242344!

1 = 6

1 = 22 2!

Page 28: Math 3680 Lecture #4 Discrete Random Variables

Most calculators have a key for computing

You can also use either the formula or Pascal’s triangle. However, even if your calculator doesn’t, you can find these with a little multiplication and division:

r

n

Page 29: Math 3680 Lecture #4 Discrete Random Variables

2

13

1

3

0

3

1012123

12345

!2!3

!5

)!35(!3

!5

3

5

Page 30: Math 3680 Lecture #4 Discrete Random Variables

Note: There is no such thing as

-- you can’t have 4 successes in 3 trials.

100

3

4

3or