Enter Sequence Data
Supply y-values as a sequence or sampled function. Optional x-values let you order points before variation is calculated.
Example Data Table
This sample illustrates how absolute successive changes are added.
| Index | x | f(x) | Δf from previous | |Δf| |
|---|---|---|---|---|
| 1 | 1 | 2 | — | — |
| 2 | 2 | 5 | 3 | 3 |
| 3 | 3 | 3 | -2 | 2 |
| 4 | 4 | 7 | 4 | 4 |
| 5 | 5 | 6 | -1 | 1 |
| 6 | 6 | 9 | 3 | 3 |
| Total variation | 13 | |||
Formula Used
For a discrete sequence or sampled function values f(x₁), f(x₂), …, f(xₙ), the total variation is the sum of all absolute successive changes.
The calculator also separates movement into positive and negative parts:
Negative Variation = Σ max(f(xᵢ₋₁) - f(xᵢ), 0)
Total Variation = Positive Variation + Negative Variation
Additional diagnostics help interpret structure:
- Average absolute step = TV / (n - 1)
- Normalized variation = TV / range, when the range is nonzero
- Variation density = TV / (xmax - xmin), when x-span is nonzero
- Turning points count sign changes in non-flat successive differences
How to Use This Calculator
- Enter the function or sequence values in the y-values box.
- Enter matching x-values if your data is sampled at specific positions.
- Set scale factor and vertical shift if you want transformed values analyzed.
- Choose decimal precision for displayed results.
- Use tolerance to treat very small changes as flat.
- Submit the form to view summary metrics, the chart, and the full step table.
- Download CSV for spreadsheets or PDF for reporting.
Frequently Asked Questions
1) What does total variation measure?
It measures the full amount of up-and-down movement in a sequence or sampled function. It adds every absolute step change, not just the net difference.
2) How is total variation different from net change?
Net change compares only the first and last values. Total variation counts all intermediate rises and falls, so it is usually larger when oscillation exists.
3) Why are x-values optional here?
For many discrete sequences, order alone is enough. Optional x-values help when samples belong to explicit positions and need sorting before variation is computed.
4) What is positive variation?
Positive variation sums only upward moves between consecutive points. It forms one half of the Jordan-style decomposition used in bounded variation analysis.
5) What is negative variation?
Negative variation sums only downward moves by magnitude. Adding positive and negative variation gives the total variation of the dataset.
6) Why does a constant shift not change variation much?
Adding the same vertical amount to every value leaves successive differences unchanged. Scaling does affect variation because each difference is multiplied.
7) What does normalized variation show?
It compares total movement with the dataset range. Larger values indicate heavier oscillation relative to the vertical spread of the data.
8) Can I use this for signals or time series?
Yes. It works well for sampled signals, time series, experimental readings, and discrete mathematical sequences whenever stepwise movement matters.