functionplCDF
Generate a piecewise linear cumulative distribution function from a piecewise linear density function
Extends from Function (Icon for functions).
Information
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The output cdf is piecewise linear cumulative distribution function specified by a list of points {{x1,F(x1)}, {x2,F(x2}}, ... ,{xn, F(xn)}. The input tuples is assumed to be a piecewise linear function that by default (rescaleQ= true) will be normalized using normalizePLpdf() to come up with a piecewise linear density function that has the unit interval as its support.
Syntax
Functions.plCDF({{x1,y1},{x2,y2}, ...}); // rescaleQ= true
Functions.plCDF({{x1,y1},{x2,y2}, ...}, rescaleQ = false);
Examples
plCDF({{0,2},{5,2},{10,2}}); // {{0,0},{0.5,0.5},{1,1}}
plCDF({{0,1},{1,2},{2,4},{3,5}}); // {{0,0},{0.33..,0.16..},{0.66..,0.5},{1,1}}
See also
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | tuples | Piecewise linear function, i.e., { {x1,f(x1), {x2,f(x2)}, ... } | |
| Boolean | rescaleQ | true | = true, if the support is to be rescaled to the unit interval |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | cdf | Piecewise linear cumulated distribution function |
Revisions
- Introduced in v2.1.0.