apf {leem} | R Documentation |
Plot of probability function of any discrete variable
Description
Help in building the plot of the probability function of any discrete variable
Usage
apf(x, p, main = NULL, xlab = NULL, ylab = NULL)
Arguments
x |
numeric vector of values of |
p |
numeric vector of |
main |
main title for the plot. |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
Details
Consider the X
distribution:
p_X(x) : | 0.23 | 0.27 | 0.30 | 0.12 | 0.08 |
x : | 1 | 2 | 3 | 4 | 5 |
where p_X(x)
and x
are probability function and values of X
. See Example 1.
Value
The output is plot of distribution function. See Example 1.
Examples
# Example 1
x <- 1:5
p <- c(0.23, 0.27,0.30, 0.12, 0.08)
apf(x, p)
[Package leem version 0.2.0 Index]