---
title: Statistical Functions
slug: litmusedge/statistical-function-overview
docTags: 
createdAt: 2024-08-06T18:53:05.058Z
---

The Analytics module makes use of built-in statistical functions to process the input data. Find a processor by the task you want to perform, then follow the link for its parameters.

## Transform a value

| **Processor**                                    | **What it does**                                                                |
| ------------------------------------------------ | ------------------------------------------------------------------------------- |
| [Change](docId\:nt4vHGY5_j2rETB-QMXq_)           | Sets, replaces, deletes, or moves a field's value.                              |
| [Conversion](docId\:kZHlO1EiOSp1zHUBHuwQ4)       | Converts common factory units, such as temperature, angle, or timestamp format. |
| [Base Conversion](docId\:MO8abO_sVk0B76m4YSaTT)  | Converts a number between decimal, binary, octal, and hexadecimal.              |
| [Normalization](docId\:pU2e1T-WqGTe39x-pZQ0W)    | Scales incoming values into a 0-to-1 range.                                     |
| [Rounding](docId\:DuxB_DOUVv1NeaOqK2sgb)         | Rounds a number to a set number of decimal digits.                              |

## Filter and smooth a signal

| **Processor**                                         | **What it does**                                                                       |
| ----------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [Gaussian Filter](docId:09BareKTrJXg7RvDj6UAO)        | Smooths a signal using a Gaussian weighting function while preserving its trend.       |
| [Moving Window](docId\:WBvhXs1ZCNewISzglRTAj)         | Calculates a continuously updating average, maximum, or minimum over a sliding window. |
| [Simple Window](docId\:bIG3bhyrBdAgc-9XfSjD2)         | Outputs a raw moving window of recent values, oldest to newest.                        |
| [Signal Decomposition](docId\:iQ7YvJxCNJ_dggbZxK-0I)  | Separates a time series into trend, seasonality, and residual components.              |

## Detect patterns and monitor quality

| **Processor**                                          | **What it does**                                                                                           |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| [Anomaly Detection](docId\:pF9zsUuCYEp2KyNE8fq0l)      | Flags data points outside a normal statistical range using the three-sigma rule.                           |
| [Rise and Fall](docId\:LBT-wmg3Df1wUCswwjPH-)          | Detects when a value crosses a threshold and reports the crossing's duration.                              |
| [SPC Charts](docId\:rhluSXb85vA9aBsBWTuKZ)             | Assesses process performance and capability against specification limits, flagging Nelson Rule violations. |
| [XMR Chart](docId\:R8pE9GCpPpWyTYdixVtnY)              | Tracks a process against control limits calculated from a stabilized baseline.                             |
| [Statistical Functions](docId\:La2a9pyMX6oVTbfe6C5YJ)  | Tests whether a window of data matches a normal distribution using goodness-of-fit tests.                  |

## Predict future values

| **Processor**                                           | **What it does**                                                                    |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [ARIMA Filter](docId\:IT72F6joYPb3mU8rP1JA7)            | Forecasts the next value using an ensemble of ARIMA models fit to a rolling window. |
| [Linear Prediction](docId\:UroeJ7EC3kSWPyA3GcROm)       | Forecasts future values by fitting a linear trend line to recent data.              |
| [Statistical Prediction](docId\:mviub9d0aqI1lrkx8mmBj)  | Forecasts future values with cyclical patterns using a Fast Fourier Transform.      |

## Route or combine messages

| **Processor**                                          | **What it does**                                                          |
| ------------------------------------------------------ | ------------------------------------------------------------------------- |
| [Switch](docId\:M_F3yq3k6ZdQYhnoByXRR)                 | Forwards a message only when it passes a rule you define.                 |
| [Delay/Rate-Limit](docId\:jjOScUzxdP7aEp5ROVjCF)       | Delays each message or limits how many pass through per time window.      |
| [Inputs](docId:_msPROB7JGnezFwez_HbE)                  | Calculates an average, maximum, minimum, or sum across multiple inputs.   |
| [Combination Processor](docId\:vMDFT5xGTacknCskEnMJ6)  | Combines fields from multiple input processors into a single JSON string. |
| [Join Processor](docId\:R358t46iNohhxSmkx6ADq)         | Combines the output of multiple input processors into a single message.   |

## Apply AI and ML models

| **Processor**                                                | **What it does**                                                                                                             |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| [AI Processor](docId\:fDM0ZxMIH04X00F-zHgiS)                 | Sends data to an AI model and returns its response, for summarizing, classifying, or extracting structured data.             |
| [AI Responses](docId:_PHAAbBx-FN5SXFbArSmk)                  | Sends messages to an AI model and keeps conversation history across calls. Add tools, files, and memory to make it an agent. |
| [AI Vision Processor](docId\:lGGfj4JVqV2Mjx6wM0Fi1)          | Sends an image to an AI model and returns its response.                                                                      |
| [Feature Extractor](docId\:C69C81n4mAz5zZmczOBlF)            | Calculates statistical features, such as average, standard deviation, and skewness, from a window of values.                 |
| [TensorFlow Processor](docId\:Bn-gN3QCC_pbhQWXzM4S2)         | Feeds time-series data to a trained TensorFlow model.                                                                        |
| [TensorFlow Images Processor](docId\:nDGx8TaKLqPyMpRnxq5Ux)  | Feeds images to a trained TensorFlow model.                                                                                  |

## Write custom logic

| **Processor**                                         | **What it does**                                                       |
| ----------------------------------------------------- | ---------------------------------------------------------------------- |
| [Expression](docId\:U8i_ECgUWzIYUzz9AH6xD)            | Evaluates a custom mathematical formula against input values.          |
| [JavaScript Processor](docId\:hjItHMx5eyVKc04kN6gm6)  | Adds, removes, or modifies message fields using JavaScript.            |
| [JSONata Processor](docId\:p0R5C3qKdKOQciPEIVBnf)     | Reshapes, filters, or combines JSON fields using a JSONata expression. |
| [Tengo Script](docId\:scQMHGGJpMsZENhXn2z4z)          | Adds, removes, or modifies message fields using a Tengo script.        |

## Read files

| **Processor**                                           | **What it does**                                                |
| ------------------------------------------------------- | --------------------------------------------------------------- |
| [File Reading Processor](docId\:Ss3F_NJYaZQ1dm_nM33DG)  | Reads a file's contents and returns them in the output payload. |

