2 Replies Latest reply on Mar 9, 2016 9:17 AM by Yan Wu

# Calculating Mean, Standard Deviation in time series, key value pair data

Hello,

I have time series data in name value pair format.

The data has 3 sites - A, B, C.  The data is daily for December 2015.

For each site, A, B, C, I would like to calculate,:

1) Average

2) Standard Deviation

3) Flag that says it's +/- 1 standard deviation away from the mean

I cannot figure out how to add those columns into the table.

I've attached what I'd like to do in a sample in Excel.

Anyone have any ideas?  Thank you so much!

• ###### 1. Re: Calculating Mean, Standard Deviation in time series, key value pair data

Probably need table calculations here.

```//Avg Across Field
{FIXED [Field]: AVG([Value])}

//StDev Across Field
{FIXED [Field]: STDEV([Value])}

//Flag
IIF (([Value]-[Avg Across Field])>[StDev Across Field] OR ([Avg Across Field]-[Value])< ([StDev Across Field]*-1),1,0)
```

Once done, this should give you the results you need.

• ###### 2. Re: Calculating Mean, Standard Deviation in time series, key value pair data

Beautiful.  Thank you so much!