powered by
Get the cumulative distribution function given the distribution function.
cumulativeFromDensity(densityX, xlims, sanityChecks = TRUE)
a callable function representing the cumulative distribution.
The probability density function.
the domain of definition of the density function.
(optional parameter, default = TRUE) boolean value indicating wether to check if the density function is correctly defined.
cumulativeProbability <- cumulativeFromDensity(normalDensity(0,1), c(-4,4), FALSE) x <- seq(-4, 4, length.out=101) plot(x, cumulativeProbability(x), type = "l")
Run the code above in your browser using DataLab