Tư duy Thống kê với Python (Phần 1)
Justin Bois
Teaching Professor at the California Institute of Technology
Dữ liệu lấy từ Data.gov (https://www.data.gov/)

import matplotlib.pyplot as plt
_ = plt.hist(df_swing['dem_share'])
_ = plt.xlabel('phần trăm phiếu bầu cho Obama')
_ = plt.ylabel('số quận')
plt.show()
Dữ liệu lấy từ Data.gov (https://www.data.gov/)

Dữ liệu lấy từ Data.gov (https://www.data.gov/)

bin_edges = [0, 10, 20, 30, 40, 50,
60, 70, 80, 90, 100]
_ = plt.hist(df_swing['dem_share'], bins=bin_edges)
plt.show()

_ = plt.hist(df_swing['dem_share'], bins=20)
plt.show()

import seaborn as sns
sns.set()
_ = plt.hist(df_swing['dem_share'])
_ = plt.xlabel('phần trăm phiếu bầu cho Obama')
_ = plt.ylabel('số quận')
plt.show()

Tư duy Thống kê với Python (Phần 1)