Returns the degree of asymmetry of the given list of values: > 0.0 => relatively few values are higher than mean(list), < 0.0 => relatively few values are lower than mean(list), = 0.0 => evenly distributed on both sides of the mean (= normal distribution).
(list)
| 603 | return sum([(x-m)**k for x in list]) / (len(list) or 1) |
| 604 | |
| 605 | def skewness(list): |
| 606 | """ Returns the degree of asymmetry of the given list of values: |
| 607 | > 0.0 => relatively few values are higher than mean(list), |
| 608 | < 0.0 => relatively few values are lower than mean(list), |
| 609 | = 0.0 => evenly distributed on both sides of the mean (= normal distribution). |
| 610 | """ |
| 611 | # Distributions with skew and kurtosis between -1 and +1 |
| 612 | # can be considered normal by approximation. |
| 613 | return moment(list, 3) / (moment(list, 2) ** 1.5 or 1) |
| 614 | |
| 615 | skew = skewness |
| 616 |
nothing calls this directly
no test coverage detected
searching dependent graphs…