math 3680 lecture #4 discrete random variables

Post on 07-Jan-2016

55 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

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

Math 3680

Lecture #4

Discrete RandomVariables

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.

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.

Probability distributions may be graphically represented by probability histograms.

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

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

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

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

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

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.

 

SHORT-CUT formula:

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

PROOF.

 

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?  

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?

 

PROOF.

 

The Binomial Distribution

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?

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.

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.

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

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

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?"

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?

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.

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

 

First, notice there are eight possible outcomes:

FFFFFSFSFFSS

SFFSFSSSFSSS

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

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)

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

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!

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

2

13

1

3

0

3

1012123

12345

!2!3

!5

)!35(!3

!5

3

5

Note: There is no such thing as

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

100

3

4

3or

top related