백분위수, 이상치, 상자 그림

Python으로 하는 Statistical Thinking (파트 1)

Justin Bois

Teaching Professor at the California Institute of Technology

ECDF에서의 백분위수

ch2-2_v2.003.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Python으로 하는 Statistical Thinking (파트 1)

ECDF에서의 백분위수

ch2-2_v2.004.png

Python으로 하는 Statistical Thinking (파트 1)

ECDF에서의 백분위수

ch2-2_v2.005.png

Python으로 하는 Statistical Thinking (파트 1)

ECDF에서의 백분위수

ch2-2_v2.006.png

Python으로 하는 Statistical Thinking (파트 1)

백분위수 계산

np.percentile(df_swing['dem_share'], [25, 50, 75])
array([ 37.3025,  43.185 ,  49.925 ])
Python으로 하는 Statistical Thinking (파트 1)

2008년 미 대선 상자 그림

ch2-2_v2.011.png

1 Data retrieved from Data.gov (https://www.data.gov/)
Python으로 하는 Statistical Thinking (파트 1)

2008년 미 대선 상자 그림

ch2-2_v2.012.png

Python으로 하는 Statistical Thinking (파트 1)

2008년 미 대선 상자 그림

ch2-2_v2.013.png

Python으로 하는 Statistical Thinking (파트 1)

2008년 미 대선 상자 그림

ch2-2_v2.014.png

Python으로 하는 Statistical Thinking (파트 1)

2008년 미 대선 상자 그림

ch2-2_v2.015.png

Python으로 하는 Statistical Thinking (파트 1)

2008년 미 대선 상자 그림

ch2-2_v2.016.png

Python으로 하는 Statistical Thinking (파트 1)

상자 그림 그리기

import matplotlib.pyplot as plt
import seaborn as sns
_ = sns.boxplot(x='east_west', y='dem_share',
                    data=df_all_states)
_ = plt.xlabel('region')
_ = plt.ylabel('percent of vote for Obama')
plt.show()
Python으로 하는 Statistical Thinking (파트 1)

연습해 봅시다!

Python으로 하는 Statistical Thinking (파트 1)

Preparing Video For Download...