influxdata / influxdata/influxdb
Standard Deviation function stddev() returning a different value
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
The stddev() function used in influx query returns a different value than the one manually calculated. In the image below, I am trying to get the standard deviation of the field `moisture`. The first query results in two values in a specific time range. The last query in the image is for the standard deviation for those two values, which results in 6.39. However the correct standard deviation value for those two numbers is about 4.52. Could it be that the way influx calculates it might be different?

Contributor guide
Research direction
Start with the stddev() function and the Influx query shown in the issue body and image, reproducing the reported result for the two moisture values. Compare the function's result with the manually calculated standard deviation and document or test the expected behavior once the calculation convention is established.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100