go on to assume that the fitted curve is the description of the real situationand the raw data merely an indication of experimental error this can be dangerous recall that we started with theory that there should be linear relationship between the and valuesnot cubic one let' see what happens if we use our cubic fit to predict where the point corresponding to kg would lie the result is shown in the plot on the left now the cubic fit doesn' look so good in particularit seems highly unlikely that by hanging large weight on the spring we can cause the spring to rise above (the -value is negativethe bar from which it is suspended what we have is an example of overfitting overfitting typically occurs when model is excessively complexe it has too many parameters relative to the amount of data when this happensthe fit can capture noise in the data rather than meaningful relationships model that has been overfit usually has poor predictive poweras seen in this example finger exercisemodify the code in figure so that it produces the above plot let' go back to the linear fit for the momentforget the line and study the raw data does anything about it seem oddif we were to fit line to the rightmost six points it would be nearly parallel to the -axis this seems to contradict hooke' law-until we recall that hooke' law holds only up to some elastic limit perhaps that limit is reached for this spring somewhere around (approximately kglet' see what happens if we eliminate the last six points by replacing the second and third lines of fitdata by distances pylab array(distances[:- ]masses pylab array(masses[:- ]eliminating those points certainly makes differencee has dropped dramatically and the linear and cubic fits are almost indistinguishable but how do we know which of the two linear fits is better representation of how our spring performs up to its elastic limitwe could use some statistical test to