• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 708
  • Last Modified:

Mysql Variance


Hi guys,

THis is an example from
http://www.java2s.com/Code/PostgreSQL/Analytical-Functions/Variancefunctiondemo.htm

could someone explain to me, help me understand, what is being calculated when i use Variance?

Thanks

 id |  name  | salary | start_date |   city    | region
----+--------+--------+------------+-----------+--------
  1 | Jason  |  40420 | 1994-02-01 | New York  | W
  2 | Robert |  14420 | 1995-01-02 | Vancouver | N
  3 | Celia  |  24020 | 1996-12-03 | Toronto   | W
  4 | Linda  |  40620 | 1997-11-04 | New York  | N
  5 | David  |  80026 | 1998-10-05 | Vancouver | W
  6 | James  |  70060 | 1999-09-06 | Toronto   | N
  7 | Alison |  90620 | 2000-08-07 | New York  | W
  8 | Chris  |  26020 | 2001-07-08 | Vancouver | N
  9 | Mary   |  60020 | 2002-06-09 | Toronto   | W
(9 rows)

postgres=#
postgres=# SELECT variance(salary) FROM employee;
 variance
-----------
 718558064
0
kingjely
Asked:
kingjely
1 Solution
 
petr_hlucinCommented:
Variance is a statistical function which based on given set of numbers give you a number which tells you "how much are these values usually far from its average". If the variance is close to 0 the values within the set are close to each other and vice versa. Better explanation is given e.g. at http://en.wikipedia.org/wiki/Variance

PS (for a statistician who reads this): The explanation is given using very vague terms for better understandability.
0
 
kingjelyAuthor Commented:
I have read it, and I take your word for it, ;)
I Thought i may be sometihng i could use, but im not that clever.

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now