cumulativeFromDensity: Get the cumulative distribution function given the...

View source: R/RVCompare.R

cumulativeFromDensityR Documentation

Get the cumulative distribution function given the distribution function.

Description

Get the cumulative distribution function given the distribution function.

Usage

cumulativeFromDensity(densityX, xlims, sanityChecks = TRUE)

Arguments

densityX

The probability density function.

xlims

the domain of definition of the density function.

sanityChecks

(optional parameter, default = TRUE) boolean value indicating wether to check if the density function is correctly defined.

Value

a callable function representing the cumulative distribution.

Examples

cumulativeProbability <- cumulativeFromDensity(normalDensity(0,1), c(-4,4), FALSE)
x <- seq(-4, 4, length.out=101)
plot(x, cumulativeProbability(x), type = "l")

RVCompare documentation built on Aug. 21, 2023, 5:13 p.m.