Message Boards Message Boards

1
|
7023 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Mixed Distribution of zeros and a lognormal dist.

Posted 12 years ago
A client would like to see a mixed distribution that is a blend of a lognormal dist and zeros.
The number of zeros varies but with an expected value of 5% the rest of the numbers would come out of the lognormal dist. So far, he has used a degenerate normal distribution to produce an "effective zero" . But he wants to be in numerical terms. There must be a more elegant way of modelling the 5% point mass at zero in the distribution.  Here is the code that he uses. Your help is much appreciated!

l = 0.05; m = 0.10; s = 0.20;

dist = MixtureDistribution[{l,1 - l}, {NormalDistribution[0, 1/10000], LogNormalDistribution[m, s]}];

Plot[PDF[dist, x], {x, -1, 3}, Filling -> Axis, PlotRange -> All]

POSTED BY: Samuel Chen
3 Replies
Posted 12 years ago
Thanks so much!  Very helpful indeed.
POSTED BY: Samuel Chen
Try the following:

l = 1/20; m = 1/10; s = 1/5;
mdist = MixtureDistribution[{l, 1 - l}, {DiscreteUniformDistribution[{0, 0}], LogNormalDistribution[m, s]}];

With explicit form

In ==>
CDF[mdist, x] // InputForm
Out ==> 
Piecewise[{{1/20, x == 0}, {1/20 + (19*Erfc[(5*(1/10 - Log[x]))/Sqrt[2]])/40, x > 0}}, 0]

Quoting Wikipedia: Random Variable

"A continuous random variable maps outcomes to values of an uncountable set (e.g., the real numbers). For a continuous random variable, the probability of any specific value is zero, whereas the probability of some infinite set of values (such as an interval of non-zero length) may be positive."

Therefore PDF is not a defined notion for the distribution.

Plot[CDF[mdist, x], {x, -1, 3}, Filling -> Axis, PlotRange -> All]

POSTED BY: Oleksandr Pavlyk
Posted 12 years ago
One idea for generating a distribution with all of its mass at zero is

EmpiricalDistribution[{0.0,0,0}]
POSTED BY: John Cassel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract