# A distribution like lognormal, but limited from two sides

I would need a probability distribution which reflects the following user input:

1. Value 0.5...9.5
2. Belief into that value

The higher the belief, the more the distribution is Dirac-like. The lower the belief, the more the distribution is flat. However, the distribution should have a finite support. In this concrete case, non-zero values only exist in the range 0...10 exclusive. If the range were 0...infinity, I could use a lognormal distribution, but it is not. I do not want to use a truncated normal distribution, because it does not have zero values at the extreme points of its support.

Here is a chart of two lognormal distributions and also the green plot representing a lognormal swapped around 5:

I would like the searched distribution to behave more-or-less similarly.

I see two possibilities:

• Rescale your support to the interval $$[0,1]$$, then use a beta distribution (rescale the density back again to get a bona fide density)

• Use a gamma distribution. Yes, this has infinite support to the right, so you can truncate it if you want - but at least your three examples already have almost all their mass on $$[0,10]$$, so the truncation makes very little difference.

Both distributions have two parameters that you would need to fit. You could translate your "belief" into the variance of the distribution and have one free parameter for the mean.

I personally find the beta distribution a little more convincing:

R code:

xx <- seq(0,10,by=.01)

par(mfrow=c(1,2))
plot(xx,dbeta(xx/10,50,50)/10,type="l",col="blue",las=1,xlab="",ylab="",main="Beta")
lines(xx,dbeta(xx/10,5,30)/10,col="red")
lines(xx,dbeta(xx/10,30,5)/10,col="green")
#
plot(xx,dgamma(xx,100,20),type="l",col="blue",las=1,xlab="",ylab="",main="Gamma")
lines(xx,dgamma(xx,2,2),col="red")
lines(xx,dgamma(xx,270,30),col="green")