October 5, 2023

Problem 3: Parts A, B, and C

Introduction to Poisson Distribution

The Poisson Distribution is a discrete probability distribution often used in statistical modeling. It is expressed as:

\[ p(x) = \frac{e^{-\lambda}\lambda^x}{x!} \]

where \(\lambda\) is the rate of occurrence.

# Defining the name of the distribution
distribution_name <- "Poisson Distribution"
distribution_name
## [1] "Poisson Distribution"

Identifying the Distribution

The given formula is:

\[ p(x) = \frac{e^{-22}22^x}{x!} \]

for \(x = 0,1,2, …\)

This is a Poisson Distribution with \(\lambda = 22\).

Probability of Catching At Least 20 Mice

We are looking for the probability of catching at least 20 mice. The R code below calculates this probability.

# Parameters
lambda <- 22

# Probability of catching at least 20 mice
prob_at_least_20 <- 1 - ppois(19, lambda)
prob_at_least_20
## [1] 0.693973

Explanation of Probability Calculation

The ppois function calculates the cumulative probability of a Poisson distribution. The complement rule is used here, which means we first find the probability of the opposite event (catching 19 or fewer mice) and then subtract that from 1 to get the probability of catching at least 20 mice.

library(ggplot2)

# Set up a data frame to hold the distribution
x <- 0:40
lambda <- 22
poisson_data <- data.frame(
  x = x,
  y = dpois(x, lambda)
)

# Create the plot
ggplot(poisson_data, aes(x, y)) +
  geom_bar(stat="identity", fill="steelblue") +
  labs(title="Poisson Distribution with lambda = 22",
       x="x",
       y="Probability") +
  theme_minimal()

Standard Deviation

The standard deviation of a Poisson distribution is the square root of \(\lambda\).

# Standard deviation
std_dev <- sqrt(lambda)
std_dev
## [1] 4.690416

Explanation of Standard Deviation

The standard deviation measures how spread out the numbers are from the average. In a Poisson distribution, it