# Beta-distribution: how to generate a peak at certain mean value with a control on variance in extrems

Following Distribution that has a range from 0 to 1 and with peak between them?, I generated a beta distribution that has a peak between 0 and 1 at the mean value. When the mean value is 0.5, I can change the variance and get different shapes as shown below:

However, when the mean value is too close to 0 or 1 (either extreme), I couldn't manage to get a wide (similar to the uniform dist) distribution as you can see below:

Does anyone know how to solve this problem? i.e. be able to create different shapes of distribution for every mean value in the range 0-1.

• There are myriad solutions--they just aren't Beta distributions. Could you provide more information about what you need to achieve? – whuber Aug 20 '19 at 16:38
• what I want to do is to obtain different shapes of distributions (from picky around the mean value to uniform dist. as you can see in the first set of figures) by altering the variance. This can be done only for the case with the mean value of 0.5 with beta distribution. – JN_ Aug 20 '19 at 16:45
• Right. The problem is that there's just too many ways to do this. It's kind of like asking a cooking site "how do I make soup?" You should expect to get questions back about what kind of soup, for how many people, etc.; and our site is no different, because it's about the only way to make sure you get the answers you need and to help future readers understand what is being asked and answered. So: what do need to do this for? – whuber Aug 20 '19 at 18:08