# Overview

With the Statistics analysis, you can calculate statistical measures for specific series on a time range that you define. This analysis differs from the Cross section analysis, which calculates statistical measures across a group of series at each point in time. Use it when you want to add one of these measures to a chart:

### None

This method is used to include a series without any calculation applied.

### Mean

Calculates the average of the values as a constant value.

### Median

Calculates the middle value in sorted list of values as a constant.

### Trend

Calculates the trend as a line fitted using a linear regression.

### Percentile

Calculates the specified percentile of the range as a constant.

### Min

Calculates the lowest value as a constant.

### Max

Calculates the highest value as a constant.

### Exponential trend

Calculates the trend as a line fitted using a linear regression on the logarithm of the data.

Essentially the trend line is defined as Exp(Linear(Log(series))).
If the 'min(series) < 0' then a constant is added to the series before the calculation to make it non-negative. It's subtracted again after the calculation.

### Line

Calculates a straight line between two data points that you specify: the start and the end date of the range. If no dates are specified as start / end range, the first / last value of the range will be used.

It differs from the Cross section analysis, which calculates statistical measures across a group of series at each point in time.

# Settings

For each calculation in statistics, you can:

• Set the Date range in which the calculation is performed.
• Select Extrapolate to extend the graph of the calculated output outside of the date range that you set.
• The Coefficient defines the number of standard deviations from the mean that will be included in the confidence interval. The coefficient is the percentage of values that should fall within the boundary of the confidence interval assuming normally distributed data.

# Examples

Mean and standard deviations

In this example, we calculated the means of the CAPE Shiller Index in two time windows with +1 / -1 standard deviation bands around them.

Here, we calculated the average growth rate per decade for the US GDP.

Line in Statistics

We used the line statistic to draw a straight line between two data points. We chose to extrapolate the lines backwards and forwards in time.

Trend line

Using the log of the real US GDP, we calculated two linear trends: one between 2000 and 2006, and another from 2009.

# Questions

## Why under Coefficient there is a 68.3?

It comes from 68–95–99.7 rule known also as three-sigma rule of thumb. The 68.3 indicates one standard deviation, 95 - two, and 99.7 - three. As default trend band is set to +/- 1 standard deviation.

## How do I calculate the mean of a series across several periods?

1. Add 'Mean' as a calculation.
2. Enter the data range you want used in the calculation
3. Repeat these steps for all the time periods you are interested in.

For each calculation, you can untick the 'Extrapolate' setting so that each line is drawn for the time period it is calculated on.

## How do I add a trend channel / trend band?

Insert a 'Trend' in the Statistics analysis and tick the 'Std. dev.' checkbox.

Change the coefficient to control the number of standard deviations defining the width of the trend channel (68.3, 95, 99.7). The default is +/- 1 standard deviation. Standard deviation is calculated for the whole history, it's not a 'moving window std dev' - for this use StdDev(series, window) formula.

If you are searching for trend line chart see: How to add a trend line/best fit line?