Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!newsfeed.stanford.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Curve fitting to a histogram to give a probability density function.
Date: Mon, 9 Jun 2008 14:37:44 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 20
Message-ID: <g2jf7o$711$1@canopus.cc.umanitoba.ca>
References: <g2je6j$m19$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1213022264 7201 192.70.172.160 (9 Jun 2008 14:37:44 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Mon, 9 Jun 2008 14:37:44 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:472853



In article <g2je6j$m19$1@fred.mathworks.com>,
Noel Kelleher <naych@hotmail.com> wrote:

>If you have a histogram of data that is normally
>distributed, is there a matlab function that will fit a
>curve to the bell shape of the histogram to give you a
>general probability density function for that data set.

No, there isn't. If the histogram is normally distributed then it
has infinite tails in both direction. There are no routines in Matlab
that can work with infinite vectors.

If you want to pretend that the histogram counts have a normal
distribution even though they do not have infinite tails, then
simply take the mean() and standard deviation of the count data;
the pdf is then just the pdf of the normal distribution with those
mean and standard deviation.
-- 
  "What we have to do is to be forever curiously testing new
  opinions and courting new impressions."     -- Walter Pater