Skip to main content

correlation

A statistical measure that shows how closely related are two sets of values. The specific correlation provided is the Pearson correlation coefficient.

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:correlation(?foo, ?bar) AS ?correlation)
{
    [
        :col-aggregations-foo ?foo ;
        :col-aggregations-bar ?bar    
    ]
}

Run query

Result:

correlation

-0.7285