Topics in this sectionStatistical Analysis Using Excel3 topics
- Introduction to Statistical Analysis
- Using Excel for Correlation
- Using Excel for Linear Regression
Correlation Analysis in Microsoft Excel
When we collect two sets of numbers — for example, the heights and weights of students in a class — we often want to know whether larger values in one set tend to go with larger values in the other. This relationship between two variables is called correlation, and Excel can calculate it for us automatically using a number called the correlation coefficient.
The correlation coefficient is a single number that measures how strongly two variables are related. It always falls between -1 and +1:
- A value close to +1 means a positive correlation — as one variable increases, the other tends to increase as well. For example, in many communities, as a family's income increases, their monthly spending on food also increases.
- A value close to -1 means a negative correlation — as one variable increases, the other tends to decrease. For example, as the number of rainy days in a month increases, the amount of water needed for irrigation may decrease.
- A value close to 0 means there is little or no correlation between the two variables. For example, a person's shoe size and their test scores are not related.
Before you can calculate correlation, you need to make sure the Data Analysis tool is available in your Excel window:
- Click the Data tab at the top of Excel
- Look for a group called Analysis on the far right
- If you see Data Analysis there, click it to open the tool
- If you do not see Data Analysis, you will need to load the Analysis ToolPak add-in by going to File → Options → Add-ins, then selecting Excel Add-ins and checking the box next to Analysis ToolPak
Once the Data Analysis tool is open, follow these steps to calculate the correlation coefficient:
Step 1: Select Correlation from the menu
In the Data Analysis window that appears, scroll down and click on Correlation, then click the OK button.
Step 2: Enter your data range
In the Correlation window, click the box next to Input Range and then click and drag across the cells containing your data. Make sure your data is arranged in columns, with each column representing one variable.
Step 3: Choose whether your data has labels
If the first row of your data contains names that describe each variable (for example, "Height_cm" and "Weight_kg"), check the box labelled Labels in first row. This makes your output easier to read. If you do not have labels, leave this box unchecked.
Step 4: Choose how your data is grouped
Since you entered each variable in its own column, select the radio button for Columns. (You would choose Rows only if you entered your data horizontally across a single row.)
Step 5: Choose where to display the results
Click the button next to Output Range, then click a cell where you want the results to appear — for example, click cell E2 to place the results starting at that location. Alternatively, you can choose to put the results on a new worksheet or in a different workbook.
Step 6: Click OK
Click OK, and Excel will display a table showing the correlation coefficients. If you are comparing two variables, you will see a 2×2 table. The correlation of each variable with itself will always be 1.00 (since a variable is perfectly correlated with itself), and the correlation of one variable with the other will appear in the remaining two cells (they will show the same value).
Imagine you collected this data from ten students in your class:
| Student | Height (cm) | Weight (kg) |
|---|---|---|
| 1 | 145 | 38 |
| 2 | 150 | 42 |
| 3 | 155 | 45 |
| 4 | 148 | 40 |
| 5 | 162 | 52 |
| 6 | 158 | 48 |
| 7 | 152 | 44 |
| 8 | 168 | 58 |
| 9 | 160 | 50 |
| 10 | 154 | 43 |
Using the correlation procedure above, Excel will produce output similar to this:
| Height_cm | Weight_kg | |
|---|---|---|
| Height_cm | 1.00 | 0.98 |
| Weight_kg | 0.98 | 1.00 |
The correlation coefficient of 0.98 tells us there is a very strong positive relationship between height and weight in this class — taller students tend to weigh more. This makes sense because as bodies grow taller, they generally also become heavier.
When you look at your correlation output, focus on the number that is not 1.00:
- Above 0.7: strong positive relationship
- Between 0.3 and 0.7: moderate positive relationship
- Between 0 and 0.3: weak positive relationship
- Between -0.3 and 0: weak negative relationship
- Between -0.3 and -0.7: moderate negative relationship
- Below -0.7: strong negative relationship
Remember that correlation does not prove that one variable causes changes in the other. It only shows that a relationship exists.
In South Sudan, health workers at county clinics often record the weight and height of children during nutrition screenings. By using Excel to calculate the correlation between these measurements, a nurse can quickly determine whether a child's weight is appropriate for their height and identify cases of malnutrition that need urgent attention. This simple statistical tool helps healthcare staff make informed decisions about which children need nutritional supplements or referral to a hospital.
Question
What is the range of possible values for a correlation coefficient?
Sign in to submit your answer and have it count toward your mastery.
Sign in to practiceTutor
Stuck? Ask me anything about this topic.
Sign in to ask the Sonza AI Tutor about this question.
Sign in to askDiscussions
No questions yet