Returns the square of the Pearson product-moment correlation coefficient for data points in two arrays.
Cú pháp
RSQ(known_ys, known_xs)Đối số
known_ysbắt buộc
An array or range of data points representing the dependent variable.
known_xsbắt buộc
An array or range of data points representing the independent variable.
The RSQ function calculates the coefficient of determination, often denoted as r-squared, which represents the proportion of the variance in the dependent variable that is predictable from the independent variable. It is commonly used in regression analysis to determine how well a regression line fits the observed data. If the arrays contain text, logical values, or empty cells, those values are ignored.
=RSQ({2,3,5,7,11}, {1,2,3,4,5})→0.986Calculates the r-squared value for the given sets of y and x values.
Prepare your data
Ensure your dependent variables (y) and independent variables (x) are in two separate ranges of equal length.
Enter the function
Type =RSQ( and select the range for known_ys, followed by a comma and the range for known_xs.
Calculate
Press Enter to see the coefficient of determination for your data set.
An RSQ value of 1 indicates that the independent variable perfectly predicts the dependent variable, meaning all data points lie exactly on the regression line.