Created
May 26, 2011 18:59
-
-
Save neilkod/993787 to your computer and use it in GitHub Desktop.
summarize these 16 values according to a defined scale
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goal: To summarize these 16 values and rate it on my scale. My first inclination is to use the median value(80). I didn't think the average is accurate because sometimes the data can be highly skewed. | |
scale: {40: 'extra low', 80: 'low', 160: 'moderate', 240: 'high-moderate', 320: 'high', 400 : 'extra high'} | |
>>> pd.values() | |
[160, 80, 80, 120, 240, 400, 80, 80, 400, 240, 80, 80, 160, 80, 80, 80] | |
>>> numpy.std(pd.values()) | |
107.9062092745362 | |
>>> numpy.mean(pd.values()) | |
152.5 | |
>>> numpy.median(pd.values()) | |
80.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment