2018-11-20
閱讀量:
952
python中的統(tǒng)計(jì)指標(biāo)
首先導(dǎo)入一個(gè)數(shù)據(jù)集來(lái)進(jìn)行我們的統(tǒng)計(jì)。 這是一份2010年各國(guó)的酒精消費(fèi)情況數(shù)據(jù)。
data = pd . read_csv ( 'https://raw.githubusercontent.com/plotly/datasets/master/2010_alcohol_consumption_by_country.csv' )#此為這份數(shù)據(jù)儲(chǔ)存目錄
df = 數(shù)據(jù) [ 0:10 ]
table = FF .create_table ( df )
py.iplot ( table , filename = 'alcohol-data-sample' )
輸出結(jié)果:

均值和方差
個(gè)最基本的統(tǒng)計(jì)操作是一維數(shù)據(jù)數(shù)組的mean
mu mu和standard deviation
sigma sigma,即一系列數(shù)值。 一組數(shù)字x1,...,xNx1,...,xN的平均值定義為:

通俗地使用平均值作為一組值的平均值。另一方面,標(biāo)準(zhǔn)偏差是描述數(shù)據(jù)傳播的統(tǒng)計(jì)度量,或者值與均值的距離。一組數(shù)據(jù)的standard deviation
定義為:

輸出結(jié)果:







評(píng)論(0)


暫無(wú)數(shù)據(jù)
CDA考試動(dòng)態(tài)
CDA報(bào)考指南
推薦帖子
0條評(píng)論
0條評(píng)論
0條評(píng)論
0條評(píng)論