Python | Scipy stats.halfgennorm.stats() method

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.

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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)

chevron_right


Output :

0.48317034577918083 0.09092954611981496 0.3281246839804034 -0.754155041309859



Example #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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)

chevron_right


Output :

0.5054680881515111 0.1177841857623046 0.6327758514663764 -0.1584840878576932

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.