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 queries, where a service answers the grouped read a chart sends, and from predictive models, which train and serve something that predicts a value.

Overview

SAP SHIPS

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.

THE COMMUNITY ADDS

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.

Artifacts1

1 of 1 artifacts
ArtifactSignals
Packages1
ABAP Statistical ToolsABAP class for descriptive statistics over an internal table
Signals
none

Details

Coverage
statecore and community, ABAP
assessed
relationshipunassessed
For your agent
Ref
capability:statistical-analysis
JSON
/capabilities/statistical-analysis.json
MCP
Connecting an agent