• mdv 9731 (1/28/2011)


    I do not agree that the answer is right.

    Think it is supposed to be 0.

    the standard deviation s (sigma) is the square root of the average value of (X - ยต)2.

    Which means s = sqrt(((1-1)^2)/1) = 0

    Or in other words std. deviation equals sqrt of (population-avarage) sq / number of population values

    Please correct me if im wrong on the formula it has been a while since i used my statistics ๐Ÿ˜€

    What you state is correct for a population standard deviation. Then you devide by the number of samples N, which is one for a single record. You do this with the function STDEVP.

    When using STDEV however, you take the sample standard deviation in which you devide by N - 1 which would result in a division by zero. Hence the NULL.

    SELECT STDEV(100)

    Results in NULL

    SELECT STDEVP(100)

    Results in 0

    See: http://en.wikipedia.org/wiki/Standard_deviation