Description Usage Arguments Details Value Examples
View source: R/AproxPoisNorm.R
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.
1 2 3 | AproxPoisNorm(lambda, legend = TRUE, xlab = "", ylab = "Probability",
main = "Normal approximation to Poisson", col.fill = "grey",
col.line = "red", lwd = 2)
|
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. |
The approximation is accurate only if lambda>=10.
This function is called for the side effect of drawing the plot.
1 2 3 4 | lambda=15
AproxPoisNorm(lambda)
AproxPoisNorm(lambda,col.fill="blue",col.line="orange")
AproxPoisNorm(lambda,legend=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.