Bernoulli Binomial Negative Binomial Poisson Hypergeometric

Topic 9 Examples of Mass Functions and Densities Discrete Random Variables

1 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Outline

Bernoulli

Binomial

Negative Binomial

Poisson

Hypergeometric

2 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Introduction

Write fX (x|θ) = Pθ{X = x} for the mass function of the given family of discrete random variables depending on the parameter θ. We will • use the expression Family(θ) as shorthand for this family • followed by the R command family and • the state space S.

3 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Bernoulli Random Variables

Ber(p) on S = {0, 1}

 0 with (1 − p),  f (x|p) = = px (1 − p)1−x . X 1 with probability p,

This is the simplest , taking on only two values, namely,0 and1. Think of it as the of a , i.e., a single toss of an unfair coin that turns up heads with probability p.

4 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Binomial Random Variables

Bin(n, p) (R command binom) on S = {0, 1,..., n}

n f (x|p) = px (1 − p)n−x . X x

The arises from computing the probability of x successes in n Bernoulli trials. Considered in this way, the family Ber(p) is also Bin(1, p). Exercise. Enter in R plot(c(0:12),dbinom(c(0:12),12,p,),type="h") for p=0.25,0.5,0.75. Describe what you see.

5 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Negative Binomial Random Variables

Negbin(n, p) (R command nbinom) on S = N n + x − 1 f (x|p) = pn(1 − p)x . X x

This random variable is the number of failed Bernoulli trials before the n-th success. To find the mass function, • For the outcome {X = x}, the n-th success must occur on the n + x-th trial. So, • we must have n − 1 successes and x failures in first n + x − 1 Bernoulli trials • followed by success on the last trial.

6 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Negative Binomial Random Variables The first n + x − 1 trials and the last trial are independent and so the multiply.

Pp{X = x} = Pp{n − 1 successes in n + x − 1 trials, success in the n − x-th trial}

= Pp{n − 1 successes in n + x − 1 trials}Pp{success in the n − x-th trial} n + x − 1 n + x − 1 = pn−1(1 − p)x · p = pn(1 − p)x n − 1 x

The first factor is computed from the binomial distribution, the second from the Bernoulli distribution. Note the use of the identity

m  m  = k m − k

in giving the final formula.

7 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Poisson Random Variables

Pois(λ) (R command pois) on S = N λx f (x|λ) = e−λ. X x! The approximates of the binomial distribution for n large, p small, but the product λ = np is moderate. Examples. • bacterial colonies • n is the number of bacteria and p is the probability of a mutation, • recombination events during meiosis • n is the number of nucleotides on a chromosome and p is the probability of a recombination event occurring at a particular nucleotide. The product λ is the mean number of events.

8 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Poisson Random Variables

The approximation is based on the limit

 λn lim 1 − = e−λ. n→∞ n

We compute binomial probabilities, replace p by λ/n and take a limit as n → ∞. In this computation, we use the fact that for a fixed value of x,

(n)  λ−x x → 1 and 1 − → 1 as n → ∞ nx n

9 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Poisson Random Variables

n 0 n λ n −λ P{X = 0} = 0 p (1 − p) = 1 − n ≈ e

n 1 n−1 λ λ n−1 −λ P{X = 1} = 1 p (1 − p) = n n 1 − n ≈ λe

n 2 n−2 n(n−1) λ 2 λ n−2 n(n−1) λ2 λ n−2 λ2 −λ P{X = 2} = 2 p (1 − p) = 2 n 1 − n = n2 2 1 − n ≈ 2 e ...... x x n x n−x (n)x λ x λ n−x (n)x λ λ n−x λ −λ P{X = x} = x p (1 − p) = x! n 1 − n = nx x! 1 − n ≈ x! e . Exercise. Explain why ∞ ∞ X X λx f (x) = e−λ = 1. X x! x=0 x=0

10 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Hypergeometric Random Variables

Hyper(m, n, k) (R command hyper) on S = {max{0, k − n},..., min{m, k}}

m n  x k−x fX (x|m, n, k) = m+n k

• Begin with an urn holding m white balls and n black balls. • Remove k at random and • let the random variable X denote the number of white balls.

11 / 12 Bernoulli Binomial Negative Binomial Poisson Hypergeometric Hypergeometric Random Variables

We consider equally likely outcomes to determine fX (x|m, n, k) = Pm,n,k {X = x}. • The total number of possible outcomes, #(Ω), namely, the number of ways to choose k balls out of an urn containing m + n balls.

m + n . k This will be the denominator for the probability. • For the numerator, the outcomes that result in x white balls from the total of m, we must also choose k − x black balls from the total of n. By the multiplication property, the number of ways#( Ax ) to accomplish this is product.

m n  . x k − x

Finally, fX (x|m, n, k) = #(Ax )/#(Ω).

12 / 12