# Simple math formula to calculate average

I am making a software that deals with employee trust. I am trying to make a math formula (no need to tell that I am bad in math :) ).

Here is the scenario:

Employee 1 trusts employee 2 = > 20% or 0.2 (average trust of employee 1 with employee 2)
Employee 2 deals with 10 customers => 13%  (average - 10 customers trust on Employee 2)
Employee 1 also deals with 7 customers that customers belongs to Employee 2's 10 customers. => 37% ( average 7 customers trust on employee 1)

Employee 1 dealt with 10 customers for last 17 years.
Employee 2 dealt with 7 customers for last 1 years.


Now I want to calculate that how can we say that Employee 1 is much trust worthy than Employee 2? If I just see average than I can say Employee 1 but he only dealt with customers for 1 year. Now I want to make a generic formula to see which one is more trust worthy and I want to use all three values that are ( employee to employee, employee to customer, and number of year) to calculate average percentage. I want to increase or decrease an employee trust based on these values. Please remember I want to decrease as well for some employee I can not say that all employee or 90+ employee are trust worthy etc.

What I did: I just simply plus employee to employee and employee to customer trust weight

Employee 1 = 0.57
Employee 2 = 0.33


I don't know what to do for years.

Current system just calculate employee to employee trust that is not good enough to trust itself.

I am not restricted to any programming language because I just want to make a generic formula. All ideas and suggestions are most welcome !

If you think my problem relates to any previously developed trust model then please do let me know (I already know web trust model but I don't know how to fit that in my situation)

-

## 1 Answer

The solution to problems like this always starts with clear and detailed thinking about what data you have and what you want to do with it. You seem to have 1) cross rating by employees of each other, 2) number of customers served, and 3)years of service. One approach is to decide what weight you want to give each of these. Say you want the cross rating to be 50% of the weight-you might scale it to a range of 0-50, scale the number of customers to 0-30 and scale experience to 0-20 and add up the points. There are several issues here, however. Maybe all your employees like each other and rate each other between 45 and 50. Then it only contributes 5% of the grade, not 50. Maybe one employee knows what you are doing and rates all the rest 0 so s/he will stand out. Maybe one employee just grades harder than all the rest. Is experience good, or do you want customers handled/year (in which case experience counts negatively)? Maybe you want customers handled to "decay"-you get full credit for the ones this year, 80% for ones last year, and decreasing credit further in the past.

You are quite right this is independent of programming language-they can all do this, once we know what this is.

-
Thanks a lot for your answer. I didn't even think about the points you mentioned here. How to avoid such things? I know many of cross rating by employee would be high while rating by customer would be more reliable. Should I change the weights or do you have any other idea? Is there any closely related formula (algorithm) in math? –  tweety Dec 30 '10 at 5:32
In addition, my problem is that whatever basic formula I used, it adds up values and give me high value. I was thinking to make some generic formula that can increase as well as decrease the trust values. I think I have to define some factors? to do this. –  tweety Dec 30 '10 at 5:39
You can rescale the values to give the desired spread. So if cross-ratings range from 45 to 50, you can multiply by 10 to give a range of 50. This is corrupted by a single low score-which is why the Olympics throw out the best and worst. An approach which works sometimes is Z-scores (see Wikipedia) which rescales for mean and standard deviation. But first is to look at the data, decide what factors you want to be important, and make sure they come out that way. –  Ross Millikan Dec 30 '10 at 5:44