Skip to content
Related Articles

Related Articles

Python | Scipy stats.halfgennorm.stats() method
  • Last Updated : 06 Feb, 2020
GeeksforGeeks - Summer Carnival Banner

With the help of stats.halfgennorm.stats() method, we can get the value of Mean(‘m’), variance(‘v’), skew(‘s’), and/or kurtosis(‘k’) by using stats.halfgennorm.stats() method.

Syntax : stats.halfgennorm.stats(beta, moments)
Return : Return the value of mean, variance, skew and kurtosis.

Example #1 :
In this example we can see that by using stats.halfgennorm.stats() method, we are able to get the value of mean, variance, skew and kurtosis by using this method.




# import halfgennorm
from scipy.stats import halfgennorm
beta = 5
  
# Using stats.halfgennorm.stats() method
M, V, S, K = halfgennorm.stats(beta, moments ='mvsk')
  
print(M, V, S, K)

Output :

0.48317034577918083 0.09092954611981496 0.3281246839804034 -0.754155041309859



Example #2 :




# import halfgennorm
from scipy.stats import halfgennorm
beta = 3
  
# Using stats.halfgennorm.stats() method
M, V, S, K = halfgennorm.stats(beta, moments ='mvsk')
  
print(M, V, S, K)

Output :

0.5054680881515111 0.1177841857623046 0.6327758514663764 -0.1584840878576932

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :