<< distfun_histocreate Histogram distfun_histopdf >>

distfun >> distfun > Histogram > distfun_histoinv

distfun_histoinv

Histogram inverse CDF

Calling Sequence

x=distfun_histoinv(p,h)
x=distfun_histoinv(p,h,lowertail)

Parameters

p :

a matrix of doubles, the probability

h :

an histogram object

lowertail :

a 1-by-1 matrix of booleans, the tail (default lowertail=%t). If lowertail is true (the default), then considers P(X<=x) otherwise P(X>x).

x :

a matrix of doubles, the outcome

Description

Computes the inverse cumulated probability distribution function of the Histogram.

The h object must be created with distfun_histocreate.

Examples

m=1000;
data=distfun_normrnd(0,1,m,1);
h=distfun_histocreate("data",data);
p=linspace(0.001,0.999);
x=distfun_histoinv(p,h);
scf();
plot(p,x,"r-")
xnorm=distfun_norminv(p,0,1);
plot(p,xnorm,"b-")
legend(["Histogram","Exact"],"in_upper_left");
xtitle("Histogram")
xlabel("p")
ylabel("x|P(X<x)=p")

Authors


Report an issue
<< distfun_histocreate Histogram distfun_histopdf >>