Empirical cumulative distribution function plot

`cdfplot(X)`

h = cdfplot(X)

[h,stats] = cdfplot(X)

`cdfplot(X)`

displays a
plot of the empirical cumulative distribution function (cdf) for the
data in the vector `X`

. The empirical cdf *F(x)* is
defined as the proportion of `X`

values less than
or equal to *x*.

This plot is useful for examining the distribution of a sample of data. You can overlay a theoretical cdf on the same plot to compare the empirical distribution of the sample to the theoretical distribution.

The `kstest`

, `kstest2`

, and `lillietest`

functions
compute test statistics that are derived from the empirical cdf. You
may find the empirical cdf plot produced by `cdfplot`

useful
in helping you to understand the output from those functions.

`h = cdfplot(X)`

returns
a handle to the cdf curve.

`[h,stats] = cdfplot(X)`

also
returns a `stats`

structure with the following fields.

Field | Description |
---|---|

| Minimum value |

| Maximum value |

| Sample mean |

| Sample median (50th percentile) |

| Sample standard deviation |

Was this topic helpful?