plot.funUnif | R Documentation |
plot PDF for sum or product of two uniform distributions
Plots a line chart for the probability density distribution (PDF) or cumulative distribution (CDF) for the sum or product of uniform distributions on positive Reals. Can handle an arbitrary number of input distributions, which must be independent, and can have different ranges.
## S3 method for class 'funUnif'
plot(
a,
b,
FUN = "sum",
cumulative = F,
buffer = 0.1,
nZ = 500,
show.xy.pd = F,
line.col = c("red"),
line.lty = c(1),
add = F,
xlim = NULL,
ylim = NULL
)
a |
A numerical vector holding the minimum values of input uniform distributions. |
b |
A numerical vector holding the maximum values of input uniform distributions. |
FUN |
The function to use to determine PDF or CDF; one of 'simple', 'sum', or 'product'. If a and b are length 1 vectors, 'simple' is used. |
cumulative |
If TRUE, the CDF will be plotted instead of the PDF |
buffer |
fraction of extra, zero-probability region along x axis to plot |
show.xy.pd |
When FUN = 'sum' or 'product', if 'show.xy.pd' = TRUE the pdf or cdf of component distributions will be plotted along with their sum or product. |
line.col |
color of curve |
line.lty |
type of curve |
add |
Whether or not to the graph should be added to the existing plot. Default is FALSE. |
xlim |
min and max limits for the x-axis plotting area |
ylim |
min and max limits for the y-axis plotting area |
A line graph showing the PDF of the sum or product of the two input uniform distributions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.