from numpy import array
from numpy import mean
from numpy import var
from numpy import std
from scipy.stats import skew


v = array([1,2,3,4,5,6])
print(v)

result_e = mean(v)
print(result_e)

result_v = var(v)
print(result_v)

result_s = skew(v)

print(result_s)


p = array([1/6,1/12,1/12,1/6,3/12,3/12])

result_e2 = 0
result_v2 = 0


for i in range(len(v)):

	result_e2 += v[i]*p[i]

print(result_e2)

for j in range(len(v)):

	result_v2 += pow((v[j]-result_e2),2) * p[j]
	
print(result_v2)

