apf: Plot of probability function of any discrete variable

View source: R/anypfcdfdiscrete.R

apfR 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 X. See Details.

p

numeric vector of p_X(x). See Details.

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)

leem documentation built on April 3, 2025, 6:04 p.m.

Related to apf in leem...