I'm looking to sample a probability distribution function (let's call it $F$) where the frequencies of the different (discrete) events are collected empirically. Since it is collected empirically, I do not have a closed-form expression for $F$.
If $F$ instead was known in closed-form, then we could use the inverse transformation method $Y=F(X)$, where $Y\sim U(0,1)$, in order to get $X=F^{-1}(Y)$.
Perhaps one could do curve fitting and then apply the inverse transformation method, but this sounds a bit prone to errors. Also, if the fitted curve is complicated, then doing the inverse might become tricky. Is there another idea I'm not aware of?
Thanks in advance for your help.