Re: weibull distribution
- To: mathgroup at smc.vnet.net
- Subject: [mg31399] Re: [mg31375] weibull distribution
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Wed, 31 Oct 2001 19:59:30 -0500 (EST)
- References: <200110310831.DAA26475@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Of course there is! You'll find a lot of material in the on-line Help Browser, especifically on the subject of nonlinear fitting. Fitting problems are also described extensively in David Withoff's tutorial on Statistics Examples, in Wolfram's Selected Tutorial Notes on Mathematica. It is worthwhile getting hold of a copy (very inexpensive, too). Let me just reproduce one of Withoff's examples as applied to your question. This is the Weibull PDF with shape and scale parameters (5,1): In[1]:= orig = Plot[5*x^4*Exp[-x^5], {x, 0, 1.5}]; These are data from said PDF plus error: In[2]:= data = Table[{x, 5*x^4*Exp[-x^5] + Random[Real, {-0.2, 0.2}]}, {x, 0.3, 1.4, 0.1}]; In[3]:= grdat = ListPlot[data] This is combined graph of PDF and data: In[4]:= Show[orig, grdat] This is Withoff's algorithm for obtaining sum of squares of residuals: In[5]:= SumOfSquares[data_, model_, vars_] := Module[{func, prediction, response, residuals}, func = Evaluate /@ Function[vars, model]; prediction = Apply[func, data, 1]; response = Last /@ data; residuals = response - prediction; residuals . residuals] This is application of Withoff's function to our data and model with scale parameter 1: In[6]:= SS[a_] = SumOfSquares[data, a*x^(a - 1)*Exp[-x^a], x] This is graph of residuals as a function of shape parameter In[7]:= Plot[SS[a], {a, -1, 8}] This finds estimate of shape parameter: In[8]:= FindMinimum[SS[a], {a, 4}] Out[8]= {0.13621, {a -> 4.9398}} Estimate is 4.9398 vs true value of 5, with only 12 observations. Not bad. Tomas Garza Mexico City ----- Original Message ----- From: "Sarat Pothuri" <chandrika at ittc.ukans.edu> To: mathgroup at smc.vnet.net Subject: [mg31399] [mg31375] weibull distribution > Hi! > > I am trying to fit data to weibul distribution. Is there a way to do > using mathematica? > > > - > sarat > >
- References:
- weibull distribution
- From: Sarat Pothuri <chandrika@ittc.ukans.edu>
- weibull distribution