lundi 25 juillet 2016

Generating random value for given cdf

Depending on sample of values of random variable I create cumulative density function using kernel density estimation.

cdf = gaussian_kde(sample)

What I need is to generate sample values of random variable whose density function is equal to constructed cdf. I know about the way of inversing the probability distribution function, but since I can not do it analitically it requires pretty complicated preparations. Is there integrated solution or maybe another way to accomplish the task?

Aucun commentaire:

Enregistrer un commentaire