381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson...

17
38 1 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

Transcript of 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson...

Page 1: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Discrete Probability Distributions (The Binomial Distribution)

QSCI 381 – Lecture 13(Larson and Farber, Sect 4.2)

Page 2: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Binomial Experiments-I Binomial experiments are those for which the

outcome from each trial is one of only two options (“success” or “failure”). The properties of a binomial experiment are:

1. The experiment is repeated for a fixed number of trials, where each trial is independent of all the others.

2. There are only two possible outcomes for each trial. The outcomes can be classified as a success (S) or a failure (F).

3. The probability of success is the same for all trials.

4. The random variable X counts the number of successful trials out of n trials.

Page 3: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Binomial Experiments-II Why is the following a binomial

experiment? We randomly sample 500 fish from

the population. We record whether each animal is

mature or immature. The random variable X is the number

of mature animals.

Page 4: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Binomial Experiments-II(Notation)

The number of times a trial is repeated

( ) The probability of a success in a single trial

( ) The probability of a failure in a single trial, 1-

The number of successes on trials ( =0,1,.., )

n

p P S

q P F q p

x n x n

1. The experiment is repeated for a fixed number of trials2. There are only two possible outcomes (S and F)

3. The probability of success P(S) is the same for each trial4. The random variable x counts the number of successful trials

Newterms

Page 5: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Binomial Probabilities-I In a binomial experiment, the probability

of exactly x successes in n trials is:

The binomial probability therefore involves the probability of x successes and n -x failures multiplied by the number of ways choosing x successes out of n trials.

n and p are known as parameters. Much of statistics involves using data to estimate the values for unknown parameters.

!( )

( )! !x n x x n x

n x

nP x C p q p q

n x x

Page 6: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Binomial Probabilities-II Notation:

We read this as “The random variable X is distributed binomially with parameters n and p”.

~ ( ; )X B n p

2

Mean :

Variance :

n p

npq

Page 7: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Binomial Probabilities-III By listing all possible values of x

with the corresponding probability of each, you can construct a

.

Page 8: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Binomial Probabilities-IV There is a probability of 0.2 that a fish in a given population

has a particular disease. Assuming that 5 fish are sampled, construct the binomial probability distribution for the experiment.

What does this tell you about a sample size of 5 in this case?

0 55 0

1 45 1

2 35 2

3 25 3

4 15 4

5 05 5

(0) (0.2) (0.8) 0.3277

(1) (0.2) (0.8) 0.4096

(2) (0.2) (0.8) 0.2048

(3) (0.2) (0.8) 0.0512

(4) (0.2) (0.8) 0.0064

(5) (0.2) (0.8) 0.0003

P C

P C

P C

P C

P C

P C

Page 9: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

The Binomial Distribution

0.0

0.1

0.2

0.3

0.4

0.5

0.6

1 2 3 4 5 6 7

Pro

bab

ilit

y

0.0

0.1

0.2

0.3

0.4

0.5

0.6

1 2 3 4 5 6 7

Pro

bab

ilit

y

0.0

0.1

0.2

0.3

0.4

0.5

0.6

1 2 3 4 5 6 7

Pro

bab

ilit

y

n=6; p=0.5 n=6; p=0.7

n=6; p=0.9

0 1 2 3 4 5 6 0 1 2 3 4 5 6

0 1 2 3 4 5 6

Page 10: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Examples of the Binomial Distribution-I

We examine 12 animals for the presence of a disease (p=0.1). What is the probability that:

1. We find exactly 2 animals with the disease?

2. We find no animals with the disease?3. We find 2 or more animals with the

disease? How many animals do we need to

examine to be 99% sure that at least one has the disease?

Page 11: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Examples of the Binomial Distribution-II

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

1 2 3 4 5 6 7 8 9 10 11 12 13

Pro

bab

ilit

y

Hint: I used the EXCEL function “COMBIN(N,x)”

0 1 2 3 4 5 6 7 8 9 10 11 12

Page 12: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

Examples of the Binomial Distribution-III

1. P[X=2]=2. P[X=0]=3. P[X2]=1-P[X=0]-

P[X=1]=0.3410

We want to find n such that 1-P[X=0] < 0.01. This leads to n=40.

2 10120.1 0.9 0.2301

2

0 1212

0.1 0.9 0.28240

Page 13: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

The Negative Binomial Distribution-I

We have an experiment with two outcomes: success (with probability p) and failure (with probability q =1-p).

Let r be a fixed number of successes, and the random variable X be the number of failures before we have r successes.

The probability distribution for X is:1

( ) r xx rP x p q

x

Page 14: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

The Negative Binomial Distribution-II

The product term is multiplied by and not because the final success is always the result of the last “trial” so we “know” when the last success occurs.

r xp q 1x r xC

x r xC

Page 15: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

The Geometric Distribution-I

This is a special case of the negative binomial distribution for which r =1 (i.e. the probability of the number of failures until one success is recorded).

What then is the probability of finding the first diseased animal after finding five that are not diseased?5[ 5] 0.1x 0.9 0.059P X

Page 16: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

The Geometric Distribution-II

The Geometric distribution can be developed from the assumptions that:

1. A trial is repeated until a success occurs.

2. The repeated trials are independent of each other.

3. The probability of success p is constant for each trial.

Page 17: 381 Discrete Probability Distributions (The Binomial Distribution) QSCI 381 – Lecture 13 (Larson and Farber, Sect 4.2)

381

The Geometric Distribution-III

What is the probability that the first diseased fish is not one of the first four examined? This is equivalent to saying that the

number of failures is NOT 0, 1, 2, or 3, i.e.:

1 [ 0] [ 1] [ 2] [ 3]P X P X P X P X