DtotheG - 1 year ago 88

SQL Question

I have a table:

`LocationId OriginalValue Mean`

1 0.45 3.99

2 0.33 3.99

3 16.74 3.99

4 3.31 3.99

and so forth...

How would I work out the

`Standard Deviation`

`STDEVP`

`STDEV`

Answer Source

To use it, simply:

```
SELECT STDEVP(OriginalValue)
FROM yourTable
```

From below, you probably want `STDEVP`

.

From here:

STDEVis used when the group of numbers being evaluated are only apartial samplingof the whole population. The denominator for dividing the sum of squared deviations is N-1, where N is the number of observations ( a count of items in the data set ). Technically, subtracting the 1 is referred to as "non-biased."

STDEVPis used when the group of numbers being evaluated is complete - it's theentire populationof values. In this case, the 1 is NOT subtracted and the denominator for dividing the sum of squared deviations is simply N itself, the number of observations ( a count of items in the data set ). Technically, this is referred to as "biased." Remembering that the P in STDEVP stands for "population" may be helpful. Since the data set is not a mere sample, but constituted of ALL the actual values, this standard deviation function can return a more precise result.