0
$\begingroup$

np.random.normal(mean,sigma,size) allows to create a gaussian distribution based only on mean and variance. I want to create a distribution based on function_name(mean,sigma,skew,kurtosis,size).

I tried scipy.stats.gengamma but I don't understand how to use it. It takes 2 parameters - a,c and creates a distribution. But it is difficult to interpret for what values of a & c, the function will give a particular value of skewness and kurtosis.

Can anyone explain how to use gengamma or any other way to create such a distribution in python, even from scratch by writing mathematical equations?

Edit: By Gaussian, I mean that I want the distribution to be normal with some skewness or kurtosis as well. It need not be a standard normal distribution.

$\endgroup$
0
$\begingroup$

The Gaussian distribution is fully described by its mean and variance. Gaussians have fixed values for Skewness (0) and Kurtosis (3) - so you can't really change them if you have made the Gaussian assumption for your model.

$\endgroup$
8
  • $\begingroup$ Please check the edits. I am new to this statistics field. I am sorry if I confused between some terminologies. $\endgroup$ – rb173 Apr 6 at 16:47
  • $\begingroup$ Try the skewnorm on scipy - docs.scipy.org/doc/scipy/reference/generated/… - Probably what you are looking for ? $\endgroup$ – Jayaram Iyer Apr 6 at 16:49
  • $\begingroup$ This is looking similar to gengamma. Can you please explain how should I use these functions? Let's say if I want to have a skewness of 4 and kurtosis of -2. Then what should be my parameter values for any of these functions as they don't take the input of skewness and kurtosis explicitly? $\endgroup$ – rb173 Apr 6 at 16:53
  • $\begingroup$ skewnorm takes a real number as a skewness parameter When a = 0 the distribution is identical to a normal distribution $\endgroup$ – Jayaram Iyer Apr 6 at 17:05
  • 1
    $\begingroup$ Then perhaps you are looing for the non-central Student's t distribution - that takes four parameters: df (degrees of freedom) - for kurtosis (nature of tailedness), nct (for skewness), loc (mean) and scale (standard deviation) - docs.scipy.org/doc/scipy/reference/generated/… $\endgroup$ – Jayaram Iyer Apr 6 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.