The beta distribution is a continuous distribution which can take values between 0 and 1. This distribution is parameterized by two shape parameters α and β.
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats
a = 0.5
b = 0.5
x = np.arange(0.01,1,0.01)
y = stats.beta.pdf(x,a,b)
plt.plot(x,y)
plt.title('Beta: a=%.1f,b=%.1f' %(a,b))
plt.xlabel('x')
plt.ylabel('Probability density')
plt.show()