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
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
1
Strong but imperfect linear relationship
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
0.9642857142857143
Related functions
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
arg1Number · Range · coercion NumberLenientText
Caps
PUREREDUCTIONNUMERIC_ONLY
Source