Docsity

Probabilidades de Discrete Random Variables: Bernoulli, Binomial, Geometric y Poisson, Diapositivas de Probabilidad

Vista previa parcial del texto

¡Descarga Probabilidades de Discrete Random Variables: Bernoulli, Binomial, Geometric y Poisson y más Diapositivas en PDF de Probabilidad solo en Docsity!

Probability

(More) Discrete Random Variables

UPF

Bernoulli

Bernoulli Random Variable

The Bernoulli random variable is used to model the success of a binary

experiment with probability of success p.

The RV is denoted as

X ∼ Bernoulli(p) p ∈ [0, 1]

its support is { 0 , 1 } and its PMF is

pBern(x) = px^ (1 − p)(1−x)

Binomial

Binomial Random Variable

The binomial random variable is used to model the number of

successes in n independent Bernoulli trials with success probability p.

The RV is denoted as

X ∼ Binomial(n, p) p ∈ [0, 1], n ∈ N+

its support is { 0 , 1 , ..., n} and its PMF

pBin(x) =

n x

px^ (1 − p)(n−x).

Derivation of the PMF of the Binomial RV

1 In a class of n, in how many ways can I divide students in a group

k students and a group of n − k?

(n k

2 For one of these subsets, what is the probability that the k

students understand the theorem and the last n − k do not?

Let’s assume that the first k understand it and the last n − k don’t

P(X 1 = 1, X 2 = 1, ..., Xk = 1, Xk+1 = 0, ...Xn = 0) = P(X 1 = 1)P(X 2 = 1)...P(Xk = 1)P(Xk+1 = 0)..P(Xn = 0) = p ︸ · p (^) ︷︷· ... · p︸ k times

(1 − p) · (1 − p) · ... · (1 − p) ︸ ︷︷ ︸ n−k times = pk^ (1 − p)n−k

3 Note that each of the groupings is going to have the same

probability, thus the probability that k students are going to

understand the theorem is (

n k

pk^ (1 − p)n−k

Binomial: How does it look like?

Red: p=0.

Binomial: How does it look like?

Red: p=0.8, Blue: p=0.

Binomial: How does it look like?

Red: p=0.8, Blue: p=0.3, Green: p=0.5, Orange: p=0.

Binomial: R commands

Example

Let X ∼ Binomial(20, 0 .30). Plot the PMF of this random variable.

This is boring! (i.e. more boring than usual)

We can use R to solve this problem.

PMF of the binomial RV is dbinom

CDF of the binomial RV is pbinom

Binomial: Examples

Example

Let X ∼ Binomial(20, 0 .30).

What is the probability P(X = 11)?

You can compute the answer in R!

P(X = 11) = dbinom(11,20,0.30)

What is the probability P(X > 2)?

P(X > 2) = 1 − P(X ≤ 2) =

1-dbinom(0,20,0.3)-dbinom(1,20,0.3)-dbinom(2,20,0.3)

or

1-pbinom(2,20,0.3)

Binomial: Remarks

When it is appropriate to apply to the Binomial model?

1 The number of observations n is fixed.

2 Each observation is independent.

3 Each observation represents one of two outcomes

(success or failure).

4 The probability of success p is the same for each outcome.

Binomial: Examples

Example

A student has to take an exam. The exam is made up of 15 multiple

choice questions with 3 possible answers. The student plans not to

study for the exam and answering the questions at random. What is

the probability that he/she will get more than 8 right answers?

Let X ∼ Binomial(15, 1 /3).

P(X > 8) = 1 − P(X ≤ 8) = 1 − pbinom( 8 , 15 , 1 / 3 ) = 0. 03

Binomial: Examples

Example

You are in a trip in an exotic country far away from home for 7 days.

Each day you go to lunch to a local restourant to eat. It turns out that

9 out of 10 dishes in the menu make you sick.

Let X be the RV “number of times you felt sick in during the trip”

Is the Binomail the right model for this experiment? Why?

Not really. Once you pick a dish that makes you sick on one day, you

should not pick it afterwords. The probability of picking bad dishes is

not constant.

Geometric

Geometric Random Variable

The geometric random variable is used to model the number of failures

before the first suceess in a sequence of Bernoulli trials with success

probability p.

The RV is denoted as

X ∼ Geometric(p) p ∈ [0, 1]

its support is { 0 , 1 , 2 , ...} and its PMF is

pGeom(x) = p(1 − p)x^.

and its CDF is

FGeom(x) = 1 − (1 − p)x+1.

Geometric RV - Justification of the PMF

In a sequence of Bernoulli trials Xi , the probability of observing k

failures before the first success is

P(X 1 = 0, X 2 = 0, X 3 = 0, ..., Xk = 0, Xk+1 = 1)

P(X 1 = 0)P(X 2 = 0)P(X 3 = 0)...P(Xk = 0)P(Xk+1 = 1) (1 ︸ − p)(1 −︷︷ p)(1 − p︸) k

p

p(1 − p)k