Remapping the Sum of two Normal Random variables? I have a problem where I have sum of two random variables 
1). Each distributed independently normally with different means ($\mu_1$, $\mu_2$) and sds ($\sigma_1$, $\sigma_2$). $Z=R_1+R_2$
2). Each distributed independently log-normally with different means ($u_1$, $u_2$) and sds ($s_1$, $s_2$). $LZ=LR_1+LR_2$
In the first case, the answer lies in (-$\infty$, $\infty$) and (0, $\infty$) in the second case. 
I need to transform these random variables i.e. $Z$ and $LZ$ to make them probabilities and lie in [0, 1], as I want to simulate a Bernoulli Trial with that probability.
I see that as a case of remapping probability densities.
For case 1, I think I could use the logistic transform on $Z$ to make it a probability which lies in [0, 1]. I hope that makes sense?
Also, I am clueless regarding how to do this mapping for the case of lognormal distribution?
I would really appreciate any feedback on this!
 A: Since the sum of two independent normals is normal, you wouldn't get a uniform (as in your original title) by applying a logistic transformation on the sum. 


*

*If the means and variances are known (as your question implies), you could get a uniform result by using the normal cdf of the sum (mean is the sum of means, variance is the sum of variances).

*If you don't actually want a uniform (as your change in title now indicates), you could use the logistic transform as you suggest, but any cdf of $(-\infty,\infty)$ would do.
In the second case, the sum of two independent lognormals doesn't have a nice closed form. 


*

*If you're just looking to get it into the range $(0,1)$, any cdf on $(0,\infty)$ can do that (lognormal, gamma, Weibull, F, log-logistic, beta prime, ...). However you could just do $Y/(Y+1)$ -- my $Y$ is your $LZ$ -- to the same effect. I guess that would just be a standard log-logistic cdf transform though. I think this would be equivalent to taking logs and applying the same logistic you would for the normal case.

*If you want a rough approximation to uniform, take the sum to be lognormal with mean the sum of the means (careful, don't add the log-scale $\mu$ parameters), and variance the sum of the variances (with the corresponding not of caution). This will often work fairly well:

(Code is given below)
By comparison, the problem with just getting the range right is that in practice almost all of the values are likely to end up in a very narrow part of the range:

That's the same sum, transformed by a standard log-logistic cdf. It's certainly in $(0,1)$, but in a sample of 10000 values, all of them were between 0.97 and 0.995. If that's what you want, then you should be okay (keeping in mind that the next one might be piled up the other end - or end up U-shaped, or bunched in the middle). If it's not what you need, then I suggest you at least do some approximate quantile matching or moment matching to get a better spread of values.


*

*If you really do want a uniform result (up to reasonable calculation accuracy), you could perhaps make use of numerical convolution.


--
#R code to calculate the lognormal approximation to the sum and transform:

X1 <- rlnorm(10000, 3, .4)
X2 <- rlnorm(10000, 4, .3)
hist(X1, n=100)
hist(X2, n=100)

m1 <- exp(3+.4^2/2)
m2 <- exp(4+.3^2/2)
v1 <- m1^2*(exp(.4^2)-1)
v2 <- m2^2*(exp(.3^2)-1)

Y <- X1+X2
v <- v1+v2
m <- m1+m2
s2 <- log(v/m^2+1)

hist(X1+X2, n=100)
uish <- plnorm(Y,log(m-s2/2),sqrt(s2))
hist(uish, n=100)

A: If it's just a matter of doing the simulation, you can, in the normal case, do:
mu1 <- 0
mu2 <- 1

sd1 <- 1
sd2 <- 3

N <- 10^4

z <- rnorm(N, mean = mu1, sd = sd1) + rnorm(N, mean = mu2, sd = sd2)

x <- rbinom(N, size = 1, prob = exp(z)/(exp(z)+1))

For the lognormal:
u <- exp(z)

y <- rbinom(N, size = 1, prob = u/(u+1))

By the way, the title of the question is misleading. You're just changing the range of the random variables, you're not transforming them in a uniform random variable.
A: Let $X$ have the continuous cdf $F_X(x)$ then define the random variable $Y=F_X(x)$.  Then $Y$ is uniformly distributed on $(0,1)$. This important property is called the Probability Integral Transform.
In your case, you may transform $Z$ and $LZ$ to uniformly distributed variables by using their respective cdf's.  The first cdf is easy (Z is normally distributed), the last is more challenging (the sum of two log normals is not log normal). 
Proof:
$$P(Y\leq y) = P(F_X(X) \leq y)$$
$$=P(F_X^{-1}[F_X(X)] \leq F_X^{-1}(y))$$
$$=P(X \leq F_X^{-1}(y))$$
$$=F_X(F_X^{-1}(y))=y$$
At the end points we have $P(Y \leq y)=1$ for $y = 1$ and $P(Y \leq y)=0$ for $y = 0$ verifying that $Y$ has a uniform distribution.
