# Calculate skewness and kurtosis for % DIABETIC
skewness_diabetic = skew(df_diabetic[‘% DIABETIC’])
kurtosis_diabetic = kurtosis(df_diabetic[‘% DIABETIC’])
# Calculate skewness and kurtosis for % OBESE
skewness_obese = skew(df_obese[‘% OBESE’])
kurtosis_obese = kurtosis(df_obese[‘% OBESE’])
# Calculate skewness and kurtosis for % INACTIVE
skewness_inactive = skew(df_inactive[‘% INACTIVE’])
kurtosis_inactive = kurtosis(df_inactive[‘% INACTIVE’])
# Print the results
print(f’Skewness of % DIABETIC: {skewness_diabetic:.2f}’)
print(f’Kurtosis of % DIABETIC: {kurtosis_diabetic:.2f}’)
print(f’Skewness of % OBESE: {skewness_obese:.2f}’)
print(f’Kurtosis of % OBESE: {kurtosis_obese:.2f}’)
print(f’Skewness of % INACTIVE: {skewness_inactive:.2f}’)
print(f’Kurtosis of % INACTIVE: {kurtosis_inactive:.2f}’)
results:
Skewness of % DIABETIC: 0.97
Kurtosis of % DIABETIC: 1.03
Skewness of % OBESE: -2.69
Kurtosis of % OBESE: 12.32
Skewness of % INACTIVE: -0.34
Kurtosis of % INACTIVE: -0.55
Explanation:
% DIABETIC:
Skewness: 0.97
Interpretation: The skewness value of 0.97 indicates that the distribution of % DIABETIC data is moderately right-skewed. In practical terms, this means that there is a slight tail on the right side of the distribution, and most data points are concentrated towards the lower end of the scale. It suggests that there may be more data points with lower values for % DIABETIC. Kurtosis: 1.03
Interpretation: The kurtosis value of 1.03 implies that the % DIABETIC data has slightly heavier tails and a slightly less pronounced peak compared to a normal distribution (kurtosis of 3). This suggests that while there may be some outliers, the distribution is relatively close to a normal distribution in terms of tailed Ness and peakiness. % OBESE:
Skewness: -2.69
Interpretation: The skewness value of -2.69 indicates that the distribution of % OBESE data is heavily left-skewed. In practical terms, this means that there is a long tail on the left side of the distribution, and most data points are clustered towards the higher end of the scale. It suggests that there may be a larger number of lower values for % OBESE. Kurtosis: 12.32
Interpretation: The kurtosis value of 12.32 implies that the % OBESE data has very heavy tails and a pronounced peak. This high kurtosis indicates that the distribution has more outliers or extreme values than a typical normal distribution (which has a kurtosis of 3). The distribution is leptokurtic, meaning it has heavier tails and is more peaked than a normal distribution. % INACTIVE:
Skewness: -0.34
Interpretation: The skewness value of -0.34 suggests that the distribution of % INACTIVE data is slightly left-skewed. In practical terms, this means that there is a slight tail on the left side of the distribution, but the majority of data points are concentrated towards the higher end of the scale. It indicates a tendency for more values to be on the higher side of the scale. Kurtosis: -0.55
Interpretation: The kurtosis value of -0.55 indicates that the % INACTIVE data has lighter tails and a less pronounced peak compared to a normal distribution (kurtosis of 3). This suggests that the distribution is relatively flatter and has fewer outliers compared to a typical normal distribution. In summary, the skewness and kurtosis values provide insights into the shape and characteristics of the data distributions. For % DIABETIC, it is moderately right-skewed with a distribution relatively close to normal. For % OBESE, it is heavily left-skewed with very heavy tails and a pronounced peak. For % INACTIVE, it is slightly left-skewed with a distribution that is relatively flatter and less peaked.