Skip to main content

regr_sxy

Calculates the linear regression coefficient for the sum of x*y where x and y are not unbound.

Parameter

Type

Description

ys

decimal, double

the independent variable

xs

decimal, double

the dependent variable

Returns: decimal

Example

Query:

PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-aggregation-sample-queries/>
PREFIX agg: <http://data.world/function/aggregate#>

SELECT (agg:regr_sxy(?foo, ?bar) AS ?regr_sxy)
{
    [
        :col-aggregations-foo ?foo ;
        :col-aggregations-bar ?bar
    ]
}

Run query

Result:

regr_sxy

1808.0