Why do we generate data this way?

Hello, professor Serrano.

Maybe I didn’t get something, but why do we generate a dataset from a uniform distribution and using an inverse function of the desired distribution (e.g. Gaussian)? For example, why don’t we simply generate random numbers using a built-in python random function?

I’m wondering if it has an educational purpose. Maybe that’s the way those python packages operate under the hood.

Thanks in advance!

Hi @Joao_Carlos_Lima_Sel!

First, welcome to our community!

You are correct, this is only for educational purposes. We wanted to illustrate how we can generate random data from any knwon distribution by only implementing one random algorithm - the random algorithm for the uniform.

You are also correct that, under the hood, these algorithms just use the same idea!

Thanks,
Lucas