Standard Scores
Return the standard score of each value: how many standard deviations it sits above the mean (negative when below). Use the standard deviation that divides by n.
Example 1
values [2,4,4,4,5,5,7,9]
returns [-1.5,-0.5,-0.5,-0.5,0.0,0.0,1.0,2.0]
The mean is 5 and the standard deviation is 2, so 2 is 1.5 deviations below and 9 is 2 above.
Constraints
2 <= len(values) <= 50- The values are not all equal
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More SciPy problems
- The ModeBeginner
- Which Way It LeansBeginner
- At Least K WinsEasy
- Best Fit LineEasy
- Calls in an HourEasy
- Chance BetweenEasy
- Cutoff for the TopEasy
- Rank AgreementEasy