Oracle STDDEV, STDDEV_POP, STDDEV_SAMP |
The query below shows the three
SQL
Standard Deviation (STDDEV) functions in Oracle. The
standard deviation (STDDEV) and standard deviation
sample (STDDEV_SAMP) are based population-1 (6-1)
computation (population is COUNT(*)) and standard
deviation population (STDDEV_POP) is for the entire
population (6 in this query).
For i = 1 to n (n = 6 in the query shown below) AVG (Average) = SUM(Xi)/n SD (sample) = SQRT(SUM((Xi - Xmean)2/(n-1)) SD (population) = SQRT(SUM((Xi - Xmean)2/n) The MEDIAN function computes the average of the two mid values, idx 3 and 4, which are 30 and 40 respectively ((30 + 40)/2 = 35) in the query shown (beside to the right). |
73947