# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# cdf

Class: piecewisedistribution

Cumulative distribution function for piecewise distribution

## Syntax

```p= cdf(obj,x) p= cdf(obj,x,'upper') ```

## Description

`p= cdf(obj,x)` returns an array `P` of values of the cumulative distribution function for the piecewise distribution object `obj`, evaluated at the values in the array `X`.

`p= cdf(obj,x,'upper')` returns the complement of the piecewise distribution cdf evaluated at the values in `x`, using an algorithm that more accurately computes the extreme upper tail probabilities.

## Examples

expand all

Fit Pareto tails to a distribution at cumulative probabilities 0.1 and 0.9.

```t = trnd(3,100,1); obj = paretotails(t,0.1,0.9); [p,q] = boundary(obj) ```
```p = 0.1000 0.9000 q = -1.8487 2.0766 ```

Compute the cdf at the values in `q`.

```cdf(obj,q) ```
```ans = 0.1000 0.9000 ```