AproxPoisNorm {LearningStats} | R Documentation |
Illustration of the Normal approximation to Poisson
Description
When certain conditions are met (see Details), the Poisson distribution can be approximated by the Normal one. The function AproxPoisNorm
illustrates this fact by plotting the mass diagram corresponding with the discrete distribution (parameter is given by the user) on which the associated Normal density function is also displayed.
Usage
AproxPoisNorm(lambda, legend = TRUE, xlab = "", ylab = "Probability",
main = "Normal approximation to Poisson", col.fill = "grey",
col.line = "red", lwd = 2)
Arguments
lambda |
mean of the Poisson distribution. |
legend |
logical argument indicating whether to display the legend on the plot or not, default to TRUE. |
xlab |
x-axis label; default to empty. |
ylab |
y-axis label; default to "Probability". |
main |
title; default to "Normal approximation to Poisson". |
col.fill |
colour to fill the bars; default to grey. |
col.line |
colour to draw the line of the Normal density; default to red. |
lwd |
line width for the Normal density, a positive number; default to 2. |
Details
The approximation is accurate only if lambda>=10.
Value
This function is called for the side effect of drawing the plot.
Examples
lambda=15
AproxPoisNorm(lambda)
AproxPoisNorm(lambda,col.fill="blue",col.line="orange")
AproxPoisNorm(lambda,legend=FALSE)