4.75

4.8 | 4 ratings Rate this file 415 downloads (last 30 days) File Size: 47.62 KB File ID: #19121

Probability Density Function (PDF) Estimator (V2.3)

by Yi Cao

 

09 Mar 2008 (Updated 04 Nov 2009)

Code covered by BSD License  

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

Download Now | Watch this File

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

The author wishes to acknowledge the following in the creation of this submission:
PDFPLOT
This submission has inspired the following:
Bivariant Gaussian Kernel Density Estimation, Update PDF Estimation

MATLAB release MATLAB 7.9 (2009b)
Zip File Content  
HTML Files Gaussian Kernel Density Estimation Demonstration
Other Files gkdeb.m,
gkdetest.m,
html/gkdetest_01.png,
html/gkdetest_02.png,
html/gkdetest_03.png,
html/gkdetest_04.png,
html/gkdetest_05.png,
html/gkdetest_06.png,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
10 Mar 2008 Jesper Henriksen

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

10 Mar 2008 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'.

10 Mar 2008 Yi Cao

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

08 May 2008 ricardo lusternik  
05 Apr 2009 V. Poor  
Please login to add a comment or rating.
Updates
11 Mar 2008

upgrade to use Gaussian kernel density estimation

13 Mar 2008

update with the optimal bandwidth

14 Apr 2008

upgrade for bounded support and to include the html description.

24 Apr 2009

update descriptions

04 Nov 2009

update with cdf and inverse cdf estimation.

Tag Activity for this File
Tag Applied By Date/Time
statistics Yi Cao 22 Oct 2008 09:52:33
probability Yi Cao 22 Oct 2008 09:52:33
probability density function Yi Cao 22 Oct 2008 09:52:33
probability function Yi Cao 22 Oct 2008 09:52:33
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com