+ Reply to Thread
Results 1 to 8 of 8

Three points --> how to build function?

  1. #1
    Registered User
    Join Date
    12-29-2014
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Office
    Posts
    10

    Three points --> how to build function?

    Hi guys,

    I would massivly appreciate your input to the following problem.
    I have the coordinates of three points of a (logarithm) function:

    P1 (1/34)
    P2 (7/173)
    P3 (30/585)

    What I would like to find out: What is the y-value for 365 as an x-value.

    Is there a way to visualize the graph for that function based on those three points?

    Thanks a lot!
    Alex

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Three points --> how to build function?

    Are you sure it's a logarithmic problem?
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Three points --> how to build function?

    This sounds like a regression problem. The first step in a regression problem is to define the fitting equation. When you say this should be logarithmic, are you specifically thinking of something like y=a*ln(x) + b or some other logarithmic function? Whatever your function is, are you expecting to use a standard least squares regression or a regression based on some other objective function?

    If you want a standard least squares regression and your desired function is "linear" (such as y=mx+b or y=mln(x)+b or a polynomial or any other linear or linearizable function), then you can use the LINEST() function to perform the regression: https://support.office.com/en-us/art...rs=en-US&ad=US Enter your y's and x's (and any transformations needed), then enter the LINEST() function to obtain the regression coefficients.

    If you want some other objective function or your desired function is non-linear, then you can use Excel's built in Solver to perform the regression. Enter your data, enter some reasonable guess for the parameters of the function, compute your desired objective function (the function that will be minimized to obtain the regression such as sum((y-yequation)^2)), then call Solver and tell it to set target cell (objective function) to a minimum by changing your parameters.

    I realize that is a quick overview. Let us know in more detail what you are trying to do and exactly what steps you need help with and we'll help as best we can.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    12-29-2014
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Office
    Posts
    10

    Re: Three points --> how to build function?

    Thanks for your help so far!

    Not 100% sure about logarithm; but the graph should look a bit like that.
    To give you a bit of background: I want to calculate the yearly unique website visitors - and only have numbers for daily, weekly and monthly unique visitors.

    The graph should look a bit like that:

    graph.PNG

    Does that help?

  5. #5
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Three points --> how to build function?

    Do you possibly have more points you could supply? Currently, your data set does not seem to follow a normal logarithmic trend, rather a linear (or even power series) trend. We can estimate your data for a y-value of 385, but I am assuming it would have a rather large error associated with it (mainly due to the small sample size of the regression).

  6. #6
    Registered User
    Join Date
    12-29-2014
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Office
    Posts
    10

    Re: Three points --> how to build function?

    The onlu other data point I have is P(0/0). Nur sure if that helps

  7. #7
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Three points --> how to build function?

    So using FORECAST for a linear regression, I received a y-value of 6851.831 for an x-value of 365. Using this for your plot, you can obtain a logarithmic equation of y=1146.7ln(x)-1313.2

    This has an R2=0.7452 (in case you didn't know, the closer to 1.0000 the value is, the more accurate the trend fit).

    You can take a 75% accuracy for what it's worth. Bottom line is if more data is provided, a more precise trend can be created.

    PS: The FORECAST() data is pretty close to the trendline data created by hand. The results were 98.7% close, so hopefully that approach is adequate. I attached a sample workbook with what I did to show you my thought process. A useful guide to creating your own forecasts can also be seen here http://spreadsheetpage.com/index.php...line_formulas/

    Hope this helps!
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-29-2014
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Office
    Posts
    10

    Re: Three points --> how to build function?

    Thanks a lot, mcmahobt

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Vlookup Substring Value and Build String Function
    By Vlad999 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-25-2014, 07:36 AM
  2. Build Buttons in Columns with click function
    By sm9748 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2013, 04:31 PM
  3. [SOLVED] How can I build a Range, use it and remember it in a variable for later in a function?
    By Geek4eye in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2012, 01:49 PM
  4. <REQ> Can anyone help me build a function, please read....
    By Shankley in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-09-2006, 10:15 PM
  5. Can someone help me build a function???
    By Caligurl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2005, 04:55 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1