To calculate the “Jain’s fairness index” of a network, you can follow these steps: 
 
1.) First you should know the resources (bandwidth) allocated to each path of your network. For my example sample network, I took these paths: 
resources_path1 = [10, 15, 20, 25];  
resources_path2 = [30, 25];         
 
2.) Then you calculate the “Jain’s fairness index” using the below formula, where (n) is the number of resources and (x_i) is the resource value of each segment. 
function fairness_index = calculate_jains_index(resources) 
sum_resources = sum(resources); 
sum_squares = sum(resources.^2); 
fairness_index = (sum_resources^2) / (n * sum_squares); 
 
3.) Then using the above function, calculate “Jain’s fairness index” for each path. 
 
After following the above steps, I got the “Jain’s fairness index” values for both to be: 
 
You can refer to these documentation links for more help: