Code covered by the BSD License

### Highlights from Probability Density Function (PDF) Estimator (V3.2)

4.875
4.9 | 8 ratings Rate this file 38 Downloads (last 30 days) File Size: 61.1 KB File ID: #19121 Version: 1.4

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

by

### Yi Cao (view profile)

09 Mar 2008 (Updated )

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

File Information
Description

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.

Acknowledgements

Pdfplot inspired this file.

This file inspired Update Pdf Estimation and Bivariant Kernel Density Estimation (V2.1).

MATLAB release MATLAB 7.10 (R2010a)
10 Aug 2014 money

21 Apr 2014 GAO

### GAO (view profile)

15 Aug 2012 jonatan.lisalde

### jonatan.lisalde (view profile)

22 Apr 2011 Brent Boehlert

### Brent Boehlert (view profile)

Excellent -- exactly what I needed.

12 Apr 2010 Turkay YILDIZ

### Turkay YILDIZ (view profile)

02 Dec 2009 Liu ?

### Liu ? (view profile)

05 Apr 2009 V. Poor

### V. Poor (view profile)

08 May 2008 ricardo lusternik
10 Mar 2008 Yi Cao

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

Comment only
10 Mar 2008 Dimitri Shvorob

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'.

Comment only
10 Mar 2008 Jesper Henriksen

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

Comment only
11 Mar 2008

upgrade to use Gaussian kernel density estimation

13 Mar 2008

update with the optimal bandwidth

24 Apr 2009 1.1

update descriptions

04 Nov 2009 1.2

update with cdf and inverse cdf estimation.

07 Apr 2010 1.3

a bug fixed

08 Apr 2010 1.4

Bug fix and new functionality