0
$\begingroup$

I have a question where it gives us a random variable, that has probability density function as the weighted sum of an inverse gaussian function and a Lomax distribution

$$f_{X}(x) = b\cdot \frac{\alpha}{\sqrt{2\pi\beta}} x^{-\frac{3}{2}} \mathrm{exp}\left(-\frac{(\beta x - \alpha)^2}{2\beta x}\right) + (1-b) \cdot \frac{\gamma \kappa ^\gamma}{(\kappa + x)^{\gamma +1}}$$
where the weights are $b,1-b$. I was wondering what would be some interesting properties of the weighted sum of two distributions? I can't seem to be able to find information online about it.
A silly question (i think) I just thought of was, if I wanted to simulate values of $X$, can I just define $Y,Z$ such that
$Y$ has pdf $f_{Y}(y)=\frac{\alpha}{\sqrt{2\pi\beta}} x^{-\frac{3}{2}} \mathrm{exp}\left(-\frac{(\beta x - \alpha)^2}{2\beta x}\right)$
and Z has pdf $f_{Z}(z) = \frac{\gamma \kappa ^\gamma}{(\kappa + x)^{\gamma +1}}$
and then simulate values of $Y,Z$ and add them together to get $X$?

$\endgroup$
8
  • 2
    $\begingroup$ To simulate one value of X, you should simulate one value of Y and one value of Z and then choose one of these, independently, with respective probabilities b and 1-b. Is this your question? $\endgroup$
    – Did
    Commented Sep 26, 2017 at 4:53
  • $\begingroup$ Yep, that was my question. Thanks! So that means I'd have to define another random variable B to be bernoulli($b$)? So $$B = \begin{cases}Y_1 \qquad \text{w.p. b,} \\ Z_1 \qquad \text{w.p. 1-b.\end{cases}$$ $\endgroup$ Commented Sep 26, 2017 at 5:00
  • $\begingroup$ Sorry it doesn't let me edit anymore: $$X=B = \begin{cases}Y_1 \qquad \text{w.p. b,} \\ Z_1 \qquad \text{w.p. 1-b}.\end{cases}$$ $\endgroup$ Commented Sep 26, 2017 at 5:06
  • $\begingroup$ Sorry but the formula in your comment is not what I said (actually it is difficult to decide what your formula even mean). $\endgroup$
    – Did
    Commented Sep 26, 2017 at 5:08
  • 1
    $\begingroup$ You might be after something like $$X=B\cdot Y+(1-B)\cdot Z$$ where $Y$ is inverse gaussian, $Z$ is Lomax, $B$ is Bernoulli, and $(B,Y,Z)$ are independent. $\endgroup$
    – Did
    Commented Sep 26, 2017 at 15:10

1 Answer 1

2
$\begingroup$

The weighted sum of two probability density functions is indeed another probability density function. First, note that all values for the function are non-negative. Then just integrate them and see that the area under the curve is unity. The weighted sum is called a mixture of two distributions.

If you want to use your computer to simulate a random number generator for the mixture, you need to draw randomly from the first distribution, randomly from the second, and then use a uniform distribution to draw a third number between 0 and 1. If the third number is less than $b$, you report your first draw. Otherwise, you report the draw from the second distribution.

$\endgroup$
3
  • 1
    $\begingroup$ Drawing the Bernoulli first, allows to skip the simulation of Y or of Z, thus roughly halving the time necessary to simulate an X-sample of given size. $\endgroup$
    – Did
    Commented Sep 26, 2017 at 15:12
  • $\begingroup$ Did, your comments are always so good! As you can see, I'm an economist, not a computer scientist, so I never think in run times. $\endgroup$ Commented Sep 26, 2017 at 17:48
  • 1
    $\begingroup$ Not a computer scientist either. :-) $\endgroup$
    – Did
    Commented Sep 26, 2017 at 19:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .