Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##Miara asymetrii rozkładu
- # Współczynnik skośności
- def skewness(X):
- toReturn = 0
- for innerX in X:
- toReturn += ((innerX - mean(X))**3)/len(X)
- toReturn = toReturn / (stdev**3)
- return toReturn
- # Trzeci moment centralny
- def thirdCentralMoment(X):
- centralMoment = 0
- for innerX in X:
- centralMoment += ((innerX - mean(X))**3)
- return (Decimal(1/(Decimal(len(X))))*Decimal(centralMoment))
- # Współczynnik asymetrii
- def asymmetryCoefficient(X):
- return (thirdCentralMoment(X) / Decimal((stdev(X) ** 3)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement