influxdata / influxdata/influxdb

Standard Deviation function stddev() returning a different value

Open
#18,070 1 comment 2 reactions 0 assignees View on GitHub
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?
![MicrosoftTeams-image (27)](https://user-images.githubusercontent.com/17260106/81739090-bd338000-9468-11ea-858c-d64961b1eadd.png)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.