The general term for inferring a relationship between two variables based only one a number of observations is regression. For the example you listed, it can be expressed as a line equation (i.e. y = a*x + b). Linear regressions are quite simple to calculate. See https://en.wikipedia.org/wiki/Simple_linear_regression
For relationships that cannot be expressed in that format, you can try using non-linear regression. The algorithms for such regressions are approximate and not always guaranteed to find an optimal solution. Nevertheless, they can be (and are) used effectively in virtually all fields of science and engineering. In general, though, you'll need to have an idea of the functional form (and perhaps some guesses at the approximate constants) to generate high quality fits.