snippets

🔌 Toolbox of short, reusable pieces of code and knowledge.

View the Project on GitHub rosikand/snippets

Random Variables

Table of discrete distributions

image

Source.

Poisson

Wikipedia has some good information.

Definition: The Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known constant mean rate and independently of the time since the last event (Wikipedia).

Use Poisson when you are given a rate and care about the number of occurrences. For example, the number of requests in 5 minutes if the average request per minute is 3. Another use case is to approximate computationally expensive binomial random variables.

The key thing to know about the derivation of a Poisson is that it really is a large Binomial RV under the microscope. We get the probability \(p\) via dividing the rate by the amount of time (make sure the units line up). Now how we get the number of trials if the unit is time? Well… discretize it! Divide the time into a very large number (approaching infinity) of rectangles (like what we do for integrals). That gives us our \(n\). That is how Poisson is actually derived. See how this is really just a binomial with parameters \(p\) and \(n\)?

Approximation of binomial

To approximate a binomial distribution using Poisson, define

\[\lambda=n*p\]

where \(n\) is the number of trials and \(p\) is the probability of success for each trial.

Do this when

\[\begin{aligned} &n>20, p<0.05 \; or \; \\ &n>100, p<0.1. \end{aligned}\]

Examples of Poissons

Problem solving strategies

From the professor:

  1. Define a random variable
  2. Declare its distribution
  3. Write the question as a probability statement using the random variable
  4. Solve