I need to generate a skewed distribution for a given range (eg: low= 1, high =10) and size = 100. stats.skewnorm can produce a skewed distribution, but it does not take in the parameter for lower and upper bound. Can someone please help me with it.
def skewed_data(low, high, number):
skew_parameter = 5
data = skewnorm.rvs(skew_parameter, loc=1, scale=1, size=number)
data = np.round(data,0).astype(int)
return data
result_data = skewed_data(1, 10,100)
bins = np.linspace(0, 10, 10)
plt.hist(response, bins, alpha=1, label='histogram')
plt.legend(loc='upper right')
plt.show()
the histogram plot of the result data is shown below (all the result data are between 1 to 5, whereas I would like it to be distributed between 1 to 10 and right skewed.