On Sunday, November 17, 2013 11:34:56 AM UTC+13, Steve wrote: > I want to program a random distribution in the range 0.0 to 1.0, similar to a normal distribution, but with the centre point shifted to, say, 0.25.
It is difficult to visualize the distribution you want because the normal is symmetric but your centre point is not in the middle of the range you specify. Even ignoring the problem of the normal's infinite tails, a distribution symmetric around the mean of 0.25 and bounded by 0 at the bottom would be bounded at the top by 0.5, not by 1.0. In short, I don't think you can possibly have all three of the properties you seem to be asking for: 1) bounds of 0-1 2) symmetric 3) mean of 0.25
You might take a look at the beta distribution, which is naturally bounded by 0 and 1. For some parameter combinations it is symmetric and looks a bit normal, whereas for other parameter combinations it has a mean of 0.25. Maybe you can find a parameter combination that looks right.