Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I need to generate n numbers that follow the PDF f[x], this is the monte carlo Method. The problem is, when i use the rejection method i only receive less than n numbers. I need to receive exactly n numbers.
Ok, i think i got it. But, when it comes to the Internal´Bag section i dont think i understood the true ideia of it. Does it work like the AppendTo function? where you write "bag" it means that this is an empty list where you will attach the tested numbers?