Normal Distribution (Gaussian Distribution): The Normal Distribution is a continuous probability distribution that is symmetric and bell-shaped. It is characterized by two parameters: the mean (μ), which defines the center of the distribution, and the standard deviation (σ), which controls the spread of the distribution. It is commonly used to model naturally occurring phenomena, such as heights of a population or IQ scores.
Binomial Distribution: The Binomial Distribution is a discrete probability distribution that models the number of successes in a fixed number of independent Bernoulli trials. It is characterized by two parameters: the probability of success (p) and the number of trials (n). It is often used to model situations with two possible outcomes, such as the number of successful free throws in a fixed number of attempts.
Poisson Distribution: The Poisson Distribution is a discrete probability distribution that models the number of events occurring in fixed intervals. It is characterized by a single parameter: the average event rate (\(\lambda\)) within the given time or space. It is commonly used to model rare events, such as the number of phone calls at a call center in a minute.
Probability Density Function (PDF): The PDF of a distribution measures the relative likelihood of observing a specific value or a range of values from the distribution. It gives the probability of a random variable taking on a particular value. The PDF represents the shape of the distribution and provides information about the probabilities associated with different values.
Cumulative Density Function (CDF): The CDF of a distribution measures the probability that a random variable takes on a value less than or equal to a given value. It provides the cumulative probability up to a certain point in the distribution. The CDF represents the cumulative probability distribution and can be used to calculate probabilities for ranges of values or to find percentiles of the distribution.
Exponential Distribution: The Exponential Distribution describes the time between events in a Poisson process. It is characterized by a rate parameter (\(\lambda\)), which controls the event occurrence rate. The PDF of the Exponential Distribution is given by the formula:
\[ PDF(x) = \lambda * exp(- \lambda x) \]
The PDF formula makes sense intuitively. The exponential term, exp(-\(\lambda\)x), ensures that the probability decreases exponentially as x increases, reflecting the fact that longer times between events are less likely to occur. The rate parameter (\(\lambda\)) determines the overall shape and rate of decay of the distribution.
The CDF of the Exponential Distribution is given by the formula:
\[ CDF(x) = 1 - exp(-\lambda x) \]
The CDF represents the cumulative probability of the Exponential Distribution. At x = 0, the CDF is 0, indicating no time has elapsed. As x increases, the CDF approaches 1, indicating a higher cumulative probability of the event occurring.
?dnorm
## 打开httpd帮助服务器… 好了
?dbinom
?dpois
# Generate x-axis values
x <- seq(-4, 4, length.out = 100)
# Calculate PDF values using dnorm()
pdf_values <- dnorm(x, mean = 0, sd = 1)
# Plot Normal Distribution
plot(x, pdf_values, type = "l", lwd = 2, xlab = "x", ylab = "PDF",
main = "Normal Distribution (μ = 0, σ = 1)")
# Generate x-axis values
x <- seq(-4, 4, length.out = 100)
# Calculate PDF values using dnorm()
pdf_values <- dnorm(x, mean = 0, sd = 1)
# Plot Normal Distribution
plot(x, pdf_values, type = "l", lwd = 2, xlab = "x", ylab = "PDF",
main = "Normal Distribution (μ = 0, σ = 1)")
x <- 0:20
pmf_values <- dbinom(x, size = 20, prob = 0.5)
plot(x, pmf_values, type = "h", lwd = 2, xlab = "x", ylab = "PMF",
main = "Binomial Distribution (n = 20, p = 0.5)")
x <- 0:15
pmf_values <- dpois(x, lambda = 3)
plot(x, pmf_values, type = "h", lwd = 2, xlab = "x", ylab = "PMF",
main = "Poisson Distribution (λ = 3)")
## II. - Binomial Distribution:
N <- 200
x <- 10
p <- 0.05
prob_binomial <- dbinom(x, size = N, prob = p)
prob_binomial
## [1] 0.1283574
x_values <- 0:N
binom_distr <- dbinom(x_values, N, p)
plot(x_values, binom_distr, type="h", lwd=2, col="blue", main="Binomial Distribution", xlab="Number of Deaths", ylab="Probability")
lambda <- N * p
prob_poisson <- dpois(x, lambda)
prob_poisson
## [1] 0.12511
# Poisson
poisson_distr <- dpois(x_values, lambda)
plot(x_values, poisson_distr, type="h", lwd=2, col="red", main="Poisson Distribution", xlab="Number of Deaths", ylab="Probability")
We have evidence that there is no significant difference. The
probabilities given in both distributions are very close, so we can
assume that the answers given by the two distribution hypotheses are
similar. This is because the Poisson distribution can be used as an
approximation of the binomial distribution, and under certain conditions
the two distributions yield similar results.