import pandas as pd import numpy as np from scipy.stats import kurtosis from scipy.stats import skew my_array = [] a = int(input("Size of array:")) #size of array for i in range(a): my_array.append(int(input("Element : "))) #appending to array my_array = np.array(my_array) #storing into a numpy array print(list(my_array)) x = (np.round(my_array,3)) #making to 3 decimal values y = skew(x) #calculating Skewness value print(round(y,3)) z = kurtosis(x) #calculating kurtosis value print(round(z,3)) print(np.var(list(x))) #calculating variance print(round(np.std(x),3)) #calculating std deviation
Output :Size of array:5 Element : 24 Element : 567 Element : 70 Element : 4 Element : 45 [24, 567, 70, 4, 45] 1.461 0.197 45637.2 213.629
No comments:
Post a Comment