Normal Distribution with Uniform Mean I'm trying to understand the distribution, mean, and variance of a normal random variable, with the mean parameter having a uniform distribution.
Based on my R simulations it seems that this compound distribution is close to normal, with the mean equals to the mean of the uniform distribution and variance equal to the sum of normal and uniform variances.
a <- 1
b <- 5
x <- runif(n, min=a, max=b)
std <- 3
c <- rnorm(n, mean=x, sd=std)

c(mean(c), (a+b)/2)
c(var(c), var(x) + std^2)

Is my guess correct? Can I find a proof of that? There is little information on the web on this type of compound distributions. Thanks.
 A: You can compute the mean and variance of the compound distribution $X$ with the law of total expectation and law of total variance.
Mean:
$$ E[X] = E \left[ E [X \mid U ] \right] = E[U] = \frac{b + a}{2}$$
Which is, as you observe, the mean of the uniform distribution.
Variance:
$$ Var[X] = E[ Var[X \mid U] ] + Var[ E[X \mid U ] ] = E[3^2] + Var[U] = 9 + \frac{(b - a)^2}{12}  $$
Which is, as you observe, the sum of the two variances.
The compound distribution can certainly be far from normal.  Consider the case where the standard deviation of the normal distribution is very small in relation to the width of the uniform distribution.
u <- runif(10000)
n <- rnorm(10000, mean=u, sd=0.01)

hist(n, breaks=100)


A: Distribution that is related to special case of your question was described by Bhattacharjee, Pandit, and Mohan (1963). It assumes that uniform distribution is centered around the global mean $\mu$ and has $(\mu-a, \mu+a)$ bounds.
In standard form it has probability density function 
$$
f(z) = \frac{1}{2a} \left[\Phi\left(z+a\right) - \Phi\left(z-a\right)\right]
$$
and cumulative distribution function
$$
F(z) = \frac{1}{2a} \left[z\,\Phi\left(z+a\right) -
                                z\,\Phi\left(z-a\right) +
                                \phi\left(z+a\right) -
                                \phi\left(z-a\right)\right]
$$
where $\Phi$ is a standard normal cdf and $\phi$ is a standard normal pdf.
It emerges when $U \sim \mathcal{U}(\mu-a, \mu+a)$ and $X \sim \mathcal{N}(\mu, \sigma^2)$, then $Z = U+X$ follows the distribution described by Bhattacharjee et al.
library(extraDistr)

set.seed(123)

u <- runif(10000, -1, 1)
n <- rnorm(10000, mean=u, sd=1)

hist(n, breaks=100, freq = F)
curve(dbhatt(x, 0, 1, 1), -6, 6, add = T, col = "red")


set.seed(123)

u <- runif(10000, -3, 3)
n <- rnorm(10000, mean=u, sd=1)

hist(n, breaks=100, freq = F)
curve(dbhatt(x, 0, 1, 3), -6, 6, add = T, col = "red")



Bhattacharjee, G.P., Pandit, S.N.N., and Mohan, R. (1963). Dimensional chains involving rectangular and normal error-distributions. Technometrics, 5, 404-406.
