Introductie tot lineaire modellering in Python
Jason Vestuto
Data Scientist


Populatiestatistiek vs. steekproefstatistiek
print( len(month_of_temps), month_of_temps.mean(), month_of_temps.std() )
print( len(decade_of_temps), decade_of_temps.mean(), decade_of_temps.std() )
Neem een willekeurige steekproef uit een populatie
month_of_temps = np.random.choice(decade_of_temps, size=31)




# Resampling als iteratie
num_samples = 20
for ns in range(num_samples):
sample = np.random.choice(population, num_pts)
distribution_of_means[ns] = sample.mean()
# Statistiek van de steekproevenverdeling
mean_of_means = np.mean(distribution_of_means)
stdev_of_means = np.std(distribution_of_means)
Introductie tot lineaire modellering in Python