Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Re: [mg5309] Mathematica: Weibull distribution fnc.
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
BobHanlon@aol.com

Posts: 906
Registered: 12/7/04
Re: [mg5309] Mathematica: Weibull distribution fnc.
Posted: Nov 26, 1996 3:36 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

This shows how to work with Weibull distribution.

Bob Hanlon (Col, USAF (Retired))
______________________________________

In[1]:=
Needs["Statistics`ContinuousDistributions`"]
Needs["Statistics`DiscreteDistributions`"]
n /: Negative[n] = False;
n /: IntegerQ[n] = True;
Off[General::spell1, General::intinit]

Let the number of failures, X, be a Poisson process with mean (mu t) where mu

is given by

In[6]:=
mu = (1/beta) (t/beta)^(alpha - 1);

In[7]:=
PDF[PoissonDistribution[mu t], n] // Simplify

Out[7]=
t alpha n
((----) )
beta
-----------------
alpha
(t/beta)
E n!

Let T be the time until the first failure. Then

Pr{T <= t} = 1 - Pr{T > t} = 1 - PDF[PoissonDistribution[mu t], 0]

In[8]:=
cdf = 1 - PDF[PoissonDistribution[mu t], 0]

Out[8]=
-1 + alpha
-((t (t/beta) )/beta)
1 - E

The PDF for T is then

In[9]:=
pdf = D[cdf, t] // Simplify

Out[9]=
t alpha
alpha (----)
beta
-----------------
alpha
(t/beta)
E t

In[10]:=
PDF[WeibullDistribution[alpha, beta], t] - pdf == 0 //
PowerExpand

Out[10]=
True

Consequently, T has a Weibull distribution.

In[11]:=
Domain[WeibullDistribution[]]

Out[11]=
{0, Infinity}

The exponential and Rayleigh distributions are special cases of the Weibull
distribution with alpha equal to 1 and 2 respectively:

In[12]:=
PDF[WeibullDistribution[1, 1/lambda], x] ==
PDF[ExponentialDistribution[lambda], x]

Out[12]=
True

In[13]:=
PDF[WeibullDistribution[2, Sqrt[2] sigma], x] ==
PDF[RayleighDistribution[sigma], x]

Out[13]=
True

In[14]:=
Mean[WeibullDistribution[alpha, beta]]

Out[14]=
1
beta Gamma[1 + -----]
alpha

In[15]:=
Variance[WeibullDistribution[alpha, beta]]

Out[15]=
2 1 2 2
beta (-Gamma[1 + -----] + Gamma[1 + -----])
alpha alpha

Generalized moment:

In[16]:=
Integrate[x^t PDF[WeibullDistribution[alpha, beta], x],
{x, 0, Infinity}] // PowerExpand

Out[16]=
t t
beta Gamma[1 + -----]
alpha


FORWARDED MESSAGE:

Subj: [mg5309] Mathematica: Weibull distribution fnc.
Date: Sat, Nov 23, 1996 7:43 AM EDT
From: riglinbd@ml.wpafb.af.mil
X-From: riglinbd@ml.wpafb.af.mil (Brian)
To: mathgroup@smc.vnet.net

I am trying to employ a Weibull distribution in one of the
notebooks I am working on. However, Mathematica provides
scant if any information on how to use this function. Could
some one with more experience than I please enlighten me as
to how the Weibull distribution function found in the
Statistics'ContinuousDistribution package is used.







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.