Statistical All versions ◉ 16 views

=RSQ()

Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. For more information, see the PEARSON function. The r-squared value can be interpreted as the proportion of the variance in y attributable to the variance in x.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=RSQ(known_y's,known_x's)
Hover argument names in the table for details.
Output typeNumber
Popularity18 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =RSQ() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download RSQ.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
known_y's Range Required An array or range of data points.
known_x's Range Required An array or range of data points.

▣ Examples

▦ Data
CellValue
A2 Known y
B2 Known x
A3 2
B3 6
A4 3
B4 5
A5 9
B5 11
A6 1
B6 7
A7 8
B7 5
A8 7
B8 4
A9 5
B9 4
A10 Known y
B10 Known x
A11 2
B11 6
A12 3
B12 5
A13 9
B13 11
A14 1
B14 7
A15 8
B15 5
A16 7
B16 4
A17 5
B17 4
Square of the Pearson product moment correlation coefficient through data points in A3:A9 and B3:B9. =RSQ(A3:A9, B3:B9)
Result: 0.05795

§ Remarks

  • Arguments can either be numbers or names, arrays, or references that contain numbers.
  • Logical values and text representations of numbers that you type directly into the list of arguments are counted.
  • If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
  • Arguments that are error values or text that cannot be translated into numbers cause errors.
  • If known_y's and known_x's are empty or have a different number of data points, RSQ returns the #N/A error value.
  • If known_y's and known_x's contain only 1 data point, RSQ returns the #DIV/0! error value.
  • The equation for the Pearson product moment correlation coefficient, r, is: where x and y are the sample means AVERAGE(known_x’s) and AVERAGE(known_y’s). RSQ returns r2, which is the square of this correlation coefficient.

✦ Tips

  • Arguments can either be numbers or names, arrays, or references that contain numbers.
  • Logical values and text representations of numbers that you type directly into the list of arguments are counted.
  • If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
  • Arguments that are error values or text that cannot be translated into numbers cause errors.
  • The equation for the Pearson product moment correlation coefficient, r, is: where x and y are the sample means AVERAGE(known_x’s) and AVERAGE(known_y’s). RSQ returns r2, which is the square of this correlation coefficient.

⚠ Common Errors

#N/A If known_y's and known_x's are empty or have a different number of data points, RSQ returns the #N/A error value.
Fix: Make the two ranges the same size
#DIV/0! If known_y's and known_x's contain only 1 data point, RSQ returns the #DIV/0! error value.
Fix: حداقل دو نقطه داده در هر محدوده وارد کنید تا محاسبه همبستگی ممکن باشد.

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.