This YouTube video has a good alternative explanation on the inversion method: An introduction to inverse transform sampling. It provides a walkthrough in the first seven minutes, with the remaining time going over a helpful simulation!
I understand all the steps, but I don't understand the purpose. What is x = cuberoot(8 eta) used for?
Ohhh wait I went back in my notes and realized this was for getting a single x_i that you put into the monte carlo estimator function
Yeah another way to think about this, is you are doing the exact same logic for the discrete case except instead of getting a bucket you now get a specific value