0

I haven't studied maths since high-school (20 years ago) and would like to find a formula to relate these values:

 x     y      z
-----|------|-------  
   1 | 0.25 | 0.25
   2 | 0.25 | 0.625
   3 | 0.25 | 0.75
   4 | 0.25 | 0.8125
   5 | 0.25 | 0.85

 1.5 | 0.25 | 0.5
  10 | 0.25 | 0.925
   2 | 0.1  | 0.55

The formula would find z from known x and y values.

e.g. if x = 6 and y = 0.25 what is z?

Thanks for any help solving the problem or pointing me in the right direction. I can try to explain the context if that helps, but perhaps it's easier just to work with the numbers.

Gerry Myerson
  • 179,216
  • 2
    There are infinitely many formulas that fit the given numbers but give widely different answers for $x=6$, $y=.25$. You have to know more about what kind of function you are trying to fit, in order to give a useful answer. – Gerry Myerson Jul 30 '18 at 07:20
  • @GerryMyerson thanks for the help. How might I better define the kind of function I am looking for? I can't even find one formula that fits. Visually I understand the problem and could try to describe it in those terms or I can also supply more results from the model I have. I'm looking for the simpliest solution that gives the same results as the model. – Laurence Lord Jul 30 '18 at 07:42
  • OK, here's one way, but it probably doesn't give you what you want. Temporarily ignore that last data point. Then all your data points have the same $y$-value, so you can ignore $y$ and get a polynomial $p(x)$ that fits all the points by using Lagrange interpolation (look it up!). Then you can find a number $c$ such that $p(x)+c(y-.25)$ fits all your points. – Gerry Myerson Jul 30 '18 at 09:36
  • Hi Gerry, thanks for trying me on that. To be honest I don't know what a polynomial is and having tried to read up on Lagrange Interpolation I'm struggling to find anything I can understand... I'll keep trying – Laurence Lord Jul 30 '18 at 17:53
  • @GerryMyerson thanks again. I'm clearer on polynomials now. Still not sure how to go about interpolation. In your example you show c(y – .25) but y is .25 so that will be zero. I'm confused. – Laurence Lord Jul 30 '18 at 19:17
  • That's the point. That term vanishes when $y=.25$, but not for that other point you have, the one with $y=.1$. You adjust $c$ to make the formula fit at that one extra point. But, honestly: if you don't know what a polynomial is, you are several years of study away from being able to tackle the problem you have set yourself, or from being able to understand a serious discussion of it. You may as well ask how to cure cancer, when you don't know what a cell is. – Gerry Myerson Jul 30 '18 at 23:09
  • @GerryMyerson thanks again. The explaination about c(y – .25) makes perfect sense. Perhaps this is out of my league but I have to start somewhere and I'm learning a lot so far. Perhaps I understand a polynomial without being familiar with the terminonolgy. So yes, p(x) still doesn't make sense to me. Are we multiplying x by p? What is p? – Laurence Lord Jul 31 '18 at 07:06
  • $p$ is the name of the polynomial you get by applying Lagrange interpolation. It is a function of the variable $x$. You are not familiar with function notation? This is going to be even harder than I thought. – Gerry Myerson Jul 31 '18 at 07:13
  • @gerry I found a formula that works by visualising the problem and naming components of the formula. Still don't know how to do this another way. $1 =$ size of A-type step relative to overlap of A-type steps = size of B-type step relative to overlap of B-type steps. $x =$ size ratio between A-type and B-type steps. $y =$ relative overlap of A-type steps. $1-y =$ distance between centres of A-type steps. $(1-y)/x =$ distance between centres of B-type steps. $z = (1-(1-y)/x) =$ relative overlap of B-type steps that ensures distance between centres of all B-type and A-type steps is the same. – Laurence Lord Aug 18 '18 at 16:51

1 Answers1

0

Welcome back to maths. I hope the the re-introduction will not be too fearful!

Visualizing 3-dimensional data is very hard.

Whenever possible, try to start with the simplest model possible to describe your situation and build upwards. Thus, as Gerry suggested, given that for all but one data point, the y-value is constant, consider the scenario if you temporarily ignore it and consider this a 2-dimensional question.

In this case, graphing $x$ versus $z$ on graph paper or via Excel should always be your first step.

In my experience as a mathematician and statistician, I always find it useful to mentally think what do I expect the answer to be, before I plug my data into any formulae or models.

Once you do this you will immediately realize how much your point $x=10, z=0.925$ is separated from all your other data points.

The second thing to notice is that if you ignore this point, too, then a line fits the rest of your data quite well. Using something like Excel, with its built-in capabilities of line-of-best-fit, you would get something like $z=0.15x+0.22$. This would give value of $z=1.12$ if $x=6$.

However, you will notice that the if you include that far-right point, the data does not really look like a straight line at all, but rather a curve (maybe a logarithmic graph). In this case you would probably get a $z$ vaue of $\simeq 0.9$ if $x=6$.

This is where you have to balance up two questions:

  1. Based on how I collected my data, would I expect to be a simple linear relationship or a more complex curve? If so, would I expect it to curve upwards or downwards. Other questions like the following may also help: "Do i expect the line-of-best fit to go through the origin?", "Can we have negative $x$ values, and/or negative $z$ values?, "What might I expect for very large $x$?"

  2. How much confidence do I have that the point x=10, which lies much further away than the other points, is correct? Can we obtain more data in between $x=5$ and $x=10$ to strengthen our confidence?

Good luck.