MySQL Forums
Forum List  »  Quality Assurance

STD function not accurate
Posted by: Y B
Date: April 02, 2016 03:09PM

Hi All,
The std function is very useful and I use it often. However, I noticed I am getting slightly different results compared to computing the standard deviation in R or Excel for the same values.

Here is my query:
select distinct stain, cell, organ, group_concat(value), avg(value), std(value) from mydata where bacteria="germ free" group by stain, cell, organ

Now here are the values from one row, from the group_concat field:
13.10000038,14,10.19999981,11.19999981,26.5,18.5,7.5,16.70000076,21.70000076,10.10000038,15.39999962,11.69999981,13.69999981,31.79999924,21.10000038,35.29999924,34.09999847,10.10000038,9.39999962,32.5,17.10000038,16.89999962,19.39999962,19.10000038,16.60000038,15.19999981,15.69999981,17.20000076,11.60000038,22.70000076,16.89999962,12.80000019

The mean is computed correctly and is: 17.68125001
The std is computed as: 7.260140888

However, when using these values in R or Excel, the std is: 7.376311

This seems like a big difference. Can anyone provide an explanation? I have been using the STD function for a while and now getting worried.

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
STD function not accurate
2196
Y B
April 02, 2016 03:09PM
1111
April 02, 2016 08:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.