Formualizer Docs
ReferenceFunctionsStatistics Functions

RSQ

RSQ: Returns the coefficient of determination (`R^2`) for paired x/y data.

Summary

RSQ is the square of Pearson correlation and indicates explained linear variance.

Remarks

  • Arrays must contain the same number of numeric observations.
  • Result is in [0, 1] for valid numeric inputs.
  • Returns #DIV/0! when either input array has zero variance.
  • Pairing and shape mismatches return spreadsheet errors from paired-array validation.

Examples

Perfect linear fit
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
1
Strong but imperfect linear relationship
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
0.9642857142857143

Runtime metadata

Category

Statistics

Signature

RSQ(arg1, arg2, ... argN: Number (Range))

This function accepts a repeating argument pattern (min args: 2).

Arity

min 2, max 1

Arguments

arg1

Number · Range · coercion NumberLenientText

Caps

PUREREDUCTIONNUMERIC_ONLY

Source

On this page