File Exchange

image thumbnail

Probability Density Function (PDF) Estimator (V3.2)

version 1.4 (61.1 KB) by

An estimate of probability density function of the given random data with bounded support.

4.88889
9 Ratings

31 Downloads

Updated

View License

This function provides an estimate of probability density function for a given random data (an 1-d vector). The estimation can be done with a specified number of intervals, and bandwidth. Without any output, the function will plot the probability density function. A few examples are included to show how to use the function and its output.

It also includes bounded support. For some problems, bounded support is important. For example, many physical problems require positive variables. This function is able to estimate PDF for such problems as well if the lower and upper bounds are specified.

The new version includes cdf and inverse cdf estimation.

Comments and Ratings (12)

yahong li

money

money (view profile)

GAO

GAO (view profile)

Excellent -- exactly what I needed.

Turkay YILDIZ

Liu ?

Liu ? (view profile)

V. Poor

ricardo lusternik

Yi Cao

The file has been upgraded to use Gaussian kernel smoothing estimation algorithm.

Dimitri Shvorob

It's an ad hoc smoother:
p.f(2:end-1)=p.f(2:end-1)*0.5+(p.f(1:end-2)+p.f(3:end))*0.25;
One can search FEX for 'kernel density estimator'.

Jesper Henriksen

I havent tried this code, but it sounds very similar to matlabs ksdensity

Updates

1.4

Bug fix and new functionality

1.3

a bug fixed

1.2

update with cdf and inverse cdf estimation.

1.1

update descriptions

update with the optimal bandwidth

upgrade to use Gaussian kernel density estimation

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video