Learn R Programming

algebraic.dist (version 0.9.1)

cdf.mixture: Cumulative distribution function for a mixture distribution.

Description

Returns a function that evaluates the mixture CDF at given points. The mixture CDF is \(F(x) = \sum_k w_k F_k(x)\).

Usage

# S3 method for mixture
cdf(x, ...)

Value

A function function(q, ...) returning the CDF at q.

Arguments

x

A mixture object.

...

Additional arguments (not used).

Examples

Run this code
m <- mixture(list(normal(0, 1), normal(5, 1)), c(0.5, 0.5))
F <- cdf(m)
F(0)
F(5)

Run the code above in your browser using DataLab