There are slight variations in the distribution obtained depending on the specific approach taken
Generating data
SeedRandom[0]
data = RandomVariate[LogNormalDistribution[3, 1.5], 1000];
FindDistribution
will conclude that this data has a LogNormalDistribution
(dist1 = FindDistribution[data]) // InputForm
(* LogNormalDistribution[
2.875997585829534, 1.5560895409245938] *)
However, if you specify that it is a LogNormalDistribution
(dist2 = FindDistribution[data,
TargetFunctions -> {LogNormalDistribution}]) // InputForm
(* LogNormalDistribution[
2.904567956011853, 1.5056882462684804] *)
To force a fit to a LogNormalDistribution
using FindDistributionParameters
(dist4 = LogNormalDistribution[m, s] /.
FindDistributionParameters[data,
LogNormalDistribution[m, s]]) // InputForm
(* LogNormalDistribution[
2.904567990925176, 1.505688384471444] *)
This is equivalent to
(dist5 = LogNormalDistribution[m, s] /.
FindDistributionParameters[Log[data],
NormalDistribution[m, s]]) // InputForm
(* LogNormalDistribution[
2.904567990925176, 1.505688384471444] *)
dist4 === dist5
(* True *)
Using the Mean
and StandardDeviation
of the Log
of the data
(dist6 = LogNormalDistribution @@ (#[Log[data]] & /@ {Mean,
StandardDeviation})) // InputForm
(* LogNormalDistribution[
2.904567990925176, 1.5064417937677634] *)
Using TransformedDistribution
on the Log
of the data
(dist7 = TransformedDistribution[E^x,
x \[Distributed] FindDistribution[Log[data]]]) // InputForm
(* LogNormalDistribution[
2.904567990925176, 1.5056883844714437] *)
(dist8 = TransformedDistribution[E^x,
x \[Distributed]
FindDistribution[Log[data],
TargetFunctions -> {NormalDistribution}]]) // InputForm
(* LogNormalDistribution[
2.904567941143856, 1.505688383284438] *)