In [8]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as stats
import pandas as pd

In [58]:
N = 80
med_pop = 21.53349225
raw = pd.read_csv(str(N), delimiter='\t')

In [59]:
x = np.arange(len(raw))
y = raw.media
x_p = [0, 40]
y_p = [med_pop, med_pop]
plt.plot(x_p, y_p, 'r', markersize=3, label="Média populacional")
plt.errorbar(x, y, fmt='b.', yerr=[raw.t_sup, raw.t_inf], label="Média amostral")
plt.xlim(0, 40)
plt.ylim(10, 30)
plt.ylabel("Média amostral")
plt.legend()
plt.title("Médias amostrais para N=%s" % N)
plt.savefig("%s.png" % N)



In [ ]: