How do you change a linear function based on changes in the real world?
can you be more specific?
im not exactly sure how to be more specific. Sorry
you mean, you have real life data and want to ajust a linear function that best fits this data?
i believe so
there are some method to do this, there is Linear Regression, Least Square Fitting
ok. may you explain what those are please
you want to ajust a line in the form \(y = ax + b\) using the set of data \( (x_i, y_i) \) where \( i = 0, 1,2,...,N \). \(N\) is the amount of real life data you have
So what we need to do is find \(a\) and \(b\)
My favorite method is linear regression
From calculus, you can find that: \[\large a = \frac{\sum_{i=0}^{N} x_iy_i \space -\frac{1}{N}\sum_{i=0}^{N} x_i \sum_{i=0}^{N} y_i}{\sum_{i=0}^{N} x_i^2 \space -(\sum_{i=0}^{N} x_i)^2} \]
From calculus, you can find that: \[\large b = \frac{1}{N}\sum_{i=0}^{N}y_i \space -a\frac{1}{N}\sum_{i=0}^{N}x_i\]
if you want to know more about the process involved, go to http://mathworld.wolfram.com/LeastSquaresFitting.html
Join our real-time social learning platform and learn together with your friends!