The CORREL function in Google Sheets is a powerful statistical tool used to determine the strength and direction of a linear relationship between two datasets. Utilizing the Pearson product-moment correlation coefficient, this function simplifies the analysis of how two variables move together, helping users make informed decisions based on data correlation.
Syntax
CORREL(data_y, data_x)
- data_y: This parameter represents the range of values for the dependent variable.
- data_x: This parameter denotes the range of values for the independent variable.
Example #1
CORREL(A1:A10, B1:B10)
In this example, the function calculates the correlation coefficient between the values in range A1 to A10 and B1 to B10. Assume that A1:A10 contains sales data, and B1:B10 contains advertisement costs. A result of 0.85 would indicate a strong positive correlation, suggesting that higher advertising costs are associated with increased sales.
Example #2
CORREL(C1:C10, D1:D10)
This function assesses the relationship between two sets of educational test scores found in ranges C1:C10 and D1:D10. If the result is -0.65, it suggests a moderate negative correlation, indicating that as scores in range C decrease, those in range D tend to also decrease, or vice versa.
Example #3
CORREL(E1:E10, F1:F10)
Here, the function measures the correlation between the number of hours studied (E1:E10) and the exam scores received (F1:F10). If the output is 0.95, this indicates a very strong positive correlation, implying that more study hours are likely linked to higher exam scores.
Error handling
- N/A: This error occurs when the provided ranges contain an unequal number of values.
- DIV/0!: Indicates that the function is attempting to divide by zero, often due to constant data in both ranges.
- VALUE!: This error arises when non-numeric values appear in either of the specified ranges.