Generate random numbers chi-square distribution

Viewed 46

I am trying to generate random integer values in the chi-squared distribution in Python. Below you can see my code.

import numpy as np
import matplotlib.pyplot as plt
  
# Using chisquare() method
gfg = np.random.chisquare(3, 1000)

df_chi = pd.DataFrame(gfg, columns = ['Column_A'])

df_chi.describe()
count, bins, ignored = plt.hist(gfg, 14, density = True)
plt.show()

This code generates random values in the chi-square distribution. Now I want to create random values in the chi-square distribution but some specific, such as:

minimum value =1 
maximum value= 100
standard deviation = 10
mean = 50

So can anybody help me how to solve this and generate a base with this characteristic?

0 Answers
Related