20
Lesson 6 - R Discrete Probability Distributions Review

Lesson 6 - R Discrete Probability Distributions Review

Embed Size (px)

Citation preview

Page 1: Lesson 6 - R Discrete Probability Distributions Review

Lesson 6 - R

Discrete Probability Distributions Review

Page 2: Lesson 6 - R Discrete Probability Distributions Review

Objectives• Understand when a probability experiment follows

one of the processes for discrete random variables:– Uniform (can be continuous as well)– Binomial– Geometric– Poisson– Hypergeometric– Negative Binomial

• Compute probabilities of discrete random variables

• Find the mean and standard deviation of a discrete random variables

Page 3: Lesson 6 - R Discrete Probability Distributions Review

Vocabulary• None new

Page 4: Lesson 6 - R Discrete Probability Distributions Review

English Phrases

Math Symbol

English Phrases

≥ At least No less than Greater than or equal to> More than Greater than< Fewer than Less than≤ No more than At most Less than or equal to= Exactly Equals Is ≠ Different from

Cumulative probability or cdf P(x ≤ A) cdf(x > A) = 1 – P(x ≤ A)

Values of Discrete Variable, X

P(X)

∑P(x) = 1

X=A

Page 5: Lesson 6 - R Discrete Probability Distributions Review

Let P(x) denote the probability that the random variable X equals x, then

1) The sum of all probabilities of all outcomes must equal 1

∑ P(x) = 1

2) The probability of any value x, P(x), must between 0 and 1

0≤ P(x) ≤ 1

Discrete PDF Rules

Page 6: Lesson 6 - R Discrete Probability Distributions Review

Mean value of a Discrete Random Variable: Given by the formula

 μx = ∑ [x ∙P(x)] (Expected Value = μx)

 where x is the value of the random variable and P(x) is the probability of observing x

Variance and Standard Deviation of a Discrete Random Variable:The variance of a discrete random variable is given by:

 σ2

x = ∑ [(x – μx)2 ∙ P(x)] = ∑[x2 ∙ P(x)] – μ2

x

and standard deviation is √σ2

Mean & Variance

Page 7: Lesson 6 - R Discrete Probability Distributions Review

Uniform: probability is equal distributed

Binomial: number of successes in n trials

Geometric: number of trials until a success or failure is observed

Hypergeometric: sampling without replacement in a small population

Negative Binomial: number of trials necessary to observe r# of successes (Geometric is a special case with r=1)

Poisson: number of successes in a interval of fixed length (time, distance, or area)

Discrete PDFs

Page 8: Lesson 6 - R Discrete Probability Distributions Review

1)Experiment is performed a fixed number of times. Each repetition is called a trial.

2)The trials are independent

3)For each trial there are two mutually exclusive (disjoint) outcomes: success or failure

4)The probability of success is the same for each trial of the experiment

Binomial Experiment Criteria

Page 9: Lesson 6 - R Discrete Probability Distributions Review

Binomial Notation

The probability of obtaining x successes in n independent trials of a binomial experiment, where the probability of success is p, is given by:

 

P(x) = nCx px (1 – p)n-x, x = 0, 1, 2, 3, …, n

Where n is # of independent trials of the experiment

p denotes the probability of success 1 – p is the probability of failure

x denotes the number of successes in n independent trials of the experiment. So 0 ≤ x ≤ n

Determining probabilities using calculator: 2nd VARS: binompdf(n,p,x) or binomcdf(n,p,x)

Page 10: Lesson 6 - R Discrete Probability Distributions Review

As the number of trials n in a binomial experiment increases, the probability distribution of the random variable X becomes bell shaped.

As a rule of thumb, if np(1-p) ≥ 10, the probability distribution will be approximately bell shaped. (which means the Empirical Rule can be used!!)

Binomial PDF and Law of Large Numbers

Page 11: Lesson 6 - R Discrete Probability Distributions Review

Geometric Criteria

An experiment is said to be a geometric experiment provided:

1. Each repetition is called a trial.

2. The trials are independent

3. For each trial there are two mutually exclusive (disjoint) outcomes: success or failure

4. The probability of success is the same for each trial of the experiment

Page 12: Lesson 6 - R Discrete Probability Distributions Review

Geometric NotationThe geometric distribution addresses the number of trials necessary before the first success. If the trials are repeated k  times until the first success, we will have had k  – 1 failures. If p  is the probability for a success and q  (1 – p) the probability for a failure, the probability for the first success to occur at the kth  trial will be (where x = k) 

P(x) = p(1 – p)x-1, x = 1, 2, 3, … 

Using the calculator: 2nd VARS geometpdf(p,k) for P(X=k)

Using the calculator: 2nd VARS geometcdf(p,k)

