# Thread: Make equation from data set

1. ## Make equation from data set

Greetings math-people!

(I was not sure where to post this, hope it is not the wrong sub-forum)

I have a data-set and I am trying to make an equation out of it. Specifically, I have a distance-sensor and have measured readings at different distances. (Below is my data set.) The reading is about halved when the distance is doubled. What sort of equation does this correspond to? My stomach feeling says the answer is simple, but my creativity is a bit low at the time...

Thanks a lot for helping me out!

25cm::205
50cm::105
75cm::73
100cm::53
125cm::43
150cm::36
175cm::29
200cm::26

PS: I am aware that the sensor readings are a bit crappy. I made the sensor myself from two laser beams and a camera. The readings are camera image pixels between the laser beams.

2. ## Re: Make equation from data set

Have you tried plotting the data on a scatterplot to at least get an idea of what function might be best for the data?

3. ## Re: Make equation from data set

Yes. As I said, the reading is about halved when the distance is doubled. So if distance is "x" and reading is "y": y converges towards infinity when x goes towards zero, and towards zero when x goes towards infinity. In between these extremes, the scatterplot would look like a curve

EDIT: I plotted it at wolfram alpha:
EDIT2: link did not work. but you can see it by going to Wolfram|Alpha: Computational Knowledge Engine and typing in
{25, 205},{50, 105},{75, 73},{100, 53},{125, 43},{150, 36},{175, 29},{200, 26}

4. ## Re: Make equation from data set

And I forgot to thank you for the quick reply! thanks!

5. ## Re: Make equation from data set

What tools have you for this project? Excel and a quick Power Series Trendline might be good.

6. ## Re: Make equation from data set

Thanks. I will try it in Excel. I also have matlab available.

7. ## Re: Make equation from data set

Wow. That worked really well. Excel came up with 5173,6X^-0,9986. Fits my data perfectly

8. ## Re: Make equation from data set

This is what I get using a Power Regression on my CAS...

9. ## Re: Make equation from data set

And look at thst lovely exponent. This is very consistent with doubling d and halving r. Intuition is good, today.