# Standard Deviation issue

**URL:** <https://forum.inductiveautomation.com/t/standard-deviation-issue/16337>\
**Category:** General Discussion\
**Created:** [December 15, 2017, 5:05pm UTC](https://forum.inductiveautomation.com/t/standard-deviation-issue/16337 "2017-12-15T17:05:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jhahn](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@Jhahn](https://forum.inductiveautomation.com/u/Jhahn)\
**Post date:** [December 15, 2017, 5:05pm UTC](https://forum.inductiveautomation.com/t/standard-deviation-issue/16337/1 "2017-12-15T17:05:23Z")

</div>

I have a table with the following numbers

4.577  
4.578  
4.578  
4.578  
4.578  
4.578  
4.579  
4.580  
4.579  
4.579  
4.580  
4.578  
4.581  
4.582  
4.582  
4.581  
4.581  
4.582  
4.581  
4.571  
4.569

If I use the StDev(tablename,data,“numbers”)

I get this number

0.00321208

If I use a sql statement

I get this number  
0.00339408

When I use minitab or excel I get this number

0.003291403

any ideas why its so different?

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [December 15, 2017, 8:55pm UTC](https://forum.inductiveautomation.com/t/standard-deviation-issue/16337/2 "2017-12-15T20:55:34Z")

</div>

Without spending a lot of time digging, a couple of possibilities come to mind.

First is rounding. Are those numbers exactly 3 decimal places, or being displayed as three decimal places? Obviously any calculation using the full number of decimal places can be different than a calculation using a rounded number.

Also, there are two types of standard deviation, sample and population, and their results will be different. Ignition’s stdDev expression function uses sample standard deviation.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [December 15, 2017, 9:00pm UTC](https://forum.inductiveautomation.com/t/standard-deviation-issue/16337/3 "2017-12-15T21:00:14Z")

</div>

For grins, I plugged the data you posted into Wolfram Alpha. I got 0.00321208 as the sample std dev and 0.0032914 as the population std dev. No idea how sql is getting its number unless rounding is coming into play.

---

<div class="post-metadata">

**Author:** ![Jhahn](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@Jhahn](https://forum.inductiveautomation.com/u/Jhahn)\
**Post date:** [December 18, 2017, 3:46pm UTC](https://forum.inductiveautomation.com/t/standard-deviation-issue/16337/4 "2017-12-18T15:46:50Z")

</div>

I’m rounding all the numbers to 3 decimal places. Thank you for your response
