Hey there! Sign in to join this conversationNew here? Join for free

Deriving a z=y+x formula -STATISTICS Watch

Announcements
    • Wiki Support Team
    • Thread Starter
    Offline

    20
    ReputationRep:
    How would I go about deriving a function of x and y (multivariate calculus) from a list of values for z, x and y. I'd like to be able to plot the graph (a surface on 3D space rather than a curve). I don't want to use a computer.

    E.g
    Z 1, 2, 3, 4...
    X 0.5, 1.0, 1.5, 2.0...
    Y 3, 9, 81, 6561...

    Any help is much appreciated. Rep (and showerings of praise) available for the mathematics wizards amongst you haha
    • Wiki Support Team
    • Thread Starter
    Offline

    20
    ReputationRep:
    Any ideas?


    Posted from TSR Mobile
    Offline

    15
    ReputationRep:
    I am trying hard to understand the problem but I am confused as to what exactly you are trying to do.
    • Wiki Support Team
    • Thread Starter
    Offline

    20
    ReputationRep:
    (Original post by TeeEm)
    I am trying hard to understand the problem but I am confused as to what exactly you are trying to do.
    Create a formula that defines the relationship (or close enough) between z, x and y so one could predict other (z,x,y) values. Just like if I had a list of x values and y values and modelled a curve - just with z values as well.


    Posted from TSR Mobile
    • TSR Support Team
    • Very Important Poster
    • Reporter Team
    • Welcome Squad
    Offline

    19
    ReputationRep:
    (Original post by RayApparently)
    How would I go about deriving a function of x and y (multivariate calculus) from a list of values for z, x and y. I'd like to be able to plot the graph (a surface on 3D space rather than a curve). I don't want to use a computer.

    E.g
    Z 1, 2, 3, 4...
    X 0.5, 1.0, 1.5, 2.0...
    Y 3, 9, 81, 6561...

    Any help is much appreciated. Rep (and showerings of praise) available for the mathematics wizards amongst you haha
    Is it linear?
    If so, you could say that \emph{a}z+\emph{b}x+\emph{c}y=k

    And then substitute your xyz values in to get simultaneous equations to work out a, b and c and then k.
    Offline

    13
    ReputationRep:
    (Original post by RayApparently)
    Create a formula that defines the relationship (or close enough) between z, x and y so one could predict other (z,x,y) values. Just like if I had a list of x values and y values and modelled a curve - just with z values as well.
    This is one of those questions where the devil is in the detail, so more information about what exactly you are trying to achieve will be very helpful in answering your question. So let me list a few of the possibilities:

    1) If there is an exact linear relationship between z and (x,y), something like z = a x + b y then finding the values of a and b is a straightforward bit of equation solving.

    2) If the relationship between z and (x,y) is linear, but involves the addition of random noise to z, something like z_i = a x_i + b y_i + \epsilon_i where \epsilon_i is normal random noise, then the solution involves minimizing the least squares error, as one does in linear regression.

    3) If the relationship between z and (x,y) is non-linear, then it really helps if you know beforehand what the likely form of the relationship is. Solving exact non-linear equations begins to get tricky, but if you've got a random noise component, then you can use extended techniques from linear regression as in (2).

    4) If the relationship between z and (x,y) is non-linear, and you don't know beforehand what the form of the relationship should be, then you are into the realms of fitting the solution surface with things called splines.

    So, let us know a little bit more about the problem and what you are trying to achieve and we'll do our best to help!

    I note also that you wish to avoid using a computer...that will be a challenge for some of the situations above.
    Offline

    17
    ReputationRep:
    This is basicaly a nonparametric regression problem. You can use whatever technique for nonparametric regression that you like - support vector machines, CART, density estimation, whatever. Statistical programming languages like R/Matlab have built in packages that can fit most of these.

    If you have R installed then try

    install.packages('e1071')
    library(e1071)
    z <- #your Z
    y <- #your Y
    x <- #your X
    fit <- svm(z~x+y, kernel="radial")

    newx <- #the new x values to use for predicting
    newy <- #the new y values to use for predicting
    predict(fit,newx,newy)

    that will give you a model which should be at least decent. To make it better, you would have to learn quite a lot more about statistics/machine learning.
    • Wiki Support Team
    • Thread Starter
    Offline

    20
    ReputationRep:
    (Original post by Kvothe the arcane)
    Is it linear?
    If so, you could say that \emph{a}z+\emph{b}x+\emph{c}y=k

    And then substitute your xyz values in to get simultaneous equations to work out a, b and c and then k.
    I think there's a linear relationship between the z and x, an exponential relationship between z and y and the relationship between x an y is unknown (probably polynomial). The numbers are from RL data not some or existing formula so I'm not looking for a perfect fit, rather a model that roughly fits. Thanks for your response, appreciate it.
    • Wiki Support Team
    • Thread Starter
    Offline

    20
    ReputationRep:
    (Original post by Gregorius)
    This is one of those questions where the devil is in the detail, so more information about what exactly you are trying to achieve will be very helpful in answering your question. So let me list a few of the possibilities:

    1) If there is an exact linear relationship between z and (x,y), something like z = a x + b y then finding the values of a and b is a straightforward bit of equation solving.

    2) If the relationship between z and (x,y) is linear, but involves the addition of random noise to z, something like z_i = a x_i + b y_i + \epsilon_i where \epsilon_i is normal random noise, then the solution involves minimizing the least squares error, as one does in linear regression.

    3) If the relationship between z and (x,y) is non-linear, then it really helps if you know beforehand what the likely form of the relationship is. Solving exact non-linear equations begins to get tricky, but if you've got a random noise component, then you can use extended techniques from linear regression as in (2).

    4) If the relationship between z and (x,y) is non-linear, and you don't know beforehand what the form of the relationship should be, then you are into the realms of fitting the solution surface with things called splines.

    So, let us know a little bit more about the problem and what you are trying to achieve and we'll do our best to help!

    I note also that you wish to avoid using a computer...that will be a challenge for some of the situations above.
    Interesting to look at the options. Basically I've got three lists of values (from nature so its a modelling problem - an equation won't fit exactly - or if there is one its beyond me). I know that there's an exponential relationship between y and x and a linear relationship between x and z. I did some rearranging and worked out there's also going to be an exponential relationship between y and z. I want to get one formula for x,y,z but don't know how to go about it. I think it has something to do with partial integrals but...
    • Wiki Support Team
    • Thread Starter
    Offline

    20
    ReputationRep:
    (Original post by poohat)
    This is basicaly a nonparametric regression problem. You can use whatever technique for nonparametric regression that you like - support vector machines, CART, density estimation, whatever. Statistical programming languages like R/Matlab have built in packages that can fit most of these.

    If you have R installed then try

    install.packages('e1071'
    library(e1071)
    z <- #your Z
    y <- #your Y
    x <- #your X
    fit <- svm(z~x+y, kernel="radial"

    newx <- #the new x values to use for predicting
    newy <- #the new y values to use for predicting
    predict(fit,newx,newy)

    that will give you a model which should be at least decent. To make it better, you would have to learn quite a lot more about statistics/machine learning.
    Interesting, but I want to use as little technological assistance as possible. It doesn't matter if there's a few problems with the model.
    Offline

    13
    ReputationRep:
    (Original post by RayApparently)
    Interesting to look at the options. Basically I've got three lists of values (from nature so its a modelling problem - an equation won't fit exactly - or if there is one its beyond me). I know that there's an exponential relationship between y and x and a linear relationship between x and z. I did some rearranging and worked out there's also going to be an exponential relationship between y and z. I want to get one formula for x,y,z but don't know how to go about it. I think it has something to do with partial integrals but...
    If you're looking to avoid using a computer for this problem, then the easiest approach is probably going to be a least squares fit to a predefined functional form z = f(x ,y).

    If there is an unconditional linear relationship between x and z, then we have

    \displaystyle z = c x + d

    If there is an unconditional exponential relationship between y and x, then we can write this as a log-linear relationship

    \displaystyle \log y = a + b x

    Both of these equations can be solved using linear regression (i.e. least squares).

    However, notice the use of the word unconditional in the above. I've assumed that the values of a, b, c, d are constants. It might be the case that (for example) c and d are themselves functions of y

    \displaystyle z = c(y) x + d(y)

    That means that z still depends linearly on y, but the magnitude of the relationship varies with y. If this happens, then the results that you will get from the two regression equations above will give you inconsistent results.

    So what I'm saying is (the tl;dr version) we need more information about the data before we can give you definitive advice. Are you able to post an excerpt from it? I'm quite happy to have a look at it.
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Break up or unrequited love?
    Useful resources

    Make your revision easier

    Maths

    Maths Forum posting guidelines

    Not sure where to post? Read the updated guidelines here

    Equations

    How to use LaTex

    Writing equations the easy way

    Student revising

    Study habits of A* students

    Top tips from students who have already aced their exams

    Study Planner

    Create your own Study Planner

    Never miss a deadline again

    Polling station sign

    Thinking about a maths degree?

    Chat with other maths applicants

    Can you help? Study help unanswered threads

    Groups associated with this forum:

    View associated groups
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.