Poisson Params

Author

Russell Almond

Published

September 1, 2020

The Poisson distribution is a distribution for counts of events.

Assume the following things:

The the number of events, \(X\), follows a Poisson distribution.

\[P(X=x) = \frac{(\lambda T)^x}{x!}e^{-\lambda T}\] The distribution looks like:

#| standalone: true
#| viewerHeight: 600
library(shiny)
library(ggplot2)
ui <- fluidPage(
inputPanel(
  sliderInput("mean", label = "Expected number of events per unit time",
              min=0, max=100, value=3.5, step=1),
  
  sliderInput("t", label = "Time Interval:",
              min = 0, max = 365, value = 1, step = 1)
),
mainPanel(
  plotOutput("poissoncurve")))

server <- function (input,output) {
  output$poissoncurve <- renderPlot({
  mu <- as.numeric(input$mean) * as.numeric(input$t)
  n <- mu + 3* sqrt(mu)
  dat <- data.frame(x=0:n,y=dpois(0:n,mu))
  ggplot(dat,aes(x,y)) +geom_col()  

})
}
shinyApp(ui=ui,server=server)

The mean and variance of the Poisson distribution are \(\lambda T\) and \(\lambda T\).

As the variance grows pretty quickly, statisticians will often take the square root of count data (especially if there is heteroscedasticity) to stabilize the variance.