Statistical analysis
Describing a set of values with numbers: spread, quantiles, correlation, the shape of the distribution they came from, and drawing a sample from a named one. Computed in the application over data it already holds, which is what separates it from analytical queriesAnalytical queriesGrouped, aggregated and filtered reads for analytical clients, answered by the database rather than in application memory. This concerns the queries a chart or report sends, while analytic modelling defines the measures and dimensions they read.SAP only, where a service answers the grouped read a chart sends, and from predictive modelsPredictive modelsTraining, deploying and calling a model that predicts a value from tabular business data: a classification, a regression, a forecast. Distinct from LLM integration, where a language model generates text, even where both run on the same service.SAP only, which train and serve something that predicts a value.
Overview
ABAP SQL reduces the rows of a result set to one value with an aggregate expression written into the SELECT list beside a GROUP BY; SAP's cheat sheet shows AVG, MAX, MIN, SUM, COUNT and STRING_AGG as a selection of the available functions. Among the released classes, CL_ABAP_PROB_DISTRIBUTION generates random numbers from probability distributions and calculates probabilities, beside the CL_ABAP_RANDOM* family for arbitrary numbers of a given numeric type.
Not covered: At the read, and at one number. An aggregate is evaluated while the database answers the query, so an internal table already in memory is outside it, and each function returns a value rather than a description of the sample it came from. CL_ABAP_PROB_DISTRIBUTION runs the other way, from a named distribution to numbers and probabilities; reading a distribution back out of data that exists is not what it offers.
The community side here is a single library, so what it adds is that library's method list rather than a survey of a field.
One class computes over an internal table what the aggregates leave out: quartiles and the outliers outside them, the harmonic, geometric and quadratic means, variance, skewness, kurtosis, and the covariance and correlation of two columns, each of them also per group. It adds min-max and z-score scaling, a Freedman-Diaconis histogram with the empirical density and distribution functions derived from the data, and a Jarque-Bera test of whether the values are normal.
Artifacts
Details
Coverage
For your agent
- Ref
capability:statistical-analysis- JSON
- /capabilities/statistical-analysis.json
- MCP
- Connecting an agent