COVARIANCE.S(data_y, data_x)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
data_y:
The range of cells that contains the dependent variable data for which you want to calculate the covariance.
data_x:
The range of cells that contains the independent variable data that you want to compare against the dependent variable data in data_y.
The COVARIANCE.S function in Google Sheets is a statistical tool used to calculate the sample covariance between two sets of data. Covariance is a measure of how much two random variables change together, and it helps in understanding the relationship between the two variables. A positive covariance indicates that the two variables tend to increase or decrease together, while a negative covariance indicates that one variable tends to increase when the other decreases.
In simpler terms, COVARIANCE.S allows you to analyze the relationship between two datasets and see how they vary together.
Imagine you are analyzing the relationship between the hours studied and the scores achieved by students in an exam:
| StudentID | HoursStudied |
|---|---|
| 1 | 5 |
| 2 | 10 |
| 3 | 3 |
| 4 | 8 |
| 5 | 6 |
| StudentID | ExamScore |
|---|---|
| 1 | 75 |
| 2 | 90 |
| 3 | 60 |
| 4 | 85 |
| 5 | 80 |
You want to find out if there is a relationship between the hours studied and the exam scores.
To achieve this, you would use the COVARIANCE.S function as follows:
=COVARIANCE.S(A2:A6, B2:B6)In this formula:
A2:A6 is the range containing the HoursStudied data.B2:B6 is the range containing the ExamScore data.When you apply the COVARIANCE.S formula to the data, it will return a numerical value representing the covariance between the two datasets. A positive value indicates that as the hours studied increase, the exam scores tend to increase as well.
COVARIANCE.S is beneficial because it provides insights into the relationship between two variables, which can be crucial for data analysis and decision-making. Understanding covariance can help in predicting outcomes and making informed choices based on historical data.
COVARIANCE.S is an essential function for anyone working with data analysis in Google Sheets, providing a powerful way to enhance your understanding of variable relationships.
Happy analyzing!
You have a table with sales data in Column A (monthly sales) and Column B (monthly advertising spend). Use COVARIANCE.S to calculate the covariance between sales and advertising, helping you understand the relationship between marketing efforts and revenue.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.