41. Anscombes Quartet#

from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import plotly.graph_objs as go
x1 = [10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5]
y1 = [8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68]

x2 = [10.0, 8.0, 13.0, 9.0, 11.0, 14.0, 6.0, 4.0, 12.0, 7.0, 5.0]
y2 = [9.14, 8.14, 8.74, 8.77, 9.26, 8.1, 6.13, 3.1, 9.13, 7.26, 4.74]

x3 = [10.0, 8.0, 13.0, 9.0, 11.0, 14.0, 6.0, 4.0, 12.0, 7.0, 5.0], 
y3 = [7.46, 6.77, 12.74, 7.11, 7.81, 8.84, 6.08, 5.39, 8.15, 6.42, 5.73]

x4 = [8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 19.0, 8.0, 8.0, 8.0], 
y4 = [6.58, 5.76, 7.71, 8.84, 8.47, 7.04, 5.25, 12.5, 5.56, 7.91, 6.89]
import pandas as pd
np.mean(x1), np.mean(y1), np.std(x1), np.std(y1),  np.correlate(x1,y1)
(9.0, 7.500909090909093, 3.1622776601683795, 1.937024215108669, array([797.6]))
np.mean(x2), np.mean(y2), np.std(x2), np.std(y2)
(9.0, 7.50090909090909, 3.1622776601683795, 1.93710869148962)
np.mean(x3), np.mean(y3), np.std(x3), np.std(y3)
(9.0, 7.5, 3.1622776601683795, 1.9359329439927313)
np.mean(x4), np.mean(y4), np.std(x4), np.std(y4)
(9.0, 7.500909090909091, 3.1622776601683795, 1.9360806451340837)
np.percentile(x1,50),np.percentile(x2,50),np.percentile(x3,50),np.percentile(x4,50),
(9.0, 9.0, 9.0, 8.0)
np.percentile(y1,50),np.percentile(y2,50),np.percentile(y3,50),np.percentile(y4,50),
(7.58, 8.14, 7.11, 7.04)
Created in deepnote.com Created in Deepnote