Nakagami Distribution#

Generalization of the chi distribution. Shape parameter is ν>0. The support is x0.

f(x;ν)=2ννΓ(ν)x2ν1exp(νx2)F(x;ν)=γ(ν,νx2)Γ(ν)G(q;ν)=1νγ1(ν,qΓ(ν))

where γ is the lower incomplete gamma function, γ(ν,x)=x0tν1etdt.

μ=Γ(ν+12)νΓ(ν)μ2=[1μ2]γ1=μ(14vμ2)2νμ3/22γ2=6μ4ν+(8ν2)μ22ν+1νμ22

Implementation: scipy.stats.nakagami

MLE of the Nakagami Distribution in SciPy (nakagami.fit)#

The probability density function of the nakagami distribution in SciPy is

f(x;ν,μ,σ)=2ννσΓ(ν)(xμσ)2ν1exp(ν(xμσ)2),

for x such that xμσ0, where ν12 is the shape parameter, μ is the location, and σ is the scale.

The log-likelihood function is therefore

l(ν,μ,σ)=Ni=1log(2ννσΓ(ν)(xiμσ)2ν1exp(ν(xiμσ)2)),

which can be expanded as

l(ν,μ,σ)=Nlog(2)+Nνlog(ν)Nlog(Γ(ν))2Nνlog(σ)+(2ν1)Ni=1log(xiμ)νσ2Ni=1(xiμ)2,

Leaving supports constraints out, the first-order condition for optimality on the likelihood derivatives gives estimates of parameters:

lν(ν,μ,σ)=N(1+log(ν)ψ(0)(ν))+2Ni=1log(xiμσ)Ni=1(xiμσ)2=0,lμ(ν,μ,σ)=(12ν)Ni=11xiμ+2νσ2Ni=1xiμ=0, andlσ(ν,μ,σ)=2Nν1σ+2νσ3Ni=1(xiμ)2=0,

where ψ(0) is the polygamma function of order 0; i.e. ψ(0)(ν)=ddνlogΓ(ν).

However, the support of the distribution is the values of x for which xμσ0, and this provides an additional constraint that

μminixi.

For ν=12, the partial derivative of the log-likelihood with respect to μ reduces to:

lμ(ν,μ,σ)=σ2Ni=1(xiμ),

which is positive when the support constraint is satisfied. Because the partial derivative with respect to μ is positive, increasing μ increases the log-likelihood, and therefore the constraint is active at the maximum likelihood estimate for μ

μ=minixi,ν=12.

For ν sufficiently greater than 12, the likelihood equation lμ(ν,μ,σ)=0 has a solution, and this solution provides the maximum likelihood estimate for μ. In either case, however, the condition μ=minixi provides a reasonable initial guess for numerical optimization.

Furthermore, the likelihood equation for σ can be solved explicitly, and it provides the maximum likelihood estimate

σ=Ni=1(xiμ)2N.

Hence, the _fitstart method for nakagami uses

μ0=minixiandσ0=Ni=1(xiμ0)2N

as initial guesses for numerical optimization accordingly.