3

I posted a similar question and for some reason, I am not able to access that.

I am trying to generate random numbers (say 50 numbers) between 1 and 100,000 for a given Kurtosis. In other words, when I input the kurtosis to the script, it should generate 50 random numbers between 1 and 100,000 and print them on the console. I am trying to do this in Python.

I am new to Python and I did something like below, which does generate numbers, but based on the mean. How do I do this with Kurtosis as the input?

import scipy.stats as stats
a, b = 500, 600
mu, sigma = 550, 30
dist = stats.truncnorm((a - mu) / sigma, (b - mu) / sigma, loc=mu, scale=sigma)

print(dist.rvs(10))

Can you please help me.

Thanks in advance.

ascripter
  • 5,665
  • 12
  • 45
  • 68
sk123
  • 61
  • 2
  • 1
    Based on skewness or kurtosis? They are not the same. – Jared Goguen Apr 27 '16 at 20:37
  • Possible duplicate of [Generating numbers (distribution) for a given Kurtosis or skewness](https://stackoverflow.com/questions/36898729/generating-numbers-distribution-for-a-given-kurtosis-or-skewness) – mkrieger1 Mar 04 '19 at 13:53

0 Answers0