Inverse transform sampling