Check Sheet Logo
Check Sheet

RSQ

The RSQ function returns the square of the Pearson product-moment correlation coefficient, which is a measure of the correlation between two sets of data. This function is commonly used in statistical analysis to determine the strength of a linear relationship between two variables.

Usage

Use the RSQ formula with the syntax shown below, it has 2 required parameters:

=RSQ(data_y, data_x)
Parameters:
  1. data_y (required):
    The range or array containing the dependent variable data.
  2. data_x (required):
    The range or array containing the independent variable data.

Examples

Here are a few example use cases that explain how to use the RSQ formula in Google Sheets.

Calculating correlation between two variables

By using the RSQ function, you can quickly calculate the correlation coefficient between two sets of data. This can help you determine if there is a strong positive or negative relationship between the variables.

Assessing linear regression models

The RSQ function can be used to assess the goodness of fit of a linear regression model. By comparing the calculated correlation coefficient to the expected value, you can determine how well the model fits the data.

Comparing data sets

If you have two data sets that are related, you can use the RSQ function to determine how closely they are correlated. This can help you identify patterns or trends in the data.

Common Mistakes

RSQ not working? Here are some common mistakes people make when using the RSQ Google Sheets Formula:

Using inconsistent data ranges

Make sure that the two data ranges have the same number of rows and columns, and that they are aligned properly. If the data ranges are not consistent, the RSQ function will return an error.

Forgetting to enclose the data ranges in parentheses

Remember to enclose the data ranges in parentheses, separated by a comma. If you forget to do this, the RSQ function will return an error.

The following functions are similar to RSQ or are often used with it in a formula:

  • CORREL

    The CORREL formula returns the correlation coefficient between two sets of data. This coefficient represents the strength of the linear relationship between the two sets of data, with values ranging from -1 (perfect negative correlation) to 1 (perfect positive correlation).

  • PEARSON

    The PEARSON function calculates the correlation coefficient between two sets of data points, data_y and data_x. This coefficient indicates how closely related the two sets of data are. A high correlation coefficient indicates a strong positive correlation, while a low coefficient indicates a weak or negative correlation. This function is commonly used in statistical analysis and data visualization.

  • SLOPE

    The SLOPE formula calculates the slope of the linear regression line that best fits the input data. It is commonly used in statistics to analyze trends and predict future values based on past performance.

  • INTERCEPT

    The INTERCEPT function calculates the point where the line of best fit for a set of data intercepts the y-axis. This function is commonly used in regression analysis to find the constant b in the equation y=mx+b where m is the slope of the regression line.

Learn More

You can learn more about the RSQ Google Sheets function on Google Support.