In[]:=
PDF[KumaraswamyDistribution[β,α],x]
Out[]=
|
((P.O.M.E)) (principle of maximum entropy )
step1 :specifying the constrains .
(*westartbytakingthelogtothekum(α,β)PDF*)
In[]:=
PowerExpand[Log[αβ]]
-1+β
x
-1+α
(1-)
β
x
Out[]=
(-1+β)Log[x]+(-1+α)Log[1-]+Log[α]+Log[β]
β
x
(*now,toobtaintheentropyfunction;*)
In[]:=
H[f_]=Normal[-Integrate[αβ(-1+β)Log[x]+(-1+α)Log[1-]+Log[α]+Log[β],{x,0,1}]]
-1+β
x
-1+α
(1-)
β
x
β
x
Out[]=
-
β-αβ+(α-αβ)HarmonicNumber[α]+αβLog[αβ]
αβ
(*wededucethattomaximizeH[f],thefollowingthreeconstraintsshouldbesatisfied*)
In[]:=
c1=Normal[Integrate[αβ,{x,0,1}]]
-1+β
x
-1+α
(1-)
β
x
Out[]=
1
In[]:=
c2=Normal[Integrate[Log[x]αβ,{x,0,1}]]
-1+β
x
-1+α
(1-)
β
x
Out[]=
-
HarmonicNumber[α]
β
In[]:=
c3=Normal[Integrate[Log[1-x^β]αβ,{x,0,1}]]
-1+β
x
-1+α
(1-)
β
x
Out[]=
-
1
α
step2 : construction of the zeroth lagrange multiplier .
(*thepdff[x]consistentwiththeconstrainstisconstructedusinglagrangemultiplierstobeofthefollowingform:*)
In[]:=
f[x_]=Exp[-λ0-λ1Log[x]-λ2Log[1-x^β]]
Out[]=
-λ0-λ1Log[x]-λ2Log[1-]
β
x
(*itsbasicallyexp[L.Cofλ0,λ1,λ2multipliedbyc1,c2,c3respectively]*)
In[]:=
pp=PowerExpand[Log[f[x]]]
Out[]=
-λ0-λ1Log[x]-λ2Log[1-]
β
x
In[]:=
Exp[pp]
Out[]=
-λ0-λ1Log[x]-λ2Log[1-]
β
x
In[]:=
Normal[Integrate[f[x],{x,0,1}]]
Out[]=
-λ0
1-λ1
β
βGamma
1+β-λ1-βλ2
β
In[]:=
%30*Exp[λ0]
Out[]=
GammaGamma[1-λ2]
1-λ1
β
βGamma
1+β-λ1-βλ2
β
In[]:=
Exp[λ0]==
GammaGamma[1-λ2]
1-λ1
β
βGamma
1+β-λ1-βλ2
β
Out[]=
λ0
GammaGamma[1-λ2]
1-λ1
β
βGamma
1+β-λ1-βλ2
β
(*theinverseofe^λ0is*)
In[]:=
Exp[-λ0]==1
GammaGamma[1-λ2]
1-λ1
β
βGamma
1+β-λ1-βλ2
β
Out[]=
-λ0
βGamma
1+β-λ1-βλ2
β
GammaGamma[1-λ2]
1-λ1
β
step3: derivation of the entropy function.
(*substitutingthevalueofe^-λ0intof[x],weget:*)
In[]:=
Simplify[Exp[-λ1Log[x]-λ2Log[1-]]]
β
x
Out[]=
-λ1
x
-λ2
(1-)
β
x
In[]:=
f1[x_]=;
βGamma
1+β-λ1-βλ2
β
GammaGamma[1-λ2]
1-λ1
β
-λ1
x
-λ2
(1-)
β
x
(*comparingf1[x]withourpdf[αβ],weconcludethatλ1=1-β,λ2=1-α*)
-1+β
x
-1+α
(1-)
β
x
(*usingthepreviousequations,theentropyfunctionisgivenby:*)
In[]:=
H[f_]=-Log+λ1exp[Log[x]]+λ2exp[Log[1-x^β]]
βGamma
1+β-λ1-βλ2
β
GammaGamma[1-λ2]
1-λ1
β
Out[]=
λ1exp[Log[x]]+λ2expLog[1-]-Log
β
x
βGamma
1+β-λ1-βλ2
β
GammaGamma[1-λ2]
1-λ1
β
(*wenoticethatwhenevaluatingλ1,λ2,=α*)
βGamma
1+β-λ1-βλ2
β
GammaGamma[1-λ2]
1-λ1
β
step4: finding the relation between the distributions parameters and the constraints
(*wetakepartialderiavtivesofH[f]w.r.tλ1,λ2,β*)
In[]:=
eq1=D[H[f],λ1]==0
Out[]=
exp[Log[x]]-GammaGamma[1-λ2]-βGamma0
1-λ1
β
GammaPolyGamma0,
1+β-λ1-βλ2
β
1-λ1
β
GammaGamma[1-λ2]
1-λ1
β
GammaPolyGamma0,
1+β-λ1-βλ2
β
1+β-λ1-βλ2
β
GammaGamma[1-λ2]
1-λ1
β
1+β-λ1-βλ2
β
In[]:=
eq2=D[H[f],λ2]==0
Out[]=
expLog[1-]-GammaGamma[1-λ2]-βGamma0
β
x
1-λ1
β
βGammaPolyGamma[0,1-λ2]
1+β-λ1-βλ2
β
GammaGamma[1-λ2]
1-λ1
β
βGammaPolyGamma0,
1+β-λ1-βλ2
β
1+β-λ1-βλ2
β
GammaGamma[1-λ2]
1-λ1
β
1+β-λ1-βλ2
β
(**)
evaluating λ1 , λ2 , we get :
In[]:=
eq1f=eq1/.{λ1->1-β,λ2->1-α}
Out[]=
exp[Log[x]]-0
Gamma[α]--
EulerGammaGamma
2β-(1-α)β
β
Gamma[α]
GammaPolyGamma0,
2β-(1-α)β
β
2β-(1-α)β
β
Gamma[α]
βGamma
2β-(1-α)β
β
In[]:=
eq2f=eq2/.{λ1->1-β,λ2->1-α}
Out[]=
expLog[1-]-Gamma[α]-0
β
x
1
βGamma
2β-(1-α)β
β
βGammaPolyGamma[0,α]
2β-(1-α)β
β
Gamma[α]
βGammaPolyGamma0,
2β-(1-α)β
β
2β-(1-α)β
β
Gamma[α]
(*definingj[t]...justtocheck:))*)
In[]:=
j[t_]=D[Log[Gamma[t]],t]
Out[]=
PolyGamma[0,t]
((simulation ))