|
Question 78938This question is from textbook Algebra I: An Integrated Approach
: How do I create a linear model?
This question is from textbook Algebra I: An Integrated Approach
Answer by mathdoc314(58) (Show Source):
You can put this solution on YOUR website!
Well step 1 is collect some data with one or more independent variables and one or more dependent variables. Then you do the best least squares fit to find the best line or hyperplane to fit the data. That will give you the linear coefficients to express the dependent variables in terms of the independent variables. Sometimes, if your data is very perfect, you will not need to do a least squares fit and every combination of points from your data set will fit the model exactly, and then you can just calculate your slopes and coefficients directly from the data set, like fitting a line to a pair of points. But usually the data is not very perfect so you have to find the 'best fit' using minimum least square error. You will have to look up a reference on how to do that. The wikipedia probably has a decent page on 'least squares' or 'linear model'.
For example say you have data for x, the cooking time of hard boiled chicken eggs of roughly constant size under some standard boiling conditions vs. y, the gooiness of the middle if it is stopped after x minutes of boiling and cracked open. This is expected to be linear in a range. There should be an operational definition of gooiness, so you crack it open and turn it upside down and weigh how much egg yolk goo comes out on a sensitive scale from the chemistry lab, or drop small beads into it and count how many the goo can absorb before they start to bounce off. I dunno. As long as you are consistent with measuring the gooiness.
Then you have a data set something like this
x = 2.0 minutes y = 80.3 gooiness
x = 2.5 minutes y = 75.4 gooiness
x = 3.0 minutes y = 70.2 gooiness
x = 3.5 minutes y = 64.2 gooiness
x = 4.0 minutes y = 59.3 gooiness
I am sure there are better examples and more realistic and useful than this one
If you want a real simple answer you can plot those points on a graph, draw something that looks like the best line through them, find its slope and y-intercept, and then you have the equation for the linear model. The other method for finding the least squares slope involves some matrix multiplication etc. which probably doesn't belong in this forum.
However the linear model probably does not apply between x = 2.0 and x=4.0 since egg cooking is somewhat nonlinear. So the model should be specified to apply only in the given range.
That is a basic outline of how to go about making a linear model. Sorry I can't be more complete here.
|
|
|
| |