# What preposition to use when fitting data?

Do we fit data with, by, or as a linear function?

-

None of those: we fit data to a function. See the usage throughout Wolfram Alpha, for example.

-
I thought of that one as well; what stopped me from including this is that it seemed a bit illogical to me in the sense that fitting data to a function sounds like I'm actually altering the data to fit better. –  Lev Levitsky Aug 24 '12 at 20:22
@LevLevitsky Ah, I see what you are saying; but native speakers would not interpret it that way, and the language is quite standardized. We say "the curve fits the data" and "we fit data to the curve". –  Mark Beadles Aug 24 '12 at 20:24
I see, thanks for [the?] clarification :) –  Lev Levitsky Aug 24 '12 at 20:27

I would say you fit a function or model to the data, rather than the other way around. Or you find a model that fits the data.

-
Very nice answer! It is grammatically and contextually correct. And I actually smiled after reading the second sentence. –  Ellie Kesselman Aug 25 '12 at 9:58

It's kind of weird for me to say "fit data to a function". I don't think there is a big difference either way, but I prefer "fit a function to the data" and I think this latter way is the form I've always heard or read.

I think of it like how a tailor "fits" a dress or suite to a person's body, where the measurements are the data and the clothing piece is the function.

-
–  user1928 Aug 25 '12 at 2:43
@JenniferDylan Can you post a cross-reference to this question on mathSE, thanks. –  Kris Aug 25 '12 at 8:56
@Kris it's linked here. –  user1928 Aug 25 '12 at 14:22

Actually, you don't do anything to data, which is the point to note.

You could say 'the data obeys/ conforms to/ or even fits, a (linear) function.'

It's important to note the difference between the inherent nature of the data and actions performed on the data.

-