Results 1 to 4 of 4

Thread: [resolved] Easy question (Linear Functions)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    2

    [resolved] Easy question (Linear Functions)

    Hi all,

    Glad I found this forum, it looks great. I've got a small problem which I imagine is pretty easy for you lot by the looks of things. Any help would be greatly appreciated.

    I am trying to come up with a mathematical formula to map the following numbers:

    1 to 4
    2 to 3
    3 to 2
    4 to 1

    Basically we have a value (1-4) as a given response to a feedback question. The problem is I inadvertantly set 1 to be very satisfied and 4 to be very dissatisfied. This means when I average the feeback back scores, good feedback is displayed as 1 out of 4, rather than 4 out of 4. I can't think of an easy calculation to convert then now the table is populated.

    Many thanks for any suggestions.
    Last edited by gphelpyfg; Jul 27th, 2007 at 04:51 AM. Reason: rename thread

  2. #2
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Easy question

    Hi, wellcome to the forum,

    All you have to do is to apply the formula Y = 5 - X to your data, X being any value in the table.

    For instance:

    X = 1; Y = 5 - 1 = 4
    X = 2; Y = 5 - 2 = 3
    X = 3; Y = 5 - 3 = 2
    X = 4; Y = 5 - 4 = 1

    Hope this corresponds to what you are seeking.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  3. #3
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Easy question

    If you wanted to get a little more in-depth on finding functions like this in the future, read on. Otherwise, happily skip this post

    First of all, a mathematical function IS a map from one number to another number. Often, the first number is called X (here if X = 1, then X means very satisfied) while the second number is called f(X) or Y (here if f(X) = Y = 1, then Y means very dissatisfied). Note that X can take on many different values, and Y should have a corresponding values for each value X can take on.

    Now that you've assigned variables, you need to figure out what the right mapping function "f" is. There are lots of different kinds of functions, but one of the simplest is a "linear" function (which is what's used here)--a "linear" function looks like a line when graphed.

    If you graph X vs. Y here you'll see that it becomes a line. From your table, X=1 means Y=4, X=2 means Y=3, X=3 means Y=2, X=4 means Y=1. These correspond to four ordered pairs of the form (X, Y) which are (1, 4), (2, 3), (3, 2), (4, 1). These of course form a line--notice that when you go up 1 in X, you go down 1 in Y, giving a constant slope of -1 (slope is the "rise" of a function [change in vertical distance over some increment] divided by its "run" [change in horizontal distance over some increment]).

    Now you know that the function you're looking for in this case is a linear function, where the slope is -1. Mathematicians love functions so they've thought about them a lot, and it turns out that all linear functions are of the form Y = mX + b for some numbers m and b where m is the slope and b is Y-intercept. In other words, b is whatever value Y takes on when X is zero, or when the line crosses the Y axis (this makes sense; try setting X=0 and you'll notice Y=mX + b -> Y = m*0 + b = b).

    Anywho, we know that m = -1, but we don't know b. However, we can find it using Algebra! Plug in a data point that you do know and the theorem that 1 unknown can be solved from any equation will apply, since X, Y, and m will all be known. Let's use X=1, Y=4.

    Y=mX + b becomes
    4=(-1)(1) + b or
    5=b

    So, Y = -X + 5 or Y = 5 - X like Rassis said in the first place.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    2

    Re: Easy question

    Ah, its all so simple. Thanks Rassis.

    Jemidiah, I did study your response and I must say its coming back to me. I don't think I've looked at Linear functions since college. Maybe I should have listened more. It was a great explanation by the way. Perhaps a mod should rename the thread to Linear functions, so others can benefit.

    Thanks again.

    EDIT - I've renamed the thread myself

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width