1
$\begingroup$

Let $X$ be a random variable that is of a mixture distribution of two lognormals (with the same sigma), so $X \approx p\cdot \mathcal L (\mu_1, \sigma) + (1-p)\cdot \mathcal L (\mu_2,\sigma)$.

Now set $Y=X_1 + X_2$, so $Y$ is a sum of two samples from this mixture.

First I generate some data according to this distribution:

dMix[p_, m1_, m2_, s_] := 
MixtureDistribution[{p, 1 - p}, {LogNormalDistribution[m1, s], 
LogNormalDistribution[m2, s]}];

dat = Plus @@ RandomVariate[dMix[0.75, 0.5, -1.5, 0.2], {2,100}];

this is the pdf of my distribution, using TransformedDistribution

dMixSum = 
 TransformedDistribution[x1 + x2, 
  Thread[Distributed[{x1, x2}, 
   MixtureDistribution[{p, 1 - p}, {LogNormalDistribution[m1, s], 
    LogNormalDistribution[m2, s]}]]]];

pdf[z_] = PDF[dMixSum, z];

pDist = ProbabilityDistribution[pdf[z], {z, -Infinity, Infinity}, 
  Assumptions -> DistributionParameterAssumptions[dMixSum]]

Now FindDistributionParameters should do the job (but it doesn't)

FindDistributionParameters[dat, pDist, {{m1, 1}, {m2, -1}, {s, 
 1}, {p, .5}}]

I think this is because the sum of two lognormals is not lognormally distributed (in a closed form), it is only approximately lognormal. Can I tell mathematica somehow to take this into account or is there another way to solve this?

$\endgroup$

1 Answer 1

1
$\begingroup$

This is somewhere between a comment and an answer, but here's a histogram of your sum distribution:

dMix[p_, m1_, m2_, s_] := 
  MixtureDistribution[{p, 1 - p}, {LogNormalDistribution[m1, s], 
    LogNormalDistribution[m2, s]}];
Histogram[
 Plus @@ RandomVariate[dMix[0.75, 0.5, -1.5, 0.2], {2, 400000}]]

enter image description here

Meanwhile, here is a histogram of one of a typical lognormal distribution (using the same $m_1,s$ parameters you specified):

Histogram@RandomVariate[LogNormalDistribution[0.5, 0.2], 200000]

enter image description here

The sum distribution $Y$ you specified does not remotely look like a lognormal distribution (for example, it's trimodal!), so I'm not really sure if it even makes sense to do a parameter distribution on $Y$ by assuming that it's approximately lognormal, since that approximation does not appear to be valid.

$\endgroup$
1
  • $\begingroup$ thanks for your comment. I suggest you change LogNormalDistribution to NormalDistribution and you will see that even if the sum is trimodal it will the optimized to a regular mixture of two. If Y=x1+x2+x2 it will have 4 "bumps" and still optimize to a regular mixture of two. This is about finding the global maximum and not a local. $\endgroup$
    – spore234
    Aug 4, 2014 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.