I’m going crasy with the results from MySql regarding standard functions:
– AVG() the average
– STD() the standard deviation
Check the following results from my table ‘Auction’:
mysql> SELECT avg(buyout) avg FROM auction where buyout <> 0 and item =72988;
+-------------+
| avg |
+-------------+
| 234337.3622 |
+-------------+
That result looks correct, no issue.
But when I run std:
mysql> SELECT std(buyout) std FROM auction where buyout <> 0 and item =72988;
+-------------+
| std |
+-------------+
| 574373.6098 |
+-------------+
! The SDT is greater than AVG (SDT > AVG), and that’s… impossible because my AVG>0.
Where am I wrong here … ?
thx in advance !
There is no mathematical constraint saying that if mean is positive it has to be smaller than the standard deviation.
I read the extract of your data in R
And confirmed that
Further analysis of your data shows that it is far from being normally distributed
Here is an histogram of your data:
And here is the histogram of log-transformed data
And finally a normal Q-Q plot