Correlation coefficient
Statistics only work with numbers. You need to add numerical key columns for your text columns before you can calculate the correlation.
Apologies for reviving an old question however I want to check your response to systemnova if you wouldn't mind.
Say I wanted to check the correlation between day of the week and temperature and had collected the below data:
| Index | Category | Temp |
| 1 | Monday | 20 |
| 2 | Monday | 24 |
| 3 | Monday | 19 |
| 4 | Wednesday | 15 |
| 5 | Wednesday | 28 |
| 6 | Wednesday | 12 |
| 7 | Wednesday | 20 |
| 8 | Friday | 20 |
| 9 | Friday | 10 |
Are you saying I can swap the days of the week for a numerical key such as Monday = 1, Wednesday = 2 and Friday = 3 to give the below and then use this quick measure to produce meaningful results? Unfortunately I am still very new to stats and Power BI. Any direction would be greatly appreciated. Thanks.
| Index | Category | Temp |
| 1 | 1 | 20 |
| 2 | 1 | 24 |
| 3 | 1 | 19 |
| 4 | 2 | 15 |
| 5 | 2 | 28 |
| 6 | 2 | 12 |
| 7 | 2 | 20 |
| 8 | 3 | 20 |
| 9 | 3 | 10 |
- lbendlin4 years agoSuper User
yes, that's what I am saying. Replace text values with their numerical index and compute the correlation over the indexes. Afterwards you can map it back.
(bit unfortunate that your sample table has an "Index" column. Please discard that, it doesn't help)
- Anonymous4 years agoNot applicable
Discard the Index column? I assumed that would be the 'Category' element of the quick measure. Would it be correct to instead have the following, where the elements of the quick measure are:
Category = Day of Week column
Measure X = Day of Week Key column
Measure Y = Temp columnIndex Day of Week Day of Week Key Temp 1 Monday 1 20 2 Monday 1 24 3 Monday 1 19 4 Wednesday 2 15 5 Wednesday 2 28 6 Wednesday 2 12 7 Wednesday 2 20 8 Friday 3 20 9 Friday 3 10 - lbendlin4 years agoSuper User
Ah, the quick measure. I never understood why they added a category there and made it mandatory. It has (in my opinion) nothing to do with the computation. I always implement the Pearson algorithm manually.