nowcontrast that to the overfitted data in the graph at the rightwhere we've kind of gone out of our way to fit the observations the line has high variancebut low biasbecause each individual point is pretty close to where it should be sothis is an example of where we traded off variance for bias at the end of the dayyou're not out to just reduce bias or just reduce varianceyou want to reduce error that' what really mattersand it turns out you can express error as function of bias and variancelooking at thiserror is equal to bias squared plus variance sothese things both contribute to the overall errorwith bias actually contributing more but keep in mindit' error you really want to minimizenot the bias or the variance specificallyand that an overly complex model will probably end up having high variance and low biaswhereas too simple model will have low variance and high bias howeverthey could both end up having similar error terms at the end of the day you just have to find the right happy medium of these two things when you're trying to fit your data we'll talk about some more principled ways of actually avoiding overfitting in our forthcoming sections butit' just the concept of bias and variance that want to get acrossbecause people do talk about it and you're going to be expected to know what means now let' tie that back to some earlier concepts in this book for examplein -nearest neighbors if we increase the value of kwe start to spread out our neighborhood that were averaging across to larger area that has the effect of decreasing variance because we're kind of smoothing things out over larger spacebut it might increase our bias because we'll be picking up larger population that may be less and less relevant to the point we started from by smoothing out knn over larger number of neighborswe can decrease the variance because we're smoothing things out over more values butwe might be introducing bias because we're introducing more and more points that are less than less related to the point we started with decision trees is another example we know that single decision tree is prone to overfittingso that might imply that it has high variance butrandom forests seek to trade off some of that variance for bias reductionand it does that by having multiple trees that are randomly variant and averages all their solutions together it' like when we average things out by increasing in knnwe can average out the results of decision tree by using more than one decision tree using random forests similar idea