当前位置:网站首页>Skewness and kurtosis
Skewness and kurtosis
2022-04-22 05:52:00 【Ha! Xiaobai wants to grow!】
List of articles
Skewness and kurtosis
skewness
Measure symmetry
skewness >0, Explain random variables x The right side deviates more from the mean , Such data distribution is called right deviation or positive deviation .



skewness >0, Explain random variables x The left side deviates more from the mean , Such a data distribution is called left bias or negative bias .



kurtosis
Kurtosis measures skewness
The kurtosis is relatively large , Explain random variables x There are many extreme values that deviate from the mean
The kurtosis is relatively small , Explain random variables x There are few extreme values that deviate from the mean
example
numpy and pandas Be responsible for preparing the data
matplotlib Be responsible for mapping the data
Random data


Data conforming to normal distribution
import numpy as np
import pandas
import seaborn as sns
from scipy.stats import norm
from matplotlib import pyplot as plt
data = list(np.random.randn(10000)) # Satisfying Gaussian distribution 10000 Number
print(' Maximum :', max(data))
print(' minimum value :', min(data))
print(" mean value :", np.mean(data))
print(' Median :', np.median(data))
print(' Four percentile :', np.percentile(data, [25, 50, 75]))
print('( The overall ) variance :', np.var(data))
print(' Standard deviation :', np.std(data))
# Skewness and kurtosis
s = pandas.Series(data)
bias_value = s.skew()
peak_value = s.kurt()
print(" skewness :", bias_value)
print(" kurtosis :", peak_value)
# mapping
sns.distplot(data, fit=norm)
(mu, sigma) = norm.fit(data)
plt.legend(['Normal dist. ($\mu=$ {:.2f} and $\sigma=$ {:.2f} )'.format(mu, sigma)], loc='best')
plt.ylabel('Frequency')
plt.title('Distribution')
plt.show()


版权声明
本文为[Ha! Xiaobai wants to grow!]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220536391687.html
边栏推荐
- typescript:基础知识
- opencv 使用 forEach 像素遍历(pixel 和 const int* position参数都有介绍)
- Interpretation of imencode source code
- 等腰三角形-第九届蓝桥省赛-C组
- Single machine deployment redis master-slave and sentinel mode (one master, two slave and three sentinels)
- 记录一次项目经历和项目中遇到的技术
- MySQL functions and exercises (II)
- 【机器学习】Scikit-learn介绍
- 为什么要引入协程
- LeetCode 589. N 叉树的前序遍历
猜你喜欢

寻找矩阵中“块“的个数(BFS)

LeetCode 1591. 奇怪的打印机 II --判断排序

RPC必知必会

vs 断点无法调试 The breakpoint will not currently be hit. No symbols have been loaded for this document.

蓝桥杯冲刺——DFS

Data mining -- naive Bayesian classification

conda命令

Judge whether there are links in the linked list

redis:redis-cli不是内部或外部命令

Data processing code record
随机推荐
蓝桥杯31天冲刺 Day5
opencv 骨架提取/图片细化 代码
Goodbye 20202021 I'm coming
关于form表单点击submit按钮后,页面自动刷新的问题解决
LeetCode 2049. 统计最高分的节点数目--树的遍历
LeetCode 2055. 蜡烛之间的盘子--前缀和+区间标记
Pseudo code block writing (for paper writing)
LeetCode 2044. 统计按位或能得到最大值的子集数目 --深度遍历
opencv 使用 forEach 像素遍历(pixel 和 const int* position参数都有介绍)
C語言--經典100題
Niuke practice match 97
Data mining -- decision tree classification
Judge whether the linked list has a ring (Set & speed pointer)
Why introduce collaborative process
imencode 源码解读
Coordinate conversion using Gaode map API: WGS84 → gcj02
棋盘覆盖问题(分治)
记录一次项目经历和项目中遇到的技术
01背包问题(模板)
完全背包问题