In[]:=
PDF[KumaraswamyDistribution[β,α],x]
Out[]=
-1+β
x
-1+α
(1-
β
x
)
αβ
0<x<1
0
True
((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-
β
x
]+Log[α]+Log[β]
(*now,toobtaintheentropyfunction;*)
In[]:=
H[f_]=Normal[-Integrate[
-1+β
x
-1+α
(1-
β
x
)
αβ(-1+β)Log[x]+(-1+α)Log[1-
β
x
]+Log[α]+Log[β],{x,0,1}]]
Out[]=
-
β-αβ+(α-αβ)HarmonicNumber[α]+αβLog[αβ]
αβ
(*wededucethattomaximizeH[f],thefollowingthreeconstraintsshouldbesatisfied*)
In[]:=
c1=Normal[Integrate[
-1+β
x
-1+α
(1-
β
x
)
αβ,{x,0,1}]]
Out[]=
1
In[]:=
c2=Normal[Integrate[Log[x]
-1+β
x
-1+α
(1-
β
x
)
αβ,{x,0,1}]]
Out[]=
-
HarmonicNumber[α]
β
In[]:=
c3=Normal[Integrate[Log[1-x^β]
-1+β
x
-1+α
(1-
β
x
)
αβ,{x,0,1}]]
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

Gamma
1-λ1
β
Gamma[1-λ2]
βGamma
1+β-λ1-βλ2
β

In[]:=
%30*Exp[λ0]
Out[]=
Gamma
1-λ1
β
Gamma[1-λ2]
βGamma
1+β-λ1-βλ2
β

In[]:=
Exp[λ0]==
Gamma
1-λ1
β
Gamma[1-λ2]
βGamma
1+β-λ1-βλ2
β

Out[]=
λ0


Gamma
1-λ1
β
Gamma[1-λ2]
βGamma
1+β-λ1-βλ2
β

(*theinverseofe^λ0is*)
In[]:=
Exp[-λ0]==1
Gamma
1-λ1
β
Gamma[1-λ2]
βGamma
1+β-λ1-βλ2
β

Out[]=
-λ0


βGamma
1+β-λ1-βλ2
β

Gamma
1-λ1
β
Gamma[1-λ2]
​
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
β

Gamma
1-λ1
β
Gamma[1-λ2]
-λ1
x
-λ2
(1-
β
x
)
;
(*comparingf1[x]withourpdf[
-1+β
x
-1+α
(1-
β
x
)
αβ],weconcludethatλ1=1-β,λ2=1-α*)
(*usingthepreviousequations,theentropyfunctionisgivenby:*)
In[]:=
H[f_]=-Log
βGamma
1+β-λ1-βλ2
β

Gamma
1-λ1
β
Gamma[1-λ2]
+λ1exp[Log[x]]+λ2exp[Log[1-x^β]]
Out[]=
λ1exp[Log[x]]+λ2expLog[1-
β
x
]-Log
βGamma
1+β-λ1-βλ2
β

Gamma
1-λ1
β
Gamma[1-λ2]

(*wenoticethatwhenevaluatingλ1,λ2,
βGamma
1+β-λ1-βλ2
β

Gamma
1-λ1
β
Gamma[1-λ2]
=α*)
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]]-Gamma
1-λ1
β
Gamma[1-λ2]
Gamma
1+β-λ1-βλ2
β
PolyGamma0,
1-λ1
β

Gamma
1-λ1
β
Gamma[1-λ2]
-
Gamma
1+β-λ1-βλ2
β
PolyGamma0,
1+β-λ1-βλ2
β

Gamma
1-λ1
β
Gamma[1-λ2]
βGamma
1+β-λ1-βλ2
β
0
In[]:=
eq2=D[H[f],λ2]==0
Out[]=
expLog[1-
β
x
]-Gamma
1-λ1
β
Gamma[1-λ2]
βGamma
1+β-λ1-βλ2
β
PolyGamma[0,1-λ2]
Gamma
1-λ1
β
Gamma[1-λ2]
-
βGamma
1+β-λ1-βλ2
β
PolyGamma0,
1+β-λ1-βλ2
β

Gamma
1-λ1
β
Gamma[1-λ2]
βGamma
1+β-λ1-βλ2
β
0
(*
evaluating λ1 , λ2 , we get :
*)
In[]:=
eq1f=eq1/.{λ1->1-β,λ2->1-α}
Out[]=
exp[Log[x]]-
Gamma[α]-
EulerGammaGamma
2β-(1-α)β
β

Gamma[α]
-
Gamma
2β-(1-α)β
β
PolyGamma0,
2β-(1-α)β
β

Gamma[α]
βGamma
2β-(1-α)β
β

0
In[]:=
eq2f=eq2/.{λ1->1-β,λ2->1-α}
Out[]=
expLog[1-
β
x
]-
1
βGamma
2β-(1-α)β
β

Gamma[α]
βGamma
2β-(1-α)β
β
PolyGamma[0,α]
Gamma[α]
-
βGamma
2β-(1-α)β
β
PolyGamma0,
2β-(1-α)β
β

Gamma[α]
0
(*definingj[t]...justtocheck:))*)
In[]:=
j[t_]=D[Log[Gamma[t]],t]
Out[]=
PolyGamma[0,t]
((simulation ))