Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1285

Re: Fit Gaussian function to histogram

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Fit Gaussian function to histogram
Date 2011-03-30 09:16 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <imusd7$i8s$1@smc.vnet.net> (permalink)

Show all headers | View raw


On 3/29/11 at 6:54 AM, cubsfan334@gmail.com (cubsfan334) wrote:

>I realize that I can generate a histogram from a data set using the
>Histogram[{data},bin size] command, yet this only seems to create a
>graphic.  Is there anyway to fit a function (preferably Gaussian) to
>the histogram Mathematica creates?

Is this something like what you want to do?

data = RandomReal[NormalDistribution[], 1000];

Show[Histogram[data, Automatic, "PDF"],
  Plot[PDF[NormalDistribution[], x], {x, -3, 3}]]

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Fit Gaussian function to histogram Bill Rowe <readnews@sbcglobal.net> - 2011-03-30 09:16 +0000

csiph-web