returns random numbers from the beta distribution (inversion method) with parameters a and b. density:
x.^(a-1).* (1-x).^(b-1)./beta(a,b)1_{0<x<1})