Need Help with Calculating similarities using the Matching coefficient and Jaccard's coefficient methods in Excel

sllafleur

New Member
Joined
Feb 5, 2020
Messages
12
Office Version
  1. 2016
Platform
  1. Windows
I have to use both methods listed in the "Topic" field using the observations below. I have searched and searched, but nothing is giving me clear instructions on how to do this.

ObeservationsFeverCoughBreathing difficultyFatigueHeadacheLoss of tasteSore throat
11011011
21110011
30100111
41110011
51011110
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Are you looking for help on how to compute the coefficients or how to implement the calculations in Excel?
 
Upvote 0
Are you looking for help on how to compute the coefficients or how to implement the calculations in Excel?
Both because no matter what I have read about similarities, I can't seem to understand it so I need someone to break it down for me like I am a complete dummy lol.
 
Upvote 0
First a disclaimer. I'm not a statistician and I don't know a great deal about either of these methods. However, my understanding is the following:
A one in your data indicates the condition is present in the observation and a zero indicates it's not present (binary data).
The coefficients are calculated in pairs of observations. In other words, you will have to calculate coefficients for observations 1-2, 1-3, 1-4 up to 4-5 which is 10 sets of coefficients.
Assuming the following notation represents the number of matching attributes (the sum where each of these conditions exist)
N(1,1) means a one is in both observations for a given condition
N(0,0) means a zero is in both observations
N(1,0) means a one is in first observation and a zero is in the second observation
N(0,1) means a zero is in first observation and a one is in the second observation

Jaccard coefficient = N(1,1) / (N(0,1) + N(1,0) + N(1,1))
Matching coefficient = (N(0,0) + N(1,1)) / (N(0,0) + N(0,1) + N(1,0) + N(1,1))

For example, for observations 1 and 2:
N(1,1) = 4
N(0,0) = 1
N(1,0) = 1

Jaccard = 4/6 =.67%
Matching = 5/7 = .71%
I have a spreadsheet with this worked out, I just need to figure out how to post it.
 
Upvote 0
Following is an example for observations 1 and 2. There may be better, more concise ways of doing this.
Jaccard.xlsx
ABCDEFGHI
2ObeservationsFeverCoughBreathing difficultyFatigueHeadacheLoss of tasteSore throat
311011011
421110011
530100111
641110011
751011110
8
9Observations 1 and 2:Sum
10Both true (1,1)10100114
11Both false (0,0)00001001
12First true, second false (1,0)00010001
13First false, second true (0,1)01000001
14
15Jaccard coeff.67%
16Matching coeff.71%
Sheet1
Cell Formulas
RangeFormula
B10:H10B10=IF(B3=1,IF(B4=1,1,0),0)
I10:I13I10=SUM(B10:H10)
B11:H11B11=IF(B3=0,IF(B4=0,1,0),0)
B12:H12B12=IF(B3=1,IF(B4=0,1,0),0)
B13:H13B13=IF(B3=0,IF(B4=1,1,0),0)
B15B15=I10/(I10+I12+I13)
B16B16=(I10+I11)/(I10+I11+I12+I13)
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top