# Linear Regression illustration

Author:
phewson
This GeoGebra worksheet allows you to control the line of best fit by means of two sliders giving the intercept (c) and the slope (m). The idea is to find a line that gives a "best" fit to the data. The "residuals" are defined as the distance in the y direction between the data and this fitted line. The residuals are denoted by green vectors. The aim is to find a line fit that has the smallest possible sum of squares of these residuals. In order to help you, the squares of the residuals are drawn on the page, and the sum of squares is given in a box. This best fit is defined as the smallest possible sum of the squares of the residuals.
When you think you have found the best fitting line, you can check your answers by clicking the box to display (green dots) the calculated line of best fit.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9418147,"math_prob":0.95481324,"size":880,"snap":"2020-45-2020-50","text_gpt3_token_len":198,"char_repetition_ratio":0.14155251,"word_repetition_ratio":0.024691358,"special_character_ratio":0.21818182,"punctuation_ratio":0.074285716,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9786692,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-28T14:14:29Z\",\"WARC-Record-ID\":\"<urn:uuid:1e5faabb-c6e8-46f9-b107-20014fbba37e>\",\"Content-Length\":\"39805\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b5b33405-f12e-4504-9273-65045e4b5afd>\",\"WARC-Concurrent-To\":\"<urn:uuid:e08d0a8f-962a-4719-88c6-e3098b057a4f>\",\"WARC-IP-Address\":\"13.249.43.99\",\"WARC-Target-URI\":\"https://beta.geogebra.org/m/JDWrTjJP\",\"WARC-Payload-Digest\":\"sha1:25TZEWCQNW4OOD5FRO5WY76GVQA6CB3N\",\"WARC-Block-Digest\":\"sha1:EMGMDHC44RQT254UPVHM3R2RHNRDBLTY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141195656.78_warc_CC-MAIN-20201128125557-20201128155557-00044.warc.gz\"}"}