Types of kurtosis

There are three types of kurtosis—mesokurtic, leptokurtic, and platykurtic. Let's look at these one by one:

  • Mesokurtic: If any dataset follows a normal distribution, it follows a mesokurtic distribution. It has kurtosis around 0. 
  • Leptokurtic: In this case, the distribution has kurtosis greater than 3 and the fat tails indicate that the distribution produces more outliers. 
  • Platykurtic: In this case, the distribution has negative kurtosis and the tails are very thin compared to the normal distribution. 

All three types of kurtosis are shown in the following diagram:

Different Python libraries have functions to get the kurtosis of the dataset. The SciPy library has the scipy.stats.kurtosis(dataset) function. Using the pandas library, we calculate the kurtosis of our df data frame using the df.kurt() function:

# Kurtosis of data in data using skew() function
kurtosis =df.kurt()
print(kurtosis)

# Kurtosis of the specific column
sk_height=df.loc[:,"height"].kurt()
print(sk_height)

The output of the preceding code is given here:

Similarly, we can compute the kurtosis of any particular data column. For example, we can compute the kurtosis of the column height as df.loc[:,"height"].kurt()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.79.11