{"id":814,"date":"2025-07-15T19:38:08","date_gmt":"2025-07-15T19:38:08","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/precalculus\/?post_type=chapter&#038;p=814"},"modified":"2026-04-01T08:38:04","modified_gmt":"2026-04-01T08:38:04","slug":"linear-models-learn-it-4","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/precalculus\/chapter\/linear-models-learn-it-4\/","title":{"raw":"Linear Models: Learn It 4","rendered":"Linear Models: Learn It 4"},"content":{"raw":"<h2>Finding the Line of Best Fit<\/h2>\r\nOnce we recognize a need for a linear function to model that data, the natural follow-up question is \u201cwhat is that linear function?\u201d\r\n\r\nOne way to approximate our linear function is to sketch the line that seems to best fit the data. Then we can extend the line until we can verify the [latex]y[\/latex]-intercept. We can approximate the slope of the line by extending it until we can estimate the [latex]\\dfrac{\\text{rise}}{\\text{run}}[\/latex].\r\n\r\n<section class=\"textbox example\">The table below shows the number of cricket chirps in [latex]15[\/latex] seconds, for several different air temperatures, in degrees Fahrenheit.[footnote]Selected data from http:\/\/classic.globe.gov\/fsl\/scientistsblog\/2007\/10\/. Retrieved Aug 3, 2010.[\/footnote]\r\n<table summary=\"Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).\"><colgroup> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/><\/colgroup>\r\n<tbody>\r\n<tr>\r\n<td><strong>Chirps<\/strong><\/td>\r\n<td>[latex]44[\/latex]<\/td>\r\n<td>[latex]35[\/latex]<\/td>\r\n<td>[latex]20.4[\/latex]<\/td>\r\n<td>[latex]33[\/latex]<\/td>\r\n<td>[latex]31[\/latex]<\/td>\r\n<td>[latex]35[\/latex]<\/td>\r\n<td>[latex]18.5[\/latex]<\/td>\r\n<td>[latex]37[\/latex]<\/td>\r\n<td>[latex]26[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>[latex]80.5[\/latex]<\/td>\r\n<td>[latex]70.5[\/latex]<\/td>\r\n<td>[latex]57[\/latex]<\/td>\r\n<td>[latex]66[\/latex]<\/td>\r\n<td>[latex]68[\/latex]<\/td>\r\n<td>[latex]72[\/latex]<\/td>\r\n<td>[latex]52[\/latex]<\/td>\r\n<td>[latex]73.5[\/latex]<\/td>\r\n<td>[latex]53[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<img class=\"alignright wp-image-4943\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-300x261.png\" alt=\"A scatterplot showing chirps per minute on the x-axis and temperature in degrees Fahrenheit on the y-axis. The data points form an upward trend, indicating that higher chirp counts are associated with higher temperatures. A straight regression line runs diagonally upward through the points, reinforcing the positive correlation.\" width=\"398\" height=\"346\" \/>Plotting this data <span style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\">suggests that there may be a positive linear trend, though certainly not perfectly so. We can see from the trend in the data that the number of chirps increases as the temperature increases.<\/span>\r\n\r\nIn the plotted data, we have sketched a line that seems to best fit the data.\r\n\r\nWhat is the estimated linear function?\r\n\r\n[reveal-answer q=\"674835\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"674835\"]Note: We can only try to estimate the slope of this line by observing its steepness and direction.\r\n\r\nSteps to Estimate the Slope:\r\n<ol>\r\n \t<li>Pick two points on the line: Choose points that are easy to read. For example, the first point [latex](18.5, 52)[\/latex] and the last point [latex](44, 80.5)[\/latex] are close to the fitted line.<\/li>\r\n \t<li>Calculate the rise and run, and estimate the slope:<\/li>\r\n<\/ol>\r\n<center>[latex]\\begin{align*} \\text{Rise} &amp;= 80.5 - 52 = 28.5 \\\\ \\text{Run} &amp;= 44 - 18.5 = 25.5 \\\\ \\text{Slope} &amp;= \\frac{\\text{Rise}}{\\text{Run}} = \\frac{28.5}{25.5} \\approx 1.12 \\end{align*}[\/latex]<\/center>By using the points, we estimated that slope [latex]\\approx 1.12[\/latex].\r\n\r\nTo find the equation of the line using the last point [latex](44, 80.5)[\/latex], and the slope [latex]\\approx 1.12[\/latex] we previously estimated, we can use the point-slope form of the equation of a line.\r\n\r\n<center>[latex]\\begin{align*} y - y_1 = m(x - x_1) \\\\ y - 80.5 &amp;= 1.12(x - 44) \\\\ y - 80.5 &amp;= 1.12x - 1.12 \\cdot 44 \\\\ y - 80.5 &amp;= 1.12x - 49.28 \\\\ y &amp;= 1.12x - 49.28 + 80.5 \\\\ y &amp;= 1.12x + 31.22 \\end{align*}[\/latex]<\/center>So, the estimated linear function is: [latex]y = 1.12x + 31.22[\/latex].\r\n\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox tryIt\">[ohm_question hide_question_numbers=1]318767[\/ohm_question]<\/section><section>\r\n<h2>Finding the Line of Best Fit Using a Graphing Utility<\/h2>\r\nWhile eyeballing a line works reasonably well, there are statistical techniques for fitting a line to data that minimize the differences between the line and data values.[footnote]Technically, the method minimizes the sum of the squared differences in the vertical direction between the line and the data values.[\/footnote] One such technique is called <strong>least squares regression<\/strong> and can be computed by many graphing calculators as well as both spreadsheet and statistical software. Least squares regression is also called linear regression, and we can use an online graphing calculator to perform linear regressions.\r\n\r\n<section class=\"textbox example\" aria-label=\"Example\">Find the least squares regression line using the cricket-chirp data in the table below.Use an online graphing calculator.\r\n<table summary=\"Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).\"><colgroup> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/><\/colgroup>\r\n<tbody>\r\n<tr>\r\n<td><strong>Chirps<\/strong><\/td>\r\n<td>[latex]44[\/latex]<\/td>\r\n<td>[latex]35[\/latex]<\/td>\r\n<td>[latex]20.4[\/latex]<\/td>\r\n<td>[latex]33[\/latex]<\/td>\r\n<td>[latex]31[\/latex]<\/td>\r\n<td>[latex]35[\/latex]<\/td>\r\n<td>[latex]18.5[\/latex]<\/td>\r\n<td>[latex]37[\/latex]<\/td>\r\n<td>[latex]26[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>[latex]80.5[\/latex]<\/td>\r\n<td>[latex]70.5[\/latex]<\/td>\r\n<td>[latex]57[\/latex]<\/td>\r\n<td>[latex]66[\/latex]<\/td>\r\n<td>[latex]68[\/latex]<\/td>\r\n<td>[latex]72[\/latex]<\/td>\r\n<td>[latex]52[\/latex]<\/td>\r\n<td>[latex]73.5[\/latex]<\/td>\r\n<td>[latex]53[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[reveal-answer q=\"374127\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"374127\"]\r\n\r\nThe following instructions are for Desmos, and other online graphing tools may be slightly different.\r\n<ol>\r\n \t<li>Click the plus button (add item) in the upper left corner and select table.<\/li>\r\n \t<li>Enter chirps data in the [latex]x_1[\/latex] column.<\/li>\r\n \t<li>Enter temperature data in the [latex]y_1[\/latex] column.\r\n<table summary=\"Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).\"><colgroup> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/><\/colgroup>\r\n<tbody>\r\n<tr>\r\n<td><strong>Chirps<\/strong><\/td>\r\n<td>[latex]44[\/latex]<\/td>\r\n<td>[latex]35[\/latex]<\/td>\r\n<td>[latex]20.4[\/latex]<\/td>\r\n<td>[latex]33[\/latex]<\/td>\r\n<td>[latex]31[\/latex]<\/td>\r\n<td>[latex]35[\/latex]<\/td>\r\n<td>[latex]18.5[\/latex]<\/td>\r\n<td>[latex]37[\/latex]<\/td>\r\n<td>[latex]26[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>[latex]80.5[\/latex]<\/td>\r\n<td>[latex]70.5[\/latex]<\/td>\r\n<td>[latex]57[\/latex]<\/td>\r\n<td>[latex]66[\/latex]<\/td>\r\n<td>[latex]68[\/latex]<\/td>\r\n<td>[latex]72[\/latex]<\/td>\r\n<td>[latex]52[\/latex]<\/td>\r\n<td>[latex]73.5[\/latex]<\/td>\r\n<td>[latex]53[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/li>\r\n \t<li>If you can't see the points on the grid, use the plus and minus buttons in the upper right hand corner to zoom in or out on the grid, or click on the wrench and change the upper bound of [latex]x_1[\/latex] to [latex]60[\/latex] and [latex]y_1[\/latex] to [latex]100[\/latex]<\/li>\r\n \t<li>In the empty cell below the table you created, enter the expression [latex]y_1\u223cmx_1+b[\/latex]<\/li>\r\n \t<li>You can add labels to your graph by clicking on the wrench in the upper right hand corner and typing them into the cells that say \"add a label\"<\/li>\r\n<\/ol>\r\nHere is an example of how your graph may look:\r\n\r\n<img class=\"alignnone size-full wp-image-6803\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3794\/2016\/10\/09215809\/Screen-Shot-2019-07-09-at-2.56.40-PM.png\" alt=\"\" width=\"1420\" height=\"1002\" \/>\r\n\r\n<strong>Analysis of the Solution<\/strong>\r\n\r\nNotice that this line is quite similar to the equation we \"eyeballed\" but should fit the data better. Notice also that using this equation would change our prediction for the temperature when hearing [latex]30[\/latex] chirps in [latex]15[\/latex] seconds from [latex]66[\/latex] degrees to:\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}T\\left(30\\right)=30.281+1.143\\left(30\\right)\\hfill \\\\ \\text{}T\\left(30\\right)=64.571\\hfill \\\\ \\text{}T\\left(30\\right)\\approx 64.6\\text{ degrees}\\hfill \\end{array}[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/section><section class=\"textbox interact\">Steps to obtain the equation of the regression line and equation:\r\n[latex]\\\\[\/latex]\r\n<strong>Step 1: <\/strong>Under <strong>\"Enter Data\",<\/strong> select the\u00a0<strong>\u201cEnter Own\u201d<\/strong>.\r\n<strong>Step 2: <\/strong>Change the name of the [latex]x[\/latex]- and [latex]y[\/latex]-variable accordingly.\r\n<strong>Step 3: <\/strong>Enter the input ([latex]x[\/latex]Var) and output ([latex]y[\/latex]Var) accordingly.\r\n<strong>Step 4: \"Submit<\/strong> <strong>Data\"<\/strong> and you will see the scatterplot on the right side of the statistical tool.\r\n<strong style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\">Step 5:<\/strong><span style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\"> Under Plot Options: click on <\/span><strong style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\">\"Regression Line\"<\/strong><span style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\"> and you will see that the statistical tool will draw the line that best fit your data in your scatterplot. Right above the scatterplot, you will also see the equation of that line.<\/span><iframe src=\"https:\/\/lumen-learning.shinyapps.io\/linear_regression\/\" width=\"100%\" height=\"1100\" frameborder=\"no\" data-mce-fragment=\"1\"><\/iframe>\r\n[<a href=\"https:\/\/lumen-learning.shinyapps.io\/linear_regression\/\" target=\"_blank\" rel=\"noopener\">Trouble viewing? Click to open in a new tab.<\/a>]<\/section><section class=\"textbox example\">Find the equation of the line that best fit the data in the table below using the statistical tool. Is it the same or different as the one you found previously? If it is different, why do you think it is different?\r\n<table summary=\"Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).\"><colgroup> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/> <col \/><\/colgroup>\r\n<tbody>\r\n<tr>\r\n<td><strong>Chirps<\/strong><\/td>\r\n<td>[latex]44[\/latex]<\/td>\r\n<td>[latex]35[\/latex]<\/td>\r\n<td>[latex]20.4[\/latex]<\/td>\r\n<td>[latex]33[\/latex]<\/td>\r\n<td>[latex]31[\/latex]<\/td>\r\n<td>[latex]35[\/latex]<\/td>\r\n<td>[latex]18.5[\/latex]<\/td>\r\n<td>[latex]37[\/latex]<\/td>\r\n<td>[latex]26[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>[latex]80.5[\/latex]<\/td>\r\n<td>[latex]70.5[\/latex]<\/td>\r\n<td>[latex]57[\/latex]<\/td>\r\n<td>[latex]66[\/latex]<\/td>\r\n<td>[latex]68[\/latex]<\/td>\r\n<td>[latex]72[\/latex]<\/td>\r\n<td>[latex]52[\/latex]<\/td>\r\n<td>[latex]73.5[\/latex]<\/td>\r\n<td>[latex]53[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[reveal-answer q=\"674036\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"674036\"]<img class=\"wp-image-4943 aligncenter\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-300x261.png\" alt=\"A scatterplot showing chirps per minute on the x-axis and temperature in degrees Fahrenheit on the y-axis. The data points form an upward trend, indicating that higher chirp counts are associated with higher temperatures. A straight regression line runs diagonally upward through the points, reinforcing the positive correlation.\" width=\"398\" height=\"346\" \/>\r\n\r\nAccording to the statistical tool, the regression line equation is\r\n<p style=\"text-align: center;\"><strong>[latex]y = 30.3 + 1.14x[\/latex]<\/strong><\/p>\r\n<strong>Is it the same as the one we found previously? <\/strong>No, the two equations are slightly different.\r\n\r\n<strong>Why is it different?<\/strong>\r\n\r\nThere are a few reasons why the regression line equation from the statistical tool might be different from the one we calculated manually:\r\n<ol>\r\n \t<li><strong>Precision<\/strong>: The statistical tool uses precise calculations to determine the best fit line.<\/li>\r\n \t<li><strong>Data Points Used<\/strong>: The statistical tool considers all the data points simultaneously to find the line of best fit, whereas our manual calculation used only two specific points.<\/li>\r\n \t<li><strong>Method of Calculation<\/strong>: The statistical tool likely uses the least squares method, a standard approach for regression analysis that ensures the best possible fit. Our manual calculation was a straightforward approach to estimate the slope and intercept, which might not be as accurate.<\/li>\r\n<\/ol>\r\n[\/hidden-answer]\r\n\r\n<\/section><\/section>","rendered":"<h2>Finding the Line of Best Fit<\/h2>\n<p>Once we recognize a need for a linear function to model that data, the natural follow-up question is \u201cwhat is that linear function?\u201d<\/p>\n<p>One way to approximate our linear function is to sketch the line that seems to best fit the data. Then we can extend the line until we can verify the [latex]y[\/latex]-intercept. We can approximate the slope of the line by extending it until we can estimate the [latex]\\dfrac{\\text{rise}}{\\text{run}}[\/latex].<\/p>\n<section class=\"textbox example\">The table below shows the number of cricket chirps in [latex]15[\/latex] seconds, for several different air temperatures, in degrees Fahrenheit.<a class=\"footnote\" title=\"Selected data from http:\/\/classic.globe.gov\/fsl\/scientistsblog\/2007\/10\/. Retrieved Aug 3, 2010.\" id=\"return-footnote-814-1\" href=\"#footnote-814-1\" aria-label=\"Footnote 1\"><sup class=\"footnote\">[1]<\/sup><\/a><\/p>\n<table summary=\"Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).\">\n<colgroup>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td><strong>Chirps<\/strong><\/td>\n<td>[latex]44[\/latex]<\/td>\n<td>[latex]35[\/latex]<\/td>\n<td>[latex]20.4[\/latex]<\/td>\n<td>[latex]33[\/latex]<\/td>\n<td>[latex]31[\/latex]<\/td>\n<td>[latex]35[\/latex]<\/td>\n<td>[latex]18.5[\/latex]<\/td>\n<td>[latex]37[\/latex]<\/td>\n<td>[latex]26[\/latex]<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>[latex]80.5[\/latex]<\/td>\n<td>[latex]70.5[\/latex]<\/td>\n<td>[latex]57[\/latex]<\/td>\n<td>[latex]66[\/latex]<\/td>\n<td>[latex]68[\/latex]<\/td>\n<td>[latex]72[\/latex]<\/td>\n<td>[latex]52[\/latex]<\/td>\n<td>[latex]73.5[\/latex]<\/td>\n<td>[latex]53[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-4943\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-300x261.png\" alt=\"A scatterplot showing chirps per minute on the x-axis and temperature in degrees Fahrenheit on the y-axis. The data points form an upward trend, indicating that higher chirp counts are associated with higher temperatures. A straight regression line runs diagonally upward through the points, reinforcing the positive correlation.\" width=\"398\" height=\"346\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-300x261.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-65x56.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-225x195.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-350x304.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_.png 480w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/>Plotting this data <span style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\">suggests that there may be a positive linear trend, though certainly not perfectly so. We can see from the trend in the data that the number of chirps increases as the temperature increases.<\/span><\/p>\n<p>In the plotted data, we have sketched a line that seems to best fit the data.<\/p>\n<p>What is the estimated linear function?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q674835\">Show Answer<\/button><\/p>\n<div id=\"q674835\" class=\"hidden-answer\" style=\"display: none\">Note: We can only try to estimate the slope of this line by observing its steepness and direction.<\/p>\n<p>Steps to Estimate the Slope:<\/p>\n<ol>\n<li>Pick two points on the line: Choose points that are easy to read. For example, the first point [latex](18.5, 52)[\/latex] and the last point [latex](44, 80.5)[\/latex] are close to the fitted line.<\/li>\n<li>Calculate the rise and run, and estimate the slope:<\/li>\n<\/ol>\n<div style=\"text-align: center;\">[latex]\\begin{align*} \\text{Rise} &= 80.5 - 52 = 28.5 \\\\ \\text{Run} &= 44 - 18.5 = 25.5 \\\\ \\text{Slope} &= \\frac{\\text{Rise}}{\\text{Run}} = \\frac{28.5}{25.5} \\approx 1.12 \\end{align*}[\/latex]<\/div>\n<p>By using the points, we estimated that slope [latex]\\approx 1.12[\/latex].<\/p>\n<p>To find the equation of the line using the last point [latex](44, 80.5)[\/latex], and the slope [latex]\\approx 1.12[\/latex] we previously estimated, we can use the point-slope form of the equation of a line.<\/p>\n<div style=\"text-align: center;\">[latex]\\begin{align*} y - y_1 = m(x - x_1) \\\\ y - 80.5 &= 1.12(x - 44) \\\\ y - 80.5 &= 1.12x - 1.12 \\cdot 44 \\\\ y - 80.5 &= 1.12x - 49.28 \\\\ y &= 1.12x - 49.28 + 80.5 \\\\ y &= 1.12x + 31.22 \\end{align*}[\/latex]<\/div>\n<p>So, the estimated linear function is: [latex]y = 1.12x + 31.22[\/latex].<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm318767\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=318767&theme=lumen&iframe_resize_id=ohm318767&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<section>\n<h2>Finding the Line of Best Fit Using a Graphing Utility<\/h2>\n<p>While eyeballing a line works reasonably well, there are statistical techniques for fitting a line to data that minimize the differences between the line and data values.<a class=\"footnote\" title=\"Technically, the method minimizes the sum of the squared differences in the vertical direction between the line and the data values.\" id=\"return-footnote-814-2\" href=\"#footnote-814-2\" aria-label=\"Footnote 2\"><sup class=\"footnote\">[2]<\/sup><\/a> One such technique is called <strong>least squares regression<\/strong> and can be computed by many graphing calculators as well as both spreadsheet and statistical software. Least squares regression is also called linear regression, and we can use an online graphing calculator to perform linear regressions.<\/p>\n<section class=\"textbox example\" aria-label=\"Example\">Find the least squares regression line using the cricket-chirp data in the table below.Use an online graphing calculator.<\/p>\n<table summary=\"Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).\">\n<colgroup>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td><strong>Chirps<\/strong><\/td>\n<td>[latex]44[\/latex]<\/td>\n<td>[latex]35[\/latex]<\/td>\n<td>[latex]20.4[\/latex]<\/td>\n<td>[latex]33[\/latex]<\/td>\n<td>[latex]31[\/latex]<\/td>\n<td>[latex]35[\/latex]<\/td>\n<td>[latex]18.5[\/latex]<\/td>\n<td>[latex]37[\/latex]<\/td>\n<td>[latex]26[\/latex]<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>[latex]80.5[\/latex]<\/td>\n<td>[latex]70.5[\/latex]<\/td>\n<td>[latex]57[\/latex]<\/td>\n<td>[latex]66[\/latex]<\/td>\n<td>[latex]68[\/latex]<\/td>\n<td>[latex]72[\/latex]<\/td>\n<td>[latex]52[\/latex]<\/td>\n<td>[latex]73.5[\/latex]<\/td>\n<td>[latex]53[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q374127\">Show Solution<\/button><\/p>\n<div id=\"q374127\" class=\"hidden-answer\" style=\"display: none\">\n<p>The following instructions are for Desmos, and other online graphing tools may be slightly different.<\/p>\n<ol>\n<li>Click the plus button (add item) in the upper left corner and select table.<\/li>\n<li>Enter chirps data in the [latex]x_1[\/latex] column.<\/li>\n<li>Enter temperature data in the [latex]y_1[\/latex] column.<br \/>\n<table summary=\"Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).\">\n<colgroup>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td><strong>Chirps<\/strong><\/td>\n<td>[latex]44[\/latex]<\/td>\n<td>[latex]35[\/latex]<\/td>\n<td>[latex]20.4[\/latex]<\/td>\n<td>[latex]33[\/latex]<\/td>\n<td>[latex]31[\/latex]<\/td>\n<td>[latex]35[\/latex]<\/td>\n<td>[latex]18.5[\/latex]<\/td>\n<td>[latex]37[\/latex]<\/td>\n<td>[latex]26[\/latex]<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>[latex]80.5[\/latex]<\/td>\n<td>[latex]70.5[\/latex]<\/td>\n<td>[latex]57[\/latex]<\/td>\n<td>[latex]66[\/latex]<\/td>\n<td>[latex]68[\/latex]<\/td>\n<td>[latex]72[\/latex]<\/td>\n<td>[latex]52[\/latex]<\/td>\n<td>[latex]73.5[\/latex]<\/td>\n<td>[latex]53[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>If you can&#8217;t see the points on the grid, use the plus and minus buttons in the upper right hand corner to zoom in or out on the grid, or click on the wrench and change the upper bound of [latex]x_1[\/latex] to [latex]60[\/latex] and [latex]y_1[\/latex] to [latex]100[\/latex]<\/li>\n<li>In the empty cell below the table you created, enter the expression [latex]y_1\u223cmx_1+b[\/latex]<\/li>\n<li>You can add labels to your graph by clicking on the wrench in the upper right hand corner and typing them into the cells that say &#8220;add a label&#8221;<\/li>\n<\/ol>\n<p>Here is an example of how your graph may look:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6803\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3794\/2016\/10\/09215809\/Screen-Shot-2019-07-09-at-2.56.40-PM.png\" alt=\"\" width=\"1420\" height=\"1002\" \/><\/p>\n<p><strong>Analysis of the Solution<\/strong><\/p>\n<p>Notice that this line is quite similar to the equation we &#8220;eyeballed&#8221; but should fit the data better. Notice also that using this equation would change our prediction for the temperature when hearing [latex]30[\/latex] chirps in [latex]15[\/latex] seconds from [latex]66[\/latex] degrees to:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}T\\left(30\\right)=30.281+1.143\\left(30\\right)\\hfill \\\\ \\text{}T\\left(30\\right)=64.571\\hfill \\\\ \\text{}T\\left(30\\right)\\approx 64.6\\text{ degrees}\\hfill \\end{array}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox interact\">Steps to obtain the equation of the regression line and equation:<br \/>\n[latex]\\\\[\/latex]<br \/>\n<strong>Step 1: <\/strong>Under <strong>&#8220;Enter Data&#8221;,<\/strong> select the\u00a0<strong>\u201cEnter Own\u201d<\/strong>.<br \/>\n<strong>Step 2: <\/strong>Change the name of the [latex]x[\/latex]&#8211; and [latex]y[\/latex]-variable accordingly.<br \/>\n<strong>Step 3: <\/strong>Enter the input ([latex]x[\/latex]Var) and output ([latex]y[\/latex]Var) accordingly.<br \/>\n<strong>Step 4: &#8220;Submit<\/strong> <strong>Data&#8221;<\/strong> and you will see the scatterplot on the right side of the statistical tool.<br \/>\n<strong style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\">Step 5:<\/strong><span style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\"> Under Plot Options: click on <\/span><strong style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\">&#8220;Regression Line&#8221;<\/strong><span style=\"font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\"> and you will see that the statistical tool will draw the line that best fit your data in your scatterplot. Right above the scatterplot, you will also see the equation of that line.<\/span><iframe loading=\"lazy\" src=\"https:\/\/lumen-learning.shinyapps.io\/linear_regression\/\" width=\"100%\" height=\"1100\" frameborder=\"no\" data-mce-fragment=\"1\"><\/iframe><br \/>\n[<a href=\"https:\/\/lumen-learning.shinyapps.io\/linear_regression\/\" target=\"_blank\" rel=\"noopener\">Trouble viewing? Click to open in a new tab.<\/a>]<\/section>\n<section class=\"textbox example\">Find the equation of the line that best fit the data in the table below using the statistical tool. Is it the same or different as the one you found previously? If it is different, why do you think it is different?<\/p>\n<table summary=\"Two rows and ten columns. The first row is labeled, 'chirps'. The second row is labeled is labeled, 'Temp'. Reading the remaining rows as ordered pairs (i.e., (chirps, Temp), we have the following values: (44, 80.5), (35, 70.5), (20.4, 57), (33, 66), (31, 68), (35, 72), (18.5, 52), (37, 73.5) and (26, 53).\">\n<colgroup>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td><strong>Chirps<\/strong><\/td>\n<td>[latex]44[\/latex]<\/td>\n<td>[latex]35[\/latex]<\/td>\n<td>[latex]20.4[\/latex]<\/td>\n<td>[latex]33[\/latex]<\/td>\n<td>[latex]31[\/latex]<\/td>\n<td>[latex]35[\/latex]<\/td>\n<td>[latex]18.5[\/latex]<\/td>\n<td>[latex]37[\/latex]<\/td>\n<td>[latex]26[\/latex]<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>[latex]80.5[\/latex]<\/td>\n<td>[latex]70.5[\/latex]<\/td>\n<td>[latex]57[\/latex]<\/td>\n<td>[latex]66[\/latex]<\/td>\n<td>[latex]68[\/latex]<\/td>\n<td>[latex]72[\/latex]<\/td>\n<td>[latex]52[\/latex]<\/td>\n<td>[latex]73.5[\/latex]<\/td>\n<td>[latex]53[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q674036\">Show Answer<\/button><\/p>\n<div id=\"q674036\" class=\"hidden-answer\" style=\"display: none\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4943 aligncenter\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-300x261.png\" alt=\"A scatterplot showing chirps per minute on the x-axis and temperature in degrees Fahrenheit on the y-axis. The data points form an upward trend, indicating that higher chirp counts are associated with higher temperatures. A straight regression line runs diagonally upward through the points, reinforcing the positive correlation.\" width=\"398\" height=\"346\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-300x261.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-65x56.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-225x195.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_-350x304.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/61\/2025\/07\/02214915\/3.3.L.4.Graph1_.png 480w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/><\/p>\n<p>According to the statistical tool, the regression line equation is<\/p>\n<p style=\"text-align: center;\"><strong>[latex]y = 30.3 + 1.14x[\/latex]<\/strong><\/p>\n<p><strong>Is it the same as the one we found previously? <\/strong>No, the two equations are slightly different.<\/p>\n<p><strong>Why is it different?<\/strong><\/p>\n<p>There are a few reasons why the regression line equation from the statistical tool might be different from the one we calculated manually:<\/p>\n<ol>\n<li><strong>Precision<\/strong>: The statistical tool uses precise calculations to determine the best fit line.<\/li>\n<li><strong>Data Points Used<\/strong>: The statistical tool considers all the data points simultaneously to find the line of best fit, whereas our manual calculation used only two specific points.<\/li>\n<li><strong>Method of Calculation<\/strong>: The statistical tool likely uses the least squares method, a standard approach for regression analysis that ensures the best possible fit. Our manual calculation was a straightforward approach to estimate the slope and intercept, which might not be as accurate.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/section>\n<\/section>\n<hr class=\"before-footnotes clear\" \/><div class=\"footnotes\"><ol><li id=\"footnote-814-1\">Selected data from http:\/\/classic.globe.gov\/fsl\/scientistsblog\/2007\/10\/. Retrieved Aug 3, 2010. <a href=\"#return-footnote-814-1\" class=\"return-footnote\" aria-label=\"Return to footnote 1\">&crarr;<\/a><\/li><li id=\"footnote-814-2\">Technically, the method minimizes the sum of the squared differences in the vertical direction between the line and the data values. <a href=\"#return-footnote-814-2\" class=\"return-footnote\" aria-label=\"Return to footnote 2\">&crarr;<\/a><\/li><\/ol><\/div>","protected":false},"author":13,"menu_order":26,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":61,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/814"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/users\/13"}],"version-history":[{"count":6,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/814\/revisions"}],"predecessor-version":[{"id":6088,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/814\/revisions\/6088"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/parts\/61"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/814\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/media?parent=814"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapter-type?post=814"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/contributor?post=814"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/license?post=814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}