$X$ and $Y$ are iid. and $XY$ is Normal distributed. What distribution does $X$ and $Y$ have?

74 Views Asked by At

Is there a distribution, $D$, such that if $X,Y\sim D$ are iid., then the product $XY$ is Normal distributed?

I natural idea would be to sample $X',Y'\sim N(0,1)$ and then take $X=\mathrm{sign}(X')\sqrt{|X'|}$ and similarly for $Y$, but that doesn't quite seem to give the right. For one thing the variance is too small.

I'm wondering if there is some other way I may sample $X$ and $Y$ instead? In general, I'm interested in ways to split a given distribution into a product of two iid. samples this way.

1

There are 1 best solutions below

0
On BEST ANSWER

I wrote the following code to sample "square root normals" based on Pinelis' paper: https://arxiv.org/pdf/1803.09838.pdf

def pinelis(samples, n, k=2):
    x = np.log(2*n) / (2*k)
    gs = np.random.standard_gamma(1/k, size=(samples, n))
    x -= gs @ (1/(1 + 2*np.arange(n)))
    r = 1-2*np.random.randint(2, size=samples)
    return r * np.exp(x)

In the code I truncate the infinite sum in Pinelis' paper to $n$ terms. The parameter $k$ can be set larger than 2 to get a distribution such that $X_1X_2\cdots X_k\sim N(0,1)$.

The following plot shows that convergence of the product to the real normal distribution is pretty good already after $n=5$: normal-distributions

For those curious about what this "square root distribution" looks like in PDF form, I plotted the same three $n$ values here: sqrt-distributions