When sort.Float64sAreSorted is called, it panics on NaN inputs.
The way the code is written, there seems to be an intent that if the
input x contains a NaN, then the function should return a NaN. I
switched the order of the conditional statements so that this became
possible.
I also modified the test cases so that cases with NaN could be
evaluated.
This CL changes the function signature from StDev to StdDev to match the other StandardXxx functions.
Additionally, this PR fixes the comments that don't start with the correct name
and changes +=1 to ++ by recommendation from golint
Lists should be separated out into their own block (see the reflect package).
It was decided in code review that Quantile and Percentile are confusing
so it was decided to change it to Quantile and CDF