我有不同人的分量。MySQL:計算標準差的正確方法
平均值爲:
select avg(weight) as avg_weight
from table;
但是,什麼是stddev()
和std()
之間的區別?是否有可能從avg_weight得到標準偏差?
這是正確的做法:
select stddev(weight)
from table; /* -> is here where the function avg(weight) included? */
或者我需要這樣的:
select stddev(avg(weight))
from table; /* (but this does not work) */
感謝。
此問題c應該有太多的答案。你爲什麼不從這裏閱讀它:http:// www。mysqltutorial.org/mysql-standard-deviation/ – CodeLikeBeaker
可以請我說,如果這是正確的,請 從表中選擇stddev(weight); – Melisa