({{, (RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution])[γ,σ] 
represents a log-logistic distribution with shape parameter γ and scale parameter σ.}})

OpenersNotesSection(Spacer1)Details

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) is also known as Fisk distribution.

The probability density for value x in a log-logistic distribution is proportional to (x^(γ-1)) (((1+(((x/σ))^γ)))^(-2)) for x>0.

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) allows γ and σ to be any positive real numbers.

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) allows σ to be a quantity of any unit dimension, and γ to be a dimensionless quantity. »

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) can be used with such functions as (RefLink[Mean, paclet:ref/Mean]), (RefLink[CDF, paclet:ref/CDF]), and (RefLink[RandomVariate, paclet:ref/RandomVariate]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (21)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Probability density function:

Plot[Table[PDF[LogLogisticDistribution[γ,.5],x],{γ,{5,7,10}}]//Evaluate,{x,0,1},Filling->Axis]

Plot[Table[PDF[LogLogisticDistribution[5,σ],x],{σ,{.8,1.5,2}}]//Evaluate,{x,0,4},Filling->Axis]

PDF[LogLogisticDistribution[γ,σ],x]

Cumulative distribution function:

Plot[Table[CDF[LogLogisticDistribution[γ,.5],x],{γ,{5,7,10}}]//Evaluate,{x,0,1},Filling->Axis]

Plot[Table[CDF[LogLogisticDistribution[5,σ],x],{σ,{.8,1.5,2}}]//Evaluate,{x,0,4},Filling->Axis]

CDF[LogLogisticDistribution[γ,σ],x]

Mean and variance:

Mean[LogLogisticDistribution[γ,σ]]

Variance[LogLogisticDistribution[γ,σ]]

Median:

Median[LogLogisticDistribution[γ,σ]]

OpenersExampleSection1(Spacer1)Scope  (8)

Generate a sample of pseudorandom numbers from a log-logistic distribution:

data=RandomVariate[LogLogisticDistribution[30,1.2],10^4];

Compare its histogram to the PDF:

Show[
Histogram[data,20,"PDF"],
Plot[PDF[TruncatedDistribution[{0,20},LogLogisticDistribution[30,1.2]],x],{x,0,1.5},PlotRange->All,PlotStyle->Thick]]

Distribution parameters estimation:

sample=RandomVariate[LogLogisticDistribution[20,1.5],10^3];

Estimate the distribution parameters from sample data:

edist=EstimatedDistribution[sample,LogLogisticDistribution[γ,σ]]

Compare the density histogram of the sample with the PDF of the estimated distribution:

Show[Histogram[sample,20,"PDF"],Plot[PDF[TruncatedDistribution[{0,20},edist],x],{x,1,2},PlotStyle->Thick]]

Skewness depends only on the shape parameter γ:

Plot[Skewness[LogLogisticDistribution[γ,σ]],{γ,3,10}]

Skewness[LogLogisticDistribution[γ,σ]]

For large values of γ, log-logistic distribution becomes symmetric:

Limit[Skewness[LogLogisticDistribution[γ,σ]],γ->∞]

Kurtosis depends only on the shape parameter γ:

Plot[Kurtosis[LogLogisticDistribution[γ,σ]],{γ,4,10}]

Kurtosis[LogLogisticDistribution[γ,σ]]

Kurtosis has horizontal asymptote as γ gets large:

Limit[Kurtosis[LogLogisticDistribution[γ,σ]],γ->∞]//N

Different moments with closed forms as functions of parameters:

FormulaGrid[list_,type_]:=Grid[Transpose[{list}],Alignment->{Left,Automatic},Background->{None,{{Lighter[Blend[Switch[type,M,{Blue,Green},CM,{Red,Orange},FM,{Magenta,Cyan},C,{Purple,Red}]],.8],White}}},Dividers->{None,{Darker[Gray,.6],{False},Darker[Gray,.6]}},ItemSize->30]

(RefLink[Moment, paclet:ref/Moment]):

FormulaGrid[Table[Moment[LogLogisticDistribution[γ,σ],k],{k,3}],M]

Closed form for symbolic order:

Moment[LogLogisticDistribution[γ,σ],r]

(RefLink[CentralMoment, paclet:ref/CentralMoment]):

FormulaGrid[Table[CentralMoment[LogLogisticDistribution[γ,σ],k]//FullSimplify,{k,3}],CM]

(RefLink[FactorialMoment, paclet:ref/FactorialMoment]):

FormulaGrid[Table[FactorialMoment[LogLogisticDistribution[γ,σ],k]//FullSimplify,{k,3}],FM]

(RefLink[Cumulant, paclet:ref/Cumulant]):

FormulaGrid[Table[Cumulant[LogLogisticDistribution[γ,σ],k]//FullSimplify,{k,3}],C]

Hazard function:

Plot[Table[HazardFunction[LogLogisticDistribution[γ,.5],x],{γ,{5,7,10}}]//Evaluate,{x,0,2},Filling->Axis]

Plot[Table[HazardFunction[LogLogisticDistribution[5,σ],x],{σ,{.8,1.5,2}}]//Evaluate,{x,0,4},Filling->Axis]

HazardFunction[LogLogisticDistribution[γ,σ],x]

Quantile function:

Plot[Table[Quantile[LogLogisticDistribution[γ,.5],q],{γ,{5,7,10}}]//Evaluate,{q,0,1},Filling->Axis]

Plot[Table[Quantile[LogLogisticDistribution[5,σ],q],{σ,{.8,1.5,2}}]//Evaluate,{q,0,1},Filling->Axis]

Quantile[LogLogisticDistribution[γ,σ],q]

Consistent use of (RefLink[Quantity, paclet:ref/Quantity]) in parameters yields (RefLink[QuantityDistribution, paclet:ref/QuantityDistribution]):

salary𝒟=LogLogisticDistribution[3.58,(QuantityPrefix[52970, "$" , US dollars, "USDollars"])]

Find the interquartile range:

InterquartileRange[salary𝒟]

OpenersExampleSection2(Spacer1)Applications  (2)

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) can be used to model incomes:

ExampleData[{"Statistics","UniversitySalaries"},"ColumnDescriptions"]

universityA=Cases[ExampleData[{"Statistics","UniversitySalaries"}],{dept_,perc_,salary_,campus:"A"}:>{perc,salary}];

Adjust part-time to full-time and select nonzero values, attach currency unit:

salaries=Quantity[Cases[universityA,{p_?Positive,s_?Positive}:>s/p],"USDollars"];

Fit log-logistic distribution to the data:

edist=EstimatedDistribution[salaries,LogLogisticDistribution[γ,σ],{{γ,2},{σ,Median[salaries]}}]

Compare the histogram of the data to the PDF of the estimated distribution:

Show[Histogram[salaries,{0,200000,10000},"PDF",AxesLabel->Automatic],Plot[PDF[edist,(QuantityPrefix[x, "$" , US dollars, "USDollars"])],{x,0,200000},PlotStyle->Thick]]

Find the average income at a large state university:

Mean[edist]

Find the probability that a salary is at most $15,000:

NProbability[x≤(QuantityPrefix[15000, "$" , US dollars, "USDollars"]),x\[Distributed]edist]

Find the probability that a salary is at least $150,000:

NProbability[x≥(QuantityPrefix[150000, "$" , US dollars, "USDollars"]),x\[Distributed]edist]

Find the median salary:

Median[edist]

Simulate the incomes for 100 randomly selected employees of such a university:

ListPlot[{RandomVariate[edist,100],{{0,Median[edist]},{100,Median[edist]}}},Filling->Axis,Joined->{False,True},AxesLabel->Automatic]

(RefLink[BetaPrimeDistribution, paclet:ref/BetaPrimeDistribution]) can be used to model state per capita incomes:

data=ExampleData[{"Statistics","USStateIncome"}]

Attach currency units:

incomes=MapAt[Quantity[#,"USDollars"]&,data,{All,2}];
incomeValues=Part[incomes,All,2];

Fit log-logistic distribution to the data:

edist=EstimatedDistribution[incomeValues,LogLogisticDistribution[γ,σ],ParameterEstimator->{"MaximumLikelihood",Method->"NMaximize"}]

Compare the histogram of the data to the PDF of the estimated distribution:

Show[Histogram[incomeValues,15,"PDF",AxesLabel->Automatic],Plot[PDF[edist,Quantity[x,"$"]],{x,20000,48000},PlotStyle->Thick]]

Find the average income per capita:

meanIncome=Mean[edist]

Find states with income close to the average:

Cases[incomes,{s_,inc_}/;Abs[inc-meanIncome]<Quantity[200,"USDollars"]]

Find the median income per capita:

medianIncome=Median[edist]

Find states with income close to the median:

Cases[incomes,{s_,inc_}/;Abs[inc-medianIncome]<Quantity[300,"USDollars"]]

Find log-likelihood value:

LogLikelihood[edist,incomeValues]

OpenersExampleSection3(Spacer1)Properties & Relations  (6)

Log-logistic distribution is closed under scaling by a positive factor:

TransformedDistribution[k u,u\[Distributed]LogLogisticDistribution[γ,σ]]

Relationships to other distributions:

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) is a special case of (RefLink[DagumDistribution, paclet:ref/DagumDistribution]):

PDF[DagumDistribution[1,γ,σ],x]

PDF[LogLogisticDistribution[γ,σ],x]

%-%%

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) is a special case of (RefLink[SinghMaddalaDistribution, paclet:ref/SinghMaddalaDistribution]):

PDF[SinghMaddalaDistribution[1,γ,σ],x]

PDF[LogLogisticDistribution[γ,σ],x]

%-%%

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) is a special case of (RefLink[BetaPrimeDistribution, paclet:ref/BetaPrimeDistribution]):

PDF[BetaPrimeDistribution[1,1,γ,σ],x]

PDF[LogLogisticDistribution[γ,σ],x]

FullSimplify[%-%%,σ>0]

(RefLink[LogLogisticDistribution, paclet:ref/LogLogisticDistribution]) is related to (RefLink[LogisticDistribution, paclet:ref/LogisticDistribution]):

TransformedDistribution[Exp[X],X\[Distributed]LogisticDistribution[μ,β]]

TransformedDistribution[Log[X],{X\[Distributed]LogLogisticDistribution[γ,σ]}]

OpenersExampleSection4(Spacer1)Neat Examples  (1)

PDFs for different γ values with CDF contours:

dist=LogLogisticDistribution[γ,0.4];cdf=Function[{x,γ},Evaluate[CDF[dist,x]]];
ql={0.025,0.10,0.25,0.5,0.75,0.90,0.975};
cl=Table[ColorData["Rainbow"][q],{q,Join[{0.0},ql]}];

Legended[Plot3D[PDF[dist,x],{x,0,1},{γ,5,12},PlotTheme->"Marketing",MeshFunctions->{cdf},Mesh->{ql},MeshStyle->GrayLevel[0.8],MeshShading->cl,AxesLabel->Automatic,BaseStyle->Opacity[0.9],ImageSize->400,PlotRange->All],BarLegend["Rainbow",ql,LegendLabel->"prob"]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[BetaPrimeDistribution, paclet:ref/BetaPrimeDistribution])  ▪  (RefLink[DagumDistribution, paclet:ref/DagumDistribution])  ▪  (RefLink[SinghMaddalaDistribution, paclet:ref/SinghMaddalaDistribution])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Distributions in Reliability Analysis, paclet:guide/DistributionsUsedInReliabilityAnalysis])}, {▪(RefLinkPlain[Heavy Tail Distributions, paclet:guide/HeavyTailDistributions])}})}})