for P(k ≤ X)

Page 13: Lesson 6 - R Discrete Probability Distributions Review

Hyper-Geometric Criteria

An experiment is said to be a hyper-geometric experiment provided:

1. The experiment is performed a fixed number of times.

2. Each repetition is called a trial.

3. The trials are dependent

4. For each trial there are two mutually exclusive (disjoint) outcomes: success or failure

Note: One of the conditions of a binomial distribution was the independence of the trials so the probability of a success is the same for every trial. If successive trials are done without replacement and the sample size or population is small, the probability for each observation will vary.

Page 14: Lesson 6 - R Discrete Probability Distributions Review

Hyper-Geometric Notation

The formula for the hyper-geometric distribution is:

  NpCx N(1-p)Cn-x

P(x) = --------------------------- x = 0, 1, 2, 3, …, n

NCn

 

Where

N is the size of the population,

p is the proportion of the population with a certain attribute (success),

x is the number of individuals from the population selected in the sample with the attribute and

n is the number selected to be in the sample (n-x is the number selected who do not have the attribute)

Page 15: Lesson 6 - R Discrete Probability Distributions Review

Negative Binomial Criteria

An experiment is said to be a negative binomial experiment provided:

1. Each repetition is called a trial.

2. For each trial there are two mutually exclusive (disjoint) outcomes: success or failure

3. The probability of success is the same for each trial of the experiment

4. The trials are independent

5. The trials are repeated until r successes are observed, where r is specified in advance.

Page 16: Lesson 6 - R Discrete Probability Distributions Review

Negative Binomial NotationWhen we studied the Binomial distribution, we were only interested in the probability for a success or a failure to happen. The negative binomial distribution addresses the number of trials necessary before the rth success. If the trials are repeated x  times until the rth success, we will have had x  – r failures. If p  is the probability for a success and (1 – p) the probability for a failure, the probability for the rth success to occur at the xth  trial will be  

P(x) = x-1Cr-1 pr(1 – p)x-r x = r, r+1,

r+2, … 

Where r number of successes is observed in x number of trials of a binomial experiment with success rate of p

 

Page 17: Lesson 6 - R Discrete Probability Distributions Review

Poisson Criteria

Poisson distributions can be used to computer probabilities of experiments in which the random variable X counts the number of occurrences (successes) of a particular event within a specified interval (usually time or space).

An experiment is said to be a Poisson process provided: 1) Probability of two or more successes in any

sufficiently small sub-interval* is 0. 2) The probability of success is the same for any two

intervals of equal length 3) The number of successes in any interval is

independent of the number of successes in any other interval provided the intervals are not overlapping

Page 18: Lesson 6 - R Discrete Probability Distributions Review

Poisson Notation

If X is the number of successes in an interval of fixed length t, then probability formula for X is   (λt)x

P(x) = --------- e-λt x = 0, 1, 2, 3, … x!

where λ (the Greek letter lamda) represents the average number of occurrences of the event in some interval of length 1 and e = 2.71828.... (Euler's constant)

Using the calculator: Poissonpdf(μ,x) & Poissoncdf(μ,x)

Page 19: Lesson 6 - R Discrete Probability Distributions Review

Discrete Probability Functions Summary

Name PDF x = μ σ

Binomial P(x) = nCxpx(1-p)n-x x = 0,1,2,… np √np(1-p)

Example: Coin flips (x = number of heads in n=10 trials)

Geometric P(x) = p(1 – p)x-1 x = 1,2,… 1/p √1-p

Example: number of trials necessary before the first success How many flips before the first tail is observed?

Hyper-geometric

NpCx N(1-p)Cn-x P(x) = --------------------- NCn

x = 0,1,2,… np √ (np(1-p)(N-n)/N-1)

Example: Small number sampling without replacement What is P(x=6) women will be selected from population of 20 men & 20 women (N=40) in a n=10 random sampling?

Negative Binomial

P(x) = x-1Cr-1 pr(1 – p)x-r x = r,r+1,… r/p √ (r(1-p)/p2)

Example: r number of successes in x trials (of a binomial experiment)What is the P(x=5) flips are necessary to get 3 heads?

Poisson (λt)x

P(x) = ------- e-λt x!

x = 0,1,2,… λt √λt

Example: Events occurring over time or spaceWhat is the P(x<15) people per hour going through McD’s drive through?

Page 20: Lesson 6 - R Discrete Probability Distributions Review

Summary and Homework

• Summary– Probability rules remain the same– Each of the six Discrete PDFs have criteria

that are similar, but slightly different– Calculator has pdf and cdf functions for 3

of the 6 Discrete PDFs

• Homework– pg 352 - 355: 1, 4, 5, 9, 13, 19