## Does prior[paramname] overwrite param[paramname]?

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Sunny Vagnozzi
Posts: 43
Joined: August 15 2016
Affiliation: Oskar Klein Centre, Stockholm University

### Does prior[paramname] overwrite param[paramname]?

Dear Antony et al.,

I have a basic question concerning priors (Gaussian or flat) on parameters in CosmoMC. If I add a new parameter, let's call it paramname:
1) if I want to give it a Gaussian prior via

Code: Select allp>

prior&#91;paramname&#93;=mean std
do I still need to specify a range (i.e. a flat prior) anyway (e.g. in the same .ini file?)

Code: Select allp>

param&#91;paramname&#93; = center min max start_width propose_width
2) as a corollary of the above (assuming it is correct), does

Code: Select allp>

prior&#91;paramname&#93;
always overwrite

Code: Select allp>

param&#91;paramname&#93;
, although the latter is always necessary?

Thanks! Cheers,
Sunny

Antony Lewis
Posts: 1354
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

### Re: Does prior[paramname] overwrite param[paramname]?

1. Yes
2. No, the two are independent things. param[paramnames] sets hard bounds for the range of the parameters, prior[paramname] sets a Gaussian-shaped prior within that bound

Sunny Vagnozzi
Posts: 43
Joined: August 15 2016
Affiliation: Oskar Klein Centre, Stockholm University

### Does prior[paramname] overwrite param[paramname]?

Thanks Antony,

as for 2), what I meant is, while specifying param[paramname] is necessary, if I on top of it specify prior[paramname], CosmoMC will be sampling that parameter from the Gaussian distributionspecified by prior[paramname], using param[paramname] only to restrict the range of values from which it draws samples (hard limits), but not sampling this parameter according to the associated uniform distribution? Is this correct?

Cheers,
Sunny