Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Difference in the Formula calulation (https://www.askmehelpdesk.com/showthread.php?t=15360)

  • Nov 27, 2005, 09:55 PM
    Sulakshana
    Difference in the Formula calulation
    I am a software engineer. We are creating an efficiency report of employees.
    we have two reports detail and summary of efficiency of employees.

    while calculating detail report we are picking up each jobcard done by an employee . Following is the example
    formula applied is as follows
    -------------------------------------------------------------------------
    Time units *.60 * Punched minutes for the month / Total Punched minutes
    --------------------------------------------------------------------------

    jobcard nr.| TU |Total punched minutes | Punched minutes for the month| = sold minutes
    JC/134638 400*.60 1004 801 = 191
    (400*.60*801/1004)
    JC/135933 150*.60 117 117 = 90
    (150*.6*117/117) ----
    (281)

    while calculating summary report we are picking up sum of jobcards for each employee. So the above said formula is used on the sum of each component of formula. Example is as follows
    400 1004 801
    150 117 117
    ---- ---- ----
    550 1121 918
    (550*.60*918/1121) =(270)

    Can Any one please explain me why this difference is coming of 11 minutes
    Between 281 and 270 in spite of using the same formula?
  • Nov 28, 2005, 05:25 PM
    CroCivic91
    You are calculating something like this:
    (a_i)*(b_i)*(c_i)/(d_i)
    a_i means it's a number we'll call "a" and give it index "i"

    So, if you have 2 such sets of numbers, you want to add them together. Let's look at the way you do it.

    You say that a_1 * b_1 * c_1 / d_1 + a_2 * b_2 * c_2 / d_2 = (a_1 + a_2) * (b_1 + b_2) * (c_1 + c_2) / (d_1 + d_2)
    That is, however, untrue. Problem is in dividing by d_i.

    Correct formula would be:
    a_1 * b_1 * c_1 / d_1 + a_2 * b_2 * c_2 / d_2 = ( a_1 * b_1 * c_1 * d_2 + a_2 * b_2 * c_2 * d_1 ) / (d_1*d_2)
    Let's try it on your numbers.

    (400*.6*801/1004) + (150*.6*117/117) = 191,47 + 90 = 281,47

    (400*.6*801*117 + 150*.6*117*1004) / (1004*117) = (22492080 + 10572120) / 117468 = 33064200 / 117468 = 281,47
  • Nov 28, 2005, 09:34 PM
    Sulakshana
    Thanks
    Thanks a lot . I appreciate this. I shall definitely try this on our program. Thanks from our team.

    Quote:

    Originally Posted by CroCivic91
    You are calculating something like this:
    (a_i)*(b_i)*(c_i)/(d_i)
    a_i means it's a number we'll call "a" and give it index "i"

    So, if you have 2 such sets of numbers, you want to add them together. Let's look at the way you do it.

    You say that a_1 * b_1 * c_1 / d_1 + a_2 * b_2 * c_2 / d_2 = (a_1 + a_2) * (b_1 + b_2) * (c_1 + c_2) / (d_1 + d_2)
    That is, however, untrue. Problem is in dividing by d_i.

    Correct formula would be:
    a_1 * b_1 * c_1 / d_1 + a_2 * b_2 * c_2 / d_2 = ( a_1 * b_1 * c_1 * d_2 + a_2 * b_2 * c_2 * d_1 ) / (d_1*d_2)
    Let's try it on your numbers.

    (400*.6*801/1004) + (150*.6*117/117) = 191,47 + 90 = 281,47

    (400*.6*801*117 + 150*.6*117*1004) / (*117) = (22492080 + 10572120) / 117468 = 33064200 / 117468 = 281,47

  • Nov 29, 2005, 02:59 AM
    CroCivic91
    You're welcome!

    If you do not manage to produce a formula for a sum of "n" such sets of numbers, let me know and I'll write it on the paper, scan it for you, and stick it here.

  • All times are GMT -7. The time now is 01:20 AM.