# TemporalStatistics - computed average values

**URL:** https://discourse.paraview.org/t/temporalstatistics-computed-average-values/169
**Category:** ParaView Support
**Created:** [June 13, 2018, 1:33pm UTC](https://discourse.paraview.org/t/temporalstatistics-computed-average-values/169 "2018-06-13T13:33:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [June 13, 2018, 1:33pm UTC](https://discourse.paraview.org/t/temporalstatistics-computed-average-values/169/1 "2018-06-13T13:33:41Z")

</div>

Hi everyone,

I’ll have to use the TemporalStatistics filter to compute average values, but I am wondering how the average values are computed.

Is there it something like a trapezoidal integration with equal spacing or a simple sum of all values divided by the number of time-steps ?

I will be using results from cyclic results, so I would like to know whether I should also load the “last” time-step (tstart + T) or if I stop at the before last step (tstart + T - dt)

Thanks in advance.

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [June 13, 2018, 1:42pm UTC](https://discourse.paraview.org/t/temporalstatistics-computed-average-values/169/2 "2018-06-13T13:42:34Z")

</div>

Hi,

From the TemporalStatistics filter documentation (this can be displayed in paraview with the `?` button in property panel):

> vtkTemporalStatistics ignores the temporal spacing. Each timestep will be weighted the same regardless of how long of an interval it is to the next timestep. Thus, the average statistic may be quite different from an integration of the variable if the time spacing varies.

For the second question, I’m not sure to see what you mean here. The filter will use each available timestep.

---

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [June 13, 2018, 2:50pm UTC](https://discourse.paraview.org/t/temporalstatistics-computed-average-values/169/3 "2018-06-13T14:50:58Z")

</div>

Ok, so with equal weights, say that I have 200 steps in one cycles (step 201 is the start of the new cycle), then I should load 200 steps to have statistics over one period only, and not 201.  
Otherwise my average values will be wrong.

That’s what I meant for the second question.

I the weights of the first and last time-step are 0.5, instead of 1, then I would have to load 201 steps to get a proper average value.

Thanks for the quick answer, by the way.

Pierre

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [June 13, 2018, 3:20pm UTC](https://discourse.paraview.org/t/temporalstatistics-computed-average-values/169/4 "2018-06-13T15:20:09Z")

</div>

> [@pcrepier](#):
>
> I should load 200 steps to have statistics over one period only, and not 201.

Yes, you’re right, thanks for the explanation.

You may now mark the post as solved (click on the `show more` button under the relevant answer).
