Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: gaussian fit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67427] Re: gaussian fit
  • From: Dan Siegal-Gaskins <siegal at uchicago.edu>
  • Date: Fri, 23 Jun 2006 04:31:50 -0400 (EDT)
  • References: <31e.5dd6f56.31cb6d60@aol.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks!
dan

On Wed, 21 Jun 2006 BobHanlon at aol.com wrote:

> Do not send questions to me. Send them to mathgroup at smc.vnet.net
>
> Needs["Statistics`"];
>
>
> data=RandomArray[
>
>       NormalDistribution[5, 3], 50];
>
>
>
> llf=Plus@@(Log[PDF[
>
>                 NormalDistribution[mu, sigma],#]]&/@data);
>
>
>
> The MLE estimates from the data are then
>
>
>
> param=FindRoot[{D[llf,mu]==0,D[llf,sigma]==0},
>
>     {{mu,0},{sigma,1}}]
>
>
>
> {mu -> 5.086573183619005, sigma -> 3.342251656903573}
>
>
>
> This method can be applied to most distribution models. However, for the
> Gausssian model, these can be gotten directly from Mean and StandardDeviationMLE
>
>
> (mu/.param)==Mean[data]
>
>
>
> True
>
>
>
> (sigma/.param)==StandardDeviationMLE[data]
>
>
>
> True
>
>
> Bob Hanlon
>
> In a message dated 6/21/06 7:14:38 PM, siegal at uchicago.edu writes:
>
>
>> Hello Mr. Hanlon,
>>
>> I apologize for using the email address in google groups, but I wanted to
>> ask you a specific question. You posted a response to someone in the
>> Mathematica group back in 2000 about trying to produce a Gaussian fit to
>> some data, and I'm having some trouble understanding it. My data is
>> only slightly different than the set in the original question; it's just
>> a one dimensional list of numbers:
>>
>> data = {n1, n2, n3, ... , nn};
>>
>> Seems simple enough, but for some reason I've been unable to adapt your
>> 2000 response for my data. Basically I'd like to create a probability
>> distribution from my set of numbers. Is it extremely easy, and I'm just
>> missing something? It seems like it would be the kind of thing that
>> Mathematica would have built in.
>>
>> Thank you so much for all your help. Your responses to the group are
>> always useful.
>>
>> Cheers,
>> Dan
>>
>> ********************************************************
>>
>> Dan Siegal-Gaskins
>> 929 E. 57th St, W309
>> Chicago, IL 60637
>>
>> phone: 773.834.9094
>> fax: 773.702.0439
>> email: siegal at uchicago.edu
>>
>>
>

********************************************************

Dan Siegal-Gaskins
929 E. 57th St, W309
Chicago, IL 60637

phone: 773.834.9094
fax: 773.702.0439
email: siegal at uchicago.edu


  • Prev by Date: Re: Mathematica icons for GPL'ed software.
  • Next by Date: Re: Please Help a student...
  • Previous by thread: Re: Mathematica icons for GPL'ed software.
  • Next by thread: Points sampled by NIntegrate