<< nan_cdfplot Statistical Visualization nan_errorb >>

NaN Toolbox >> NaN Toolbox > Statistical Visualization > nan_ecdfhist

nan_ecdfhist

Create histogram from ecdf output.

Calling Sequence

N = nan_ecdfhist(F,X)
N = nan_ecdfhist(F,X,M)
N = nan_ecdfhist(F,X,C)
[N,Cout] = nan_ecdfhist(...)
nan_ecdfhist(...,'plot') produces a histogram bar plot of the results.

Parameters

F:

vector of empirical cdf values

X:

vector of evaluation points

M:

uses M bins instead of 10

C:

vector with centers of bins

N:

heights of histogram bars for 10 equally spaced bins

Cout:

position of the bin centers

Description

The bar heights of the histogram are computed from the increases in the empirical cdf, and are normalized so the area for each bar represents the probability for the corresponding interval. If F is computed from a censored sample, the total probability may be less than 1. In contrast, HIST produces bars whose heights are bin counts and whose areas do not represent probabilities.

Examples

y = grand(50,1,'exp',10);
[F,X] = nan_ecdf(y);
nan_ecdfhist(F,X,'plot');
// Superimpose a plot of the known true pdf
xx = 0:.1:max(y); yy = exp(-xx/10)/10; plot(xx,yy,'g-');

See also


Report an issue
<< nan_cdfplot Statistical Visualization nan_errorb >>