# Get error message when assign mu with uniform distribution

New in Stan, if I replace “mu ~ normal(100, 20)” with “mu~uniform(80, 120)” I got error message in sampling method? Need help to understand why and how to fix that.

``````data {
int nY;
vector[nY] Y;
}

parameters {
real mu;
real sigma;
}

model {
mu ~ normal(100, 20);
sigma ~ normal(10, 50);
Y ~ normal(mu, sigma);
}
``````

I use pystan to practice stan. And I copy some error messages below :

RuntimeError Traceback (most recent call last)
in
1 out = sm.sampling(
----> 2 data = data

RuntimeError: Initialization failed.

You can specify a prior that is uniform on the interval [80, 120] by not defining any prior at all and just setting parameter bounds for `mu `. So in parameters block

`real<lower=80,upper=120>` mu;

Also, set `real<lower=0> sigma;`