How can I create an equation for a pattern?

811 Views Asked by At

How can I generally create an equation from a pattern?

Take for example this pattern:

{X = 15, Y = 0}, {X = 16, Y = 1}, {X = 16, Y = 2}, {X = 17, Y = 3}, {X = 17, Y = 4}


This pattern could be resolved to:

X = 15 + (Y / 2)


I tried WolframAlpha but couldn't find any widget that helps me do this. Is there an easy way to create an equation from a pattern?

1

There are 1 best solutions below

1
On BEST ANSWER

A manual way is to use Excel.

Enter the data as table. Convert the table data into a graph chart.

For linear cases, add a linear trend line. Excel will also supply the formula for the trend line:

enter image description here

Excel offers a range of trend lines: exponential, linear, logarithmic, polynomial, power, moving average.

In your example, the same X values appear for more than one Y value. Therefore, Y rather than X should be selected as independent variable. But this may be different for other patterns.