Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0811

D toc

Excerpt

Computes the correlation coefficient between two columns. Source values can be of Integer or Decimal type.

The correlation coefficient measures the relationship between two sets of values. You can use it as a measurement for how changes in one value affect changes in the other. 

  • Values range between -1 (negative correlation) and +1 (positive correlation). 
    • Negative correlation means that the second number tends to decrease when the first number increases. 
    • Positive correlation means that the second number tends to increase when the first number increases.
    • A correlation coefficient that is close to 0 indicates a weak or non-existent correlation.

D s terms
areastat_sampling

D s lang vs sql

D s
snippetBasic

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextpivot value:stdev(initialInvestment,ROI)

correl(initialInvestment,ROI)

Output: Returns the correlation coefficient between the values in the initialInvestment column and the ROI column.

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextpivot value:correl(function_col_ref1,function_col_ref2) [group:group_col_ref] [limit:limit_count]

correl(function_col_ref1,function_col_ref2) [group:group_col_ref] [limit:limit_count]


ArgumentRequired?Data TypeDescription
function_col_ref1YstringName of column that is the first input to the function
function_col_ref2YstringName of column that is the second input to the function

For more information on the group and limit parameters, see Pivot Transform.

D s lang notes

function_col_ref1, function_col_ref2

Name of the column the values of which you want to calculate the correlation. Column must contain Integer or Decimal values.

  • Literal values are not supported as inputs.
  • Multiple columns and wildcards are not supported.

D s
snippetusage

Required?Data TypeExample Value
YesString (column reference)myInputs


D s
snippetExamples

Include Page
EXAMPLE - Two-Column Statistical Functions
EXAMPLE - Two-Column Statistical Functions

D s also
labelaggregate