I have two variables, lets call them x
and y
, which when plotted are the scattered blue points in the graph. I have fitted them using curve_fit from Scipy.
I want to generate (lets say 500000) "smoothed" random numbers replicating the distribution followed by x
and y
.
By "smoothed" I mean, I don't want randoms that exactly replicate my data (x
and y
) like in the figure below, with the red diamonds being my data distribution and the histogram being my generated randoms.
(even the fluctuations of the data are replicated here!!!!). I want a "smoothed" histogram.
What I have tried so far is to fit the points x
and y
using curve_fit
from scipy. So now I know what the data distribution is. Now I need to create random numbers that follow the above fit/distribution.
P.S I have also tried creating uniform randoms from 0 to 1 and trying to get the points below the fitted curve, but I don't know how!