Consider the following independent random variables:

$$\begin{equation} \begin{aligned} A &\sim \text{Exp}(\lambda_1), \\[6pt] C &\sim \text{Exp}(\lambda_2), \\[6pt] B &\sim \text{U}(0,1), \\[6pt] D &\sim \text{U}(0,1). \\[6pt] \end{aligned} \end{equation}$$

Define the random variable:

$$M \equiv \frac{(A+BC)^2}{AC(B-1)^2 + CD + A + C}.$$

How do I find the distribution of this random variable?

  • $\begingroup$ Could you explain where $M$ comes from? It is so strange (a non-homogeneous rational function of degree four) that one wonders whether it might be an attempt to solve a problem in an unusual way and that (therefore) a better way might be available. It is highly unlikely you will obtain any simple closed form for the distribution of $M.$ $\endgroup$
    – whuber
    Dec 17, 2018 at 18:48
  • $\begingroup$ Please register &/or merge your accounts (you can find information on how to do this in the My Account section of our help center), then you will be able to edit & comment on your own question. $\endgroup$ Dec 23, 2018 at 19:17

1 Answer 1


Simulate it (this is python)

import numpy as np 
lambda1 = 1.0
N = 1000000
A = np.random.exponential(scale=lambda1,size=N)
B = np.random.uniform(size=N)
C = np.random.exponential(scale=lambda1,size=N)
D = np.random.uniform(size=N)
M = (A+B*C)**2/(A*C*(B-1)**2 + C*D + A + C) # N realizations of the random variable 

import matplotlib.pyplot as plt
_ = plt.hist(M, bins=5000, density=True) # plot 

Here it is. You could regress something to it for practical purposes. The other way would be to use your rules for combinations of random variables and work really hard. I don't know what that would become

enter image description here

  • $\begingroup$ I need a mathematical expression for the pdf(M). $\endgroup$
    – user231400
    Dec 17, 2018 at 16:11

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