{"id":1063,"date":"2016-10-21T01:15:39","date_gmt":"2016-10-21T01:15:39","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/waymakercollegealgebra\/?post_type=chapter&#038;p=1063"},"modified":"2020-11-17T23:16:13","modified_gmt":"2020-11-17T23:16:13","slug":"introduction-modeling-with-linear-functions","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/chapter\/introduction-modeling-with-linear-functions\/","title":{"raw":"Modeling With Linear Functions","rendered":"Modeling With Linear Functions"},"content":{"raw":"<div class=\"textbox learning-objectives\">\r\n<h3>Learning Outcomes<\/h3>\r\n<ul>\r\n \t<li>Use prescribed strategies to build linear models.<\/li>\r\n \t<li>Use intercepts and data points to build a linear model.<\/li>\r\n \t<li>Use a diagram to build a model.<\/li>\r\n \t<li>Draw and interpret scatter plots.<\/li>\r\n \t<li>Find the line of best fit using a calculator.<\/li>\r\n \t<li>Distinguish between linear and nonlinear relations.<\/li>\r\n \t<li>Use a linear model to make predictions.<\/li>\r\n<\/ul>\r\n<\/div>\r\nEmily is a college student who plans to spend a summer in Seattle. She has saved $3,500 for her trip and anticipates spending $400 each week on rent, food, and activities. How can we write a linear model to represent her situation? What would be the <em>x<\/em>-intercept, and what can she learn from it? To answer these and related questions, we can create a model using a linear function. Models such as this one can be extremely useful for analyzing relationships and making predictions based on those relationships. In this section, we will explore examples of <strong>linear function<\/strong> models.\r\n\r\n&nbsp;\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"902\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011915\/CNX_Precalc_Figure_02_03_0012.jpg\" alt=\"Photo of the Seattle skyline.\" width=\"902\" height=\"601\" \/> A view of the Seattle skyline. (credit: EEK Photography\/Flickr)[\/caption]\r\n<h2>Build Linear Models<\/h2>\r\nWhen <strong>modeling<\/strong> scenarios with linear functions and solving problems involving quantities with a <strong>constant rate of change<\/strong>, we typically follow the same problem solving strategies that we would use for any type of function. Let\u2019s briefly review them:\r\n<div class=\"textbox\">\r\n<ol>\r\n \t<li>Identify changing quantities, and then define descriptive variables to represent those quantities. When appropriate, sketch a picture or define a coordinate system.<\/li>\r\n \t<li>Look for information that provides values for the variables or values for parts of the functional model, such as slope and initial value.<\/li>\r\n \t<li>Determine what we are trying to find, identify, solve, or interpret.<\/li>\r\n \t<li>Identify a solution pathway from the provided information to what we are trying to find. Often this will involve checking and tracking units, building a table, or even finding a formula for the function being used to model the problem.<\/li>\r\n \t<li>When needed, write a formula for the function.<\/li>\r\n \t<li>Solve or evaluate the function using the formula.<\/li>\r\n \t<li>Reflect on whether your answer is reasonable for the given situation and whether it makes sense mathematically.<\/li>\r\n \t<li>Clearly convey your result using appropriate units, and answer in full sentences when necessary.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<h3>Building Linear Models<\/h3>\r\nNow let\u2019s take a look at the student in Seattle. In her situation, there are two changing quantities: time and money. The amount of money she has remaining while on vacation depends on how long she stays. We can use this information to define our variables, including units.\r\n<ul>\r\n \t<li>Output: <em>M<\/em>, money remaining, in dollars<\/li>\r\n \t<li>Input: <em>t<\/em>, time, in weeks<\/li>\r\n<\/ul>\r\nSo, the amount of money remaining depends on the number of weeks. Hence, amount of money remaining is a function of time: <i>M<\/i>(<em>t<\/em>)\r\n\r\nWe can also identify the initial value and the rate of change.\r\n<ul>\r\n \t<li>Initial Value: She saved $3,500, so $3,500 is the initial value for <em>M<\/em>.<\/li>\r\n \t<li>Rate of Change: She anticipates spending $400 each week, so \u2013$400 per week is the rate of change, or slope.<\/li>\r\n<\/ul>\r\nNotice that the unit of dollars per week matches the unit of our output variable divided by our input variable. Also, because the slope is negative, the linear function is decreasing. This should make sense because she is spending money each week.\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011918\/CNX_Precalc_Figure_02_03_0022.jpg\" alt=\"Pictoral of M(t) = -400t + 3500, with -400 highlighted as the slope, and 3500 highlighted as the intercept\" width=\"487\" height=\"131\" \/>\r\n\r\nThe <strong>rate of change<\/strong> is constant, so we can start with the <strong>linear model<\/strong> [latex]M(t)=mt+b[\/latex]. Then we can substitute the intercept and slope provided.\r\n\r\nTo find the <em>x<\/em>-intercept, we set the output to zero and solve for the input.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}0=-400t+3500\\hfill \\\\ t=\\frac{3500}{400}\\hfill \\\\ t=8.75\\hfill \\end{array}[\/latex]<\/p>\r\nThe <em>x<\/em>-intercept is 8.75 weeks. Because this represents the input value when the output will be zero, we could say that Emily will have no money left after 8.75 weeks.\r\n\r\nWhen modeling any real-life scenario with functions, there is typically a limited domain over which that model will be valid\u2014almost no trend continues indefinitely. Here the domain refers to the number of weeks. In this case, it doesn\u2019t make sense to talk about input values less than zero. A negative input value could refer to a number of weeks before she saved $3,500, but the scenario discussed poses the question once she saved $3,500 because this is when her trip and subsequent spending starts. It is also likely that this model is not valid after the <em>x<\/em>-intercept, unless Emily will use a credit card and goes into debt. The domain represents the set of input values, so the reasonable domain for this function is [latex]0\\le t\\le 8.75[\/latex].\r\n\r\nIn the above example, we were given a written description of the situation. We followed the steps of modeling a problem to analyze the information. However, the information provided may not always be the same. Sometimes we might be provided with an intercept. Other times we might be provided with an output value. We must be careful to analyze the information we are given and use it appropriately to build a linear model.\r\n<h3>Using a Given Intercept to Build a Model<\/h3>\r\nSome real-world problems provide the <em>y<\/em>-intercept, which is the constant or initial value. Once the <em>y<\/em>-intercept is known, the <em>x<\/em>-intercept can be calculated. Suppose, for example, that Hannah plans to pay off a no-interest loan from her parents. Her loan balance is $1,000. She plans to pay $250 per month until her balance is $0. The <em>y<\/em>-intercept is the initial amount of her debt, or $1,000. The rate of change, or slope, is \u2013$250 per month. We can then use slope-intercept form and the given information to develop a linear model.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}f\\left(x\\right)=mx+b\\hfill \\\\ f\\left(x\\right)=-250x+1000\\hfill \\end{array}[\/latex]<\/p>\r\nNow we can set the function equal to 0 and solve for <em>x<\/em>\u00a0to find the <em>x<\/em>-intercept.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}0=-250x+1000\\hfill \\\\ 1000=250x\\hfill \\\\ 4=x\\hfill \\\\ x=4\\hfill \\end{array}[\/latex]<\/p>\r\nThe <em>x<\/em>-intercept is the number of months it takes her to reach a balance of $0. The<em>\u00a0<\/em><em>x<\/em>-intercept is 4 months, so it will take Hannah four months to pay off her loan.\r\n<h3>Using a Given Input and Output to Build a Model<\/h3>\r\nMany real-world applications are not as direct as the ones we just considered. Instead they require us to identify some aspect of a linear function. We might sometimes be asked to evaluate the linear model at a given input or set the equation of the linear model equal to a specified output.\r\n<div class=\"textbox\">\r\n<h3>How To: Given a word problem that includes two pairs of input and output values, use the linear function to solve a problem.<\/h3>\r\n<ol>\r\n \t<li>Identify the input and output values.<\/li>\r\n \t<li>Convert the data to two coordinate pairs.<\/li>\r\n \t<li>Find the slope.<\/li>\r\n \t<li>Write the linear model.<\/li>\r\n \t<li>Use the model to make a prediction by evaluating the function at a given <em>x<\/em>\u00a0value.<\/li>\r\n \t<li>Use the model to identify an <em>x<\/em>\u00a0value that results in a given <em>y<\/em>\u00a0value.<\/li>\r\n \t<li>Answer the question posed.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Using a Linear Model to Investigate a Town\u2019s Population<\/h3>\r\nA town\u2019s population has been growing linearly. In 2004 the population was 6,200. By 2009 the population had grown to 8,100. Assume this trend continues.\r\n<ol>\r\n \t<li>Predict the population in 2013.<\/li>\r\n \t<li>Identify the year in which the population will reach 15,000.<\/li>\r\n<\/ol>\r\n[reveal-answer q=\"413748\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"413748\"]\r\n\r\nThe two changing quantities are the population size and time. While we could use the actual year value as the input quantity, doing so tends to lead to very cumbersome equations because the <em>y<\/em>-intercept would correspond to the year 0, more than 2000 years ago!\r\n\r\nTo make computation a little nicer, we will define our input as the number of years since 2004:\r\n<ul>\r\n \t<li>Input: <em>t<\/em>, years since 2004<\/li>\r\n \t<li>Output: <em>P<\/em>(<em>t<\/em>), the town\u2019s population<\/li>\r\n<\/ul>\r\nTo predict the population in 2013 (<em>t\u00a0<\/em>= 9), we would first need an equation for the population. Likewise, to find when the population would reach 15,000, we would need to solve for the input that would provide an output of 15,000. To write an equation, we need the initial value and the rate of change, or slope.\r\n\r\nTo determine the rate of change, we will use the change in output per change in input.\r\n<p style=\"text-align: center;\">[latex]m=\\frac{\\text{change in output}}{\\text{change in input}}[\/latex]<\/p>\r\nThe problem gives us two input-output pairs. Converting them to match our defined variables, the year 2004 would correspond to [latex]t=0[\/latex], giving the point [latex]\\left(0,\\text{6200}\\right)[\/latex]. Notice that through our clever choice of variable definition, we have \"given\" ourselves the <em>y<\/em>-intercept of the function. The year 2009 would correspond to [latex]t=\\text{5}[\/latex], giving the point [latex]\\left(5,\\text{8100}\\right)[\/latex].\r\n\r\nThe two coordinate pairs are [latex]\\left(0,\\text{6200}\\right)[\/latex] and [latex]\\left(5,\\text{8100}\\right)[\/latex]. Recall that we encountered examples in which we were provided two points earlier in the module. We can use these values to calculate the slope.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l} m=\\frac{8100 - 6200}{5 - 0}\\hfill \\\\ \\text{}m=\\frac{1900}{5}\\hfill \\\\ \\text{}m=380\\text{ people per year}\\hfill \\end{array}[\/latex]<\/p>\r\n<p style=\"text-align: left;\">We already know the <em>y<\/em>-intercept of the line, so we can immediately write the equation: [latex]\\begin{array}{l}P\\left(t\\right)=380t+6200 \\\\ \\hfill \\end{array}[\/latex]<\/p>\r\nTo predict the population in 2013, we evaluate our function at <em>t\u00a0<\/em>= 9.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}P\\left(9\\right)=380\\left(9\\right)+6,200\\hfill \\\\ \\text{}P\\left(9\\right)=9,620\\hfill \\end{array}[\/latex]<\/p>\r\nIf the trend continues, our model predicts a population of 9,620 in 2013.\r\n\r\nTo find when the population will reach 15,000, we can set [latex]P\\left(t\\right)=15000[\/latex] and solve for <em>t<\/em>.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}15000=380t+6200\\hfill \\\\ \\text{ }8800=380t\\hfill \\\\ \\text{ }t\\approx 23.158\\hfill \\end{array}[\/latex]<\/p>\r\nOur model predicts the population will reach 15,000 in a little more than 23 years after 2004, or somewhere around the year 2027.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\nA company sells doughnuts. They incur a fixed cost of $25,000 for rent, insurance, and other expenses. It costs $0.25 to produce each doughnut.\r\n<ol>\r\n \t<li>Write a linear model to represent the cost <em>C<\/em>\u00a0of the company as a function of <em>x<\/em>, the number of doughnuts produced.<\/li>\r\n \t<li>Find and interpret the <em>y<\/em>-intercept.<\/li>\r\n<\/ol>\r\n[reveal-answer q=\"218698\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"218698\"]\r\n\r\n[latex]C\\left(x\\right)=0.25x+25,000[\/latex] The <em>y<\/em>-intercept is (0, 25,000). If the company does not produce a single doughnut, they still incur a cost of $25,000.\r\n\r\n[\/hidden-answer]\r\n<iframe id=\"mom200\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=1425&amp;theme=oea&amp;iframe_resize_id=mom200\" width=\"100%\" height=\"250\"><\/iframe>\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\nA city\u2019s population has been growing linearly. In 2008, the population was 28,200. By 2012, the population was 36,800. Assume this trend continues.\r\n<ol>\r\n \t<li>Predict the population in 2014.<\/li>\r\n \t<li>Identify the year in which the population will reach 54,000.<\/li>\r\n<\/ol>\r\n[reveal-answer q=\"171054\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"171054\"]\r\n\r\n41,100;\u00a02020[\/hidden-answer]\r\n<iframe id=\"mom200\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=3483&amp;theme=oea&amp;iframe_resize_id=mom200\" width=\"100%\" height=\"450\"><\/iframe>\r\n\r\n<\/div>\r\n<h3>Using a Diagram to Model a Problem<\/h3>\r\nIt is useful for many real-world applications to draw a picture to gain a sense of how the variables representing the input and output may be used to answer a question. To draw the picture, first consider what the problem is asking for. Then, determine the input and the output. The diagram should relate the variables. Often, geometric shapes or figures are drawn. Distances are often traced out. If a right triangle is sketched, the Pythagorean Theorem relates the sides. If a rectangle is sketched, labeling width and height is helpful.\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Using a Diagram to Model Distance Walked<\/h3>\r\nAnna and Emanuel start at the same intersection. Anna walks east at 4 miles per hour while Emanuel walks south at 3 miles per hour. They are communicating with a two-way radio that has a range of 2 miles. How long after they start walking will they fall out of radio contact?\r\n\r\n[reveal-answer q=\"960486\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"960486\"]\r\n\r\nIn essence, we can partially answer this question by saying they will fall out of radio contact when they are 2 miles apart, which leads us to ask a new question:\u00a0\"How long will it take them to be 2 miles apart?\"\r\n\r\nIn this problem, our changing quantities are time and position, but ultimately we need to know how long will it take for them to be 2 miles apart. We can see that time will be our input variable, so we\u2019ll define our input and output variables.\r\n<ul>\r\n \t<li>Input: <em>t<\/em>, time in hours.<\/li>\r\n \t<li>Output: [latex]A\\left(t\\right)[\/latex], distance in miles, and [latex]E\\left(t\\right)[\/latex], distance in miles<\/li>\r\n<\/ul>\r\nBecause it is not obvious how to define our output variable, we\u2019ll start by drawing a picture.\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011920\/CNX_Precalc_Figure_02_03_0032.jpg\" alt=\"Picture of one person walking south and another walking in a perpendicular direction (east) from the other, a line is drawn between them to make a right triangle.\" width=\"487\" height=\"364\" \/>\r\n\r\nInitial Value: They both start at the same intersection so when [latex]t=0[\/latex], the distance traveled by each person should also be 0. Thus the initial value for each is 0.\r\n\r\nRate of Change: Anna is walking 4 miles per hour and Emanuel is walking 3 miles per hour, which are both rates of change. The slope for <em>A<\/em>\u00a0is 4 and the slope for <em>E<\/em>\u00a0is 3.\r\n\r\nUsing those values, we can write formulas for the distance each person has walked.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}A\\left(t\\right)=4t\\\\ E\\left(t\\right)=3t\\end{array}[\/latex]<\/p>\r\nFor this problem, the distances from the starting point are important. To notate these, we can define a coordinate system, identifying the \"starting point\" at the intersection where they both started. Then we can use the variable, <em>A<\/em>, which we introduced above, to represent Anna\u2019s position and define it to be a measurement from the starting point in the eastward direction. Likewise, can use the variable, <em>E<\/em>, to represent Emanuel\u2019s position measured from the starting point in the southward direction. Note that in defining the coordinate system, we specified both the starting point of the measurement and the direction of measure.\r\n\r\nWe can then define a third variable, <em>D<\/em>, to be the measurement of the distance between Anna and Emanuel. Showing the variables on the diagram is often helpful.\r\n\r\nRecall that we need to know how long it takes for <em>D<\/em>, the distance between them, to equal 2 miles. Notice that for any given input <em>t<\/em>, the outputs <em>A<\/em>(<em>t<\/em>), <em>E<\/em>(<em>t<\/em>), and <em>D<\/em>(<em>t<\/em>) represent distances.\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011923\/CNX_Precalc_Figure_02_03_0042.jpg\" width=\"487\" height=\"363\" \/>\r\n\r\nThis picture\u00a0shows us that we can use the Pythagorean Theorem because we have drawn a right triangle.\r\n\r\nUsing the Pythagorean Theorem, we get:\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{lllllll}D{\\left(t\\right)}^{2}=A{\\left(t\\right)}^{2}+E{\\left(t\\right)}^{2}\\hfill &amp; \\hfill \\\\ D{\\left(t\\right)}^{2}={\\left(4t\\right)}^{2}+{\\left(3t\\right)}^{2}\\hfill &amp; \\hfill \\\\ D{\\left(t\\right)}^{2}=16{t}^{2}+9{t}^{2}\\hfill &amp; \\hfill \\\\ D{\\left(t\\right)}^{2}=25{t}^{2}\\hfill &amp; \\hfill \\\\ \\text{}D\\left(t\\right)=\\pm \\sqrt{25{t}^{2}}\\hfill &amp; \\text{Solve for }D\\left(t\\right)\\text{by taking the square root of each side of the equation}\\hfill \\\\ D{\\left(t\\right)}=\\pm 5t\\hfill &amp; \\hfill \\end{array}[\/latex]<\/p>\r\nIn this scenario we are considering only positive values of [latex]t[\/latex], so our distance <em>D<\/em>(<em>t<\/em>) will always be positive. We can simplify this answer to <em>D<\/em>(<em>t<\/em>) = 5<em>t<\/em>. This means that the distance between Anna and Emanuel is also a linear function. Because <em>D<\/em>\u00a0is a linear function, we can now answer the question of when the distance between them will reach 2 miles. We will set the output <em>D<\/em>(<em>t<\/em>) = 2 and solve for <em>t<\/em>.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}D\\left(t\\right)=2\\hfill \\\\ \\text{ }5t=2\\hfill \\\\ \\text{ }t=\\frac{2}{5}=0.4\\hfill \\end{array}[\/latex]<\/p>\r\nThey will fall out of radio contact in 0.4 hours, or 24 minutes.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n<h3>Q &amp; A<\/h3>\r\n<strong>Should I draw diagrams when given information based on a geometric shape?<\/strong>\r\n\r\n<em>Yes. Sketch the figure and label the quantities and unknowns on the sketch.<\/em>\r\n\r\n<\/div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Using a Diagram to Model Distance between Cities<\/h3>\r\nThere is a straight road leading from the town of Westborough to Agritown 30 miles east and 10 miles north. A certain distance down this road, it junctions with a second road, perpendicular to the first, leading to the town of Eastborough. If the town of Eastborough is located 20 miles directly east of the town of Westborough, how far is the road junction from Westborough?\r\n\r\n[reveal-answer q=\"156610\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"156610\"]\r\n\r\nIt might help here to draw a picture of the situation.\u00a0It would then be helpful to introduce a coordinate system. While we could place the origin anywhere, placing it at Westborough seems convenient. This puts Agritown at coordinates (30, 10), and Eastborough at (20, 0).\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011924\/CNX_Precalc_Figure_02_03_0052.jpg\" alt=\"Picture of a line passing through the origin and the point (30,10), another line is drawn perpendicular to it and crosses the x-axis at the point (20,0)\" width=\"487\" height=\"151\" \/>\r\n\r\nUsing this point along with the origin, we can find the slope of the line from Westborough to Agritown:\r\n<p style=\"text-align: center;\">[latex]m=\\frac{10 - 0}{30 - 0}=\\frac{1}{3}[\/latex]<\/p>\r\nThe equation of the road from Westborough to Agritown would be\r\n<p style=\"text-align: center;\">[latex]W\\left(x\\right)=\\frac{1}{3}x[\/latex]<\/p>\r\nFrom this, we can determine the perpendicular road to Eastborough will have slope [latex]m=-3[\/latex]. Because the town of Eastborough is at the point (20, 0), we can find the equation:\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}E\\left(x\\right)=-3x+b\\hfill &amp; \\hfill \\\\ 0=-3\\left(20\\right)+b\\hfill &amp; \\text{Substitute in (20, 0)}\\hfill \\\\ b=60\\hfill &amp; \\hfill \\\\ E\\left(x\\right)=-3x+60\\hfill &amp; \\hfill \\end{array}[\/latex]<\/p>\r\nWe can now find the coordinates of the junction of the roads by finding the intersection of these lines. Setting them equal,\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{lllllll}\\text{ }\\frac{1}{3}x=-3x+60\\hfill &amp; \\hfill \\\\ \\frac{10}{3}x=60\\hfill &amp; \\hfill \\\\ 10x=180\\hfill &amp; \\hfill \\\\ \\text{ }x=18\\hfill &amp; \\text{Substituting this back into }W\\left(x\\right)\\hfill \\\\ \\text{ }y=W\\left(18\\right)\\hfill &amp; \\hfill \\\\ \\text{ }y=\\frac{1}{3}\\left(18\\right)\\hfill &amp; \\hfill \\\\ \\text{ }y=6\\hfill &amp; \\hfill \\end{array}[\/latex]<\/p>\r\nThe roads intersect at the point (18, 6). Using the distance formula, we can now find the distance from Westborough to the junction.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\text{distance}=\\sqrt{{\\left({x}_{2}-{x}_{1}\\right)}^{2}+{\\left({y}_{2}-{y}_{1}\\right)}^{2}}\\hfill \\\\ \\text{ }=\\sqrt{{\\left(18 - 0\\right)}^{2}+{\\left(6 - 0\\right)}^{2}}\\hfill \\\\ \\text{ }\\approx 18.974\\text{ miles}\\hfill \\end{array}[\/latex]<\/p>\r\n\r\n<h4>Analysis of the Solution<\/h4>\r\nOne nice use of linear models is to take advantage of the fact that the graphs of these functions are lines. This means real-world applications discussing maps need linear functions to model the distances between reference points.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\nThere is a straight road leading from the town of Timpson to Ashburn 60 miles east and 12 miles north. Partway down the road, it junctions with a second road, perpendicular to the first, leading to the town of Garrison. If the town of Garrison is located 22 miles directly east of the town of Timpson, how far is the road junction from Timpson?\r\n\r\n[reveal-answer q=\"788968\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"788968\"]\r\n\r\napprox. 21.57 miles[\/hidden-answer]\r\n\r\n<iframe id=\"mom900\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=49643&amp;theme=oea&amp;iframe_resize_id=mom900\" width=\"100%\" height=\"550\"><\/iframe>\r\n\r\n<\/div>\r\n<h2>Fitting Linear Models to Data<\/h2>\r\nA professor is attempting to identify trends among final exam scores. His class has a mixture of students, so he wonders if there is any relationship between age and final exam scores. One way for him to analyze the scores is by creating a diagram that relates the age of each student to the exam score received. In this section, we will examine one such diagram known as a scatter plot.\r\n\r\nA <strong>scatter plot<\/strong> is a graph of plotted points that may show a relationship between two sets of data. If the relationship is from a <strong>linear model<\/strong>, or a model that is nearly linear, the professor can draw conclusions using his knowledge of linear functions. Below is\u00a0a sample scatter plot.\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"487\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014335\/CNX_Precalc_Figure_02_04_0012.jpg\" alt=\"Scatter plot, titled 'Final Exam Score VS Age'. The x-axis is the age, and the y-axis is the final exam score. The range of ages are between 20s - 50s, and the range for scores are between upper 50s and 90s.\" width=\"487\" height=\"337\" \/> A scatter plot of age and final exam score variables.[\/caption]\r\n\r\nNotice this scatter plot does <em>not<\/em> indicate a <strong>linear relationship<\/strong>. The points do not appear to follow a trend. In other words, there does not appear to be a relationship between the age of the student and the score on the final exam.\r\n<div class=\"textbox exercises\">\r\n<h3>\u00a0Example: Using a Scatter Plot to Investigate Cricket Chirps<\/h3>\r\nThe table below\u00a0shows the number of cricket chirps in 15 seconds, for several different air temperatures, in degrees Fahrenheit.[footnote]Selected data from <a href=\"http:\/\/classic.globe.gov\/fsl\/scientistsblog\/2007\/10\/\" target=\"_blank\" rel=\"noopener\">http:\/\/classic.globe.gov\/fsl\/scientistsblog\/2007\/10\/<\/a>. Retrieved Aug 3, 2010[\/footnote] Plot this data and determine whether the data appears to be linearly related.\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>44<\/td>\r\n<td>35<\/td>\r\n<td>20.4<\/td>\r\n<td>33<\/td>\r\n<td>31<\/td>\r\n<td>35<\/td>\r\n<td>18.5<\/td>\r\n<td>37<\/td>\r\n<td>26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>80.5<\/td>\r\n<td>70.5<\/td>\r\n<td>57<\/td>\r\n<td>66<\/td>\r\n<td>68<\/td>\r\n<td>72<\/td>\r\n<td>52<\/td>\r\n<td>73.5<\/td>\r\n<td>53<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[reveal-answer q=\"579142\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"579142\"]\r\n\r\nPlotting this data\u00a0suggests that there may be a trend. We can see from the trend in the data that the number of chirps increases as the temperature increases. The trend appears to be roughly linear, though certainly not perfectly so.<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014337\/CNX_Precalc_Figure_02_04_0022.jpg\" alt=\"Scatter plot, titled 'Cricket Chirps Vs Air Temperature'. The x-axis is the Cricket Chirps in 15 Seconds, and the y-axis is the Temperature (F). The line regression is generally positive.\" width=\"487\" height=\"386\" \/>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<h3>Finding the Line of Best Fit<\/h3>\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 <em>y<\/em>-intercept. We can approximate the slope of the line by extending it until we can estimate the [latex]\\frac{\\text{rise}}{\\text{run}}[\/latex].\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Finding a Line of Best Fit<\/h3>\r\nFind a linear function that fits the data in the table below\u00a0by \"eyeballing\" a line that seems to fit.\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> <\/colgroup>\r\n<tbody>\r\n<tr>\r\n<td><strong>Chirps<\/strong><\/td>\r\n<td>44<\/td>\r\n<td>35<\/td>\r\n<td>20.4<\/td>\r\n<td>33<\/td>\r\n<td>31<\/td>\r\n<td>35<\/td>\r\n<td>18.5<\/td>\r\n<td>37<\/td>\r\n<td>26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>80.5<\/td>\r\n<td>70.5<\/td>\r\n<td>57<\/td>\r\n<td>66<\/td>\r\n<td>68<\/td>\r\n<td>72<\/td>\r\n<td>52<\/td>\r\n<td>73.5<\/td>\r\n<td>53<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[reveal-answer q=\"768322\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"768322\"]\r\n\r\nOn a graph, we could try sketching a line.\r\n\r\nUsing the starting and ending points of our hand drawn line, points (0, 30) and (50, 90), this graph has a slope of [latex]m=\\frac{60}{50}=1.2[\/latex] and a <em>y<\/em>-intercept at 30. This gives an equation of [latex]T\\left(c\\right)=1.2c+30[\/latex]\r\n\r\nwhere <em>c<\/em>\u00a0is the number of chirps in 15 seconds, and <em>T<\/em>(<em>c<\/em>)\u00a0is the temperature in degrees Fahrenheit. The resulting equation is represented in the graph below.\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014339\/CNX_Precalc_Figure_02_04_0032.jpg\" alt=\"Scatter plot, showing the line of best fit. It is titled 'Cricket Chirps Vs Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.\" width=\"487\" height=\"432\" \/>\r\n<h4>Analysis of the Solution<\/h4>\r\nThis linear equation can then be used to approximate answers to various questions we might ask about the trend.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n<iframe id=\"mom200\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=3681&amp;theme=oea&amp;iframe_resize_id=mom200\" width=\"100%\" height=\"250\"><\/iframe>\r\n\r\n<\/div>\r\n<h3>Recognizing Interpolation or Extrapolation<\/h3>\r\nWhile the data for most examples does not fall perfectly on the line, the equation is our best guess as to how the relationship will behave outside of the values for which we have data. We use a process known as <strong>interpolation<\/strong> when we predict a value inside the domain and range of the data. The process of <strong>extrapolation<\/strong> is used when we predict a value outside the domain and range of the data.\r\n\r\nThe graph below compares the two processes for the cricket-chirp data addressed in the previous example. We can see that interpolation would occur if we used our model to predict temperature when the values for chirps are between 18.5 and 44. Extrapolation would occur if we used our model to predict temperature when the values for chirps are less than 18.5 or greater than 44.\r\n\r\nThere is a difference between making predictions inside the domain and range of values for which we have data and outside that domain and range. Predicting a value outside of the domain and range has its limitations. When our model no longer applies after a certain point, it is sometimes called <strong>model breakdown<\/strong>. For example, predicting a cost function for a period of two years may involve examining the data where the input is the time in years and the output is the cost. But if we try to extrapolate a cost when [latex]x=50[\/latex], that is, in 50 years, the model would not apply because we could not account for factors fifty years in the future.\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"487\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014341\/CNX_Precalc_Figure_02_04_0042.jpg\" alt=\"Scatter plot, showing the line of best fit and where interpolation and extrapolation occurs. It is titled 'Cricket Chirps Vs Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.\" width=\"487\" height=\"430\" \/> Interpolation occurs within the domain and range of the provided data whereas extrapolation occurs outside.[\/caption]\r\n\r\n<div class=\"textbox\">\r\n<h3>A General Note: Interpolation and Extrapolation<\/h3>\r\nDifferent methods of making predictions are used to analyze data.\r\n<ul>\r\n \t<li>The method of <strong>interpolation<\/strong> involves predicting a value inside the domain and\/or range of the data.<\/li>\r\n \t<li>The method of <strong>extrapolation<\/strong> involves predicting a value outside the domain and\/or range of the data.<\/li>\r\n \t<li><strong>Model breakdown<\/strong> occurs at the point when the model no longer applies.<\/li>\r\n<\/ul>\r\n<\/div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Understanding Interpolation and Extrapolation<\/h3>\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>44<\/td>\r\n<td>35<\/td>\r\n<td>20.4<\/td>\r\n<td>33<\/td>\r\n<td>31<\/td>\r\n<td>35<\/td>\r\n<td>18.5<\/td>\r\n<td>37<\/td>\r\n<td>26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>80.5<\/td>\r\n<td>70.5<\/td>\r\n<td>57<\/td>\r\n<td>66<\/td>\r\n<td>68<\/td>\r\n<td>72<\/td>\r\n<td>52<\/td>\r\n<td>73.5<\/td>\r\n<td>53<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nUse the cricket data above\u00a0to answer the following questions:\r\n<ol>\r\n \t<li>Would predicting the temperature when crickets are chirping 30 times in 15 seconds be interpolation or extrapolation? Make the prediction, and discuss whether it is reasonable.<\/li>\r\n \t<li>Would predicting the number of chirps crickets will make at 40 degrees be interpolation or extrapolation? Make the prediction, and discuss whether it is reasonable.<\/li>\r\n<\/ol>\r\n[reveal-answer q=\"882447\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"882447\"]\r\n<ol>\r\n \t<li>The number of chirps in the data provided varied from 18.5 to 44. A prediction at 30 chirps per 15 seconds is inside the domain of our data so would be interpolation. Using our model:\r\n[latex]\\begin{array}{l}T\\left(30\\right)=30+1.2\\left(30\\right)\\hfill \\\\ T\\left(30\\right)=66\\text{ degrees}\\hfill \\end{array}[\/latex]\r\nBased on the data we have, this value seems reasonable.<\/li>\r\n \t<li>The temperature values varied from 52 to 80.5. Predicting the number of chirps at 40 degrees is extrapolation because 40 is outside the range of our data. Using our model:\r\n[latex]\\begin{array}{l}40=30+1.2c\\hfill \\\\ 10=1.2c\\hfill \\\\ c\\approx 8.33\\hfill \\end{array}[\/latex]<\/li>\r\n<\/ol>\r\nWe can compare the regions of interpolation and extrapolation using the graph below.\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014345\/CNX_Precalc_Figure_02_04_0052.jpg\" alt=\"Scatter plot, showing the line of best fit and where interpolation and extrapolation occurs. It is titled 'Cricket Chirps Vs Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.\" width=\"485\" height=\"429\" \/>\r\n<h4>Analysis of the Solution<\/h4>\r\nOur model predicts the crickets would chirp 8.33 times in 15 seconds. While this might be possible, we have no reason to believe our model is valid outside the domain and range. In fact, generally crickets stop chirping altogether at or below 50 degrees.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\nAccording to the data from the table in the cricket-chirp example, what temperature can we predict if we counted 20 chirps in 15 seconds?\r\n\r\n[reveal-answer q=\"271439\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"271439\"]\r\n\r\n[latex]54^\\circ \\text{F}[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<h3>Finding the Line of Best Fit Using a Graphing Utility<\/h3>\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 spreadsheet and statistical software. Least squares regression is also called linear regression.\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Finding a Least Squares Regression Line<\/h3>\r\nFind the least squares regression line using the cricket-chirp data in the table below.\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).\">\r\n<tbody>\r\n<tr>\r\n<td><strong>Chirps<\/strong><\/td>\r\n<td>44<\/td>\r\n<td>35<\/td>\r\n<td>20.4<\/td>\r\n<td>33<\/td>\r\n<td>31<\/td>\r\n<td>35<\/td>\r\n<td>18.5<\/td>\r\n<td>37<\/td>\r\n<td>26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>80.5<\/td>\r\n<td>70.5<\/td>\r\n<td>57<\/td>\r\n<td>66<\/td>\r\n<td>68<\/td>\r\n<td>72<\/td>\r\n<td>52<\/td>\r\n<td>73.5<\/td>\r\n<td>53<\/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\nUsing a graphing calculator or statistical software:\r\n<ol>\r\n \t<li style=\"list-style-type: none;\">\r\n<ol>\r\n \t<li>Enter chirps data in the L1 column.<\/li>\r\n \t<li>Enter temperature data in the L2 column.<\/li>\r\n \t<li>On a graphing utility, select Linear Regression (LinReg). Using the cricket chirp data from earlier, with technology we obtain the equation [latex]T(c) = 30.281+1.143c[\/latex]<\/li>\r\n<\/ol>\r\n<\/li>\r\n<\/ol>\r\n<table summary=\"Two rows and ten columns. The first row is labeled, 'L1'. The second row is labeled is labeled, 'L2'. Reading the remaining rows as ordered pairs (i.e., (L2, L2), 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).\">\r\n<tbody>\r\n<tr>\r\n<td><strong>x1<\/strong><\/td>\r\n<td>44<\/td>\r\n<td>35<\/td>\r\n<td>20.4<\/td>\r\n<td>33<\/td>\r\n<td>31<\/td>\r\n<td>35<\/td>\r\n<td>18.5<\/td>\r\n<td>37<\/td>\r\n<td>26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><b>y1<\/b><\/td>\r\n<td>80.5<\/td>\r\n<td>70.5<\/td>\r\n<td>57<\/td>\r\n<td>66<\/td>\r\n<td>68<\/td>\r\n<td>72<\/td>\r\n<td>52<\/td>\r\n<td>73.5<\/td>\r\n<td>53<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h4>Analysis of the Solution<\/h4>\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 30 chirps in 15 seconds from 66 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\nThe graph of the scatter plot with the least squares regression line is shown below:\r\n\r\n[caption id=\"\" align=\"alignnone\" width=\"487\"]<img class=\"size-medium\" src=\"https:\/\/cnx.org\/resources\/518bc40eb0e1068ac46e62e9f2a414854c98e0f6\/CNX_Precalc_Figure_02_04_006.jpg\" alt=\"Scatter plot, showing the line of best fit: T(c) = 30.281 + 1.143c. It is titled 'Cricket Chirps vs. Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.\" width=\"487\" height=\"408\" \/> Scatter plot, showing the line of best fit[\/caption]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n<h3>Q &amp; A<\/h3>\r\n<strong>Will there ever be a case where two different lines will serve as the best fit for the data?<\/strong>\r\n\r\n<em>No. There is only one best fit line.<\/em>\r\n\r\n<\/div>\r\n<h2>Distinguish Between Linear and Nonlinear Relations<\/h2>\r\nAs we saw in the cricket-chirp example, some data exhibit strong linear trends, but other data, like the final exam scores plotted by age, are clearly nonlinear. Most calculators and computer software can also provide us with the <strong>correlation coefficient<\/strong>, which is a measure of how closely the line fits the data. Many graphing calculators require the user to turn a \"diagnostic on\" selection to find the correlation coefficient, which mathematicians label as <em>r<\/em>. The correlation coefficient provides an easy way to get an idea of how close to a line the data falls.\r\n\r\nWe should compute the correlation coefficient only for data that follows a linear pattern or to determine the degree to which a data set is linear. If the data exhibits a nonlinear pattern, the correlation coefficient for a linear regression is meaningless. To get a sense of the relationship between the value of <em>r<\/em>\u00a0and the graph of the data, the image below\u00a0shows some large data sets with their correlation coefficients. Remember, for all plots, the horizontal axis shows the input and the vertical axis shows the output.\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"901\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014349\/CNX_Precalc_Figure_02_04_0072.jpg\" alt=\"A series of scatterplot graphs. Some are linear and some are not.\" width=\"901\" height=\"401\" \/> Plotted data and related correlation coefficients. (credit: \"DenisBoigelot,\" Wikimedia Commons)[\/caption]\r\n\r\n<div class=\"textbox\">\r\n<h3>A General Note: Correlation Coefficient<\/h3>\r\nThe <strong>correlation coefficient<\/strong> is a value, <em>r<\/em>, between \u20131 and 1.\r\n<ul>\r\n \t<li><em>r<\/em> &gt; 0 suggests a positive (increasing) relationship<\/li>\r\n \t<li><em>r<\/em> &lt; 0 suggests a negative (decreasing) relationship<\/li>\r\n \t<li>The closer the value is to 0, the more scattered the data.<\/li>\r\n \t<li>The closer the value is to 1 or \u20131, the less scattered the data is.<\/li>\r\n<\/ul>\r\n<\/div>\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Finding a Correlation Coefficient<\/h3>\r\nCalculate the correlation coefficient for cricket-chirp data in the table below.\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).\">\r\n<tbody>\r\n<tr>\r\n<td><strong>Chirps<\/strong><\/td>\r\n<td>44<\/td>\r\n<td>35<\/td>\r\n<td>20.4<\/td>\r\n<td>33<\/td>\r\n<td>31<\/td>\r\n<td>35<\/td>\r\n<td>18.5<\/td>\r\n<td>37<\/td>\r\n<td>26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Temperature<\/strong><\/td>\r\n<td>80.5<\/td>\r\n<td>70.5<\/td>\r\n<td>57<\/td>\r\n<td>66<\/td>\r\n<td>68<\/td>\r\n<td>72<\/td>\r\n<td>52<\/td>\r\n<td>73.5<\/td>\r\n<td>53<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[reveal-answer q=\"520385\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"520385\"]\r\n\r\nYour calculator or software will\u00a0provide you with the correlation coefficient when you use it to fit a linear regression. The correlation coefficients is labeled as <em>r\u00a0<\/em>= 0.951 for this dataset. This value is very close to 1 which suggests a strong increasing linear relationship.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<h2>Use a Linear Model to Make Predictions<\/h2>\r\nOnce we determine that a set of data is linear using the correlation coefficient, we can use the regression line to make predictions. As we learned previously, a regression line is a line that is closest to the data in the scatter plot, which means that only one such line is a best fit for the data.\r\n<div class=\"textbox exercises\">\r\n<h3>Example: Using a Regression Line to Make Predictions<\/h3>\r\nGasoline consumption in the United States has been steadily increasing. Consumption data from 1994 to 2004 is shown in the table below.[footnote]<a href=\"http:\/\/www.bts.gov\/publications\/national_transportation_statistics\/2005\/html\/table_04_10.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.bts.gov\/publications\/national_transportation_statistics\/2005\/html\/table_04_10.html<\/a>[\/footnote] Determine whether the trend is linear, and if so, find a model for the data. Use the model to predict the consumption in 2008.Is this an interpolation or an extrapolation?\r\n<table id=\"Table_02_04_03\" summary=\"Two rows and twelve columns. The first row is labeled, 'Year'. The second row is labeled is labeled, 'Consumption (billions of gallons)'. Reading the remaining rows as ordered pairs (i.e., (Year, Consumption), we have the following values: ('94, 113), ('95, 116), ('96, 118), ('97, 119), ('98, 123), ('99, 125), ('00, 126), ('01, 128), ('02, 131), ('03, 133), and ('04, 136).\">\r\n<tbody>\r\n<tr>\r\n<td><strong>Year<\/strong><\/td>\r\n<td>'94<\/td>\r\n<td>'95<\/td>\r\n<td>'96<\/td>\r\n<td>'97<\/td>\r\n<td>'98<\/td>\r\n<td>'99<\/td>\r\n<td>'00<\/td>\r\n<td>'01<\/td>\r\n<td>'02<\/td>\r\n<td>'03<\/td>\r\n<td>'04<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Consumption (billions of gallons)<\/strong><\/td>\r\n<td>113<\/td>\r\n<td>116<\/td>\r\n<td>118<\/td>\r\n<td>119<\/td>\r\n<td>123<\/td>\r\n<td>125<\/td>\r\n<td>126<\/td>\r\n<td>128<\/td>\r\n<td>131<\/td>\r\n<td>133<\/td>\r\n<td>136<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[reveal-answer q=\"671301\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"671301\"]\r\n\r\nLet <em>t<\/em> represent years since 1994.\r\n\r\nUse your calculator or statistical software to create the equation for the regression line:\r\n<p style=\"text-align: center;\">[latex]C\\left(t\\right)=113.318+2.209t[\/latex]<\/p>\r\nThe correlation coefficient was calculated to be 0.997, suggesting a very strong increasing linear trend.\r\n\r\nUsing this to predict consumption in 2008, which is 14 years after 1994 [latex]\\left(t=14\\right)[\/latex],\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}C\\left(14\\right)=113.318+2.209\\left(14\\right)\\hfill \\\\ C\\left(14\\right)=144.244\\hfill \\end{array}[\/latex]<\/p>\r\nThe model predicts 144.244 billion gallons of gasoline consumption in 2008. This is an extrapolation because there is not a datapoint whose x1 value is 2008.\r\nThe scatter plot of the data, including the least squares regression line, is shown below. Note how we changed the viewing window for the y-axis to 100 &lt; y &lt; 150.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\nUse your calculator or statistical software to find a linear regression for the following data, which represents the amount of time a scuba diver can spend underwater as a function of the depth of the water.\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Depth (feet)<\/td>\r\n<td>Time (minutes)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>50<\/td>\r\n<td>80<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>60<\/td>\r\n<td>55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>70<\/td>\r\n<td>45<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>80<\/td>\r\n<td>35<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>90<\/td>\r\n<td>25<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>100<\/td>\r\n<td>22<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n1) Write the equation for the least squares regression line.\r\n\r\n[practice-area rows=\"1\"][\/practice-area]\r\n\r\n2) According to the regression line, how long can a diver spend at a depth of 110 feet?\r\n\r\n3)How about 120 feet? Why doesn't this make sense?\r\n\r\n[practice-area rows=\"1\"][\/practice-area]\r\n\r\n4) At what depth would the dive time be zero?\r\n\r\n[practice-area rows=\"1\"][\/practice-area]\r\n[reveal-answer q=\"23398\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"23398\"]\r\n\r\n1) The equation for the regression line is [latex]y=-1.1143x+127.24[\/latex]\r\n2) A diver can spend [latex]y=-1.1143(110)+127.24=1.51[\/latex] minutes at a depth of 110 feet.\r\n3) A diver can spend [latex]y=-1.1143(120)+127.24=-6.48[\/latex] minutes at a depth of 120 feet. This doesn't make sense because a negative value for time doesn't have any meaning.\r\n4) To find at what depth the dive time would be zero, we need to set the regression equation equal to zero.\r\n[latex]\\begin{array}{l}0=-1.1143x+127.24\\\\-127.24=-1.1143x\\\\114.19 = x\\end{array}[\/latex]\r\n\r\nA diver, at a depth of 114.19 feet, would have a dive time of 0 minutes.\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>try it<\/h3>\r\nHere are more data sets that you can plot in your calculator or statistical software. \u00a0Fit a linear regression for them then interpre the correlation coefficient to determine whether there appears to be a linear relationship.\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Depth of the Columbia River<\/td>\r\n<td>Water Velocity<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>0.66<\/td>\r\n<td>1.55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>1.98<\/td>\r\n<td>1.11<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>2.64<\/td>\r\n<td>1.42<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>3.3<\/td>\r\n<td>1.39<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>4.62<\/td>\r\n<td>1.39<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>5.94<\/td>\r\n<td>1.14<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>7.26<\/td>\r\n<td>0.91<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>8.58<\/td>\r\n<td>0.59<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>9.9<\/td>\r\n<td>0.59<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>10.56<\/td>\r\n<td>0.41<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>11.22<\/td>\r\n<td>0.22<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<table style=\"width: 412px;\">\r\n<tbody>\r\n<tr style=\"height: 30px;\">\r\n<td style=\"width: 197.75px; height: 30px;\">% of Mississippi River in Crops (By Basin)<\/td>\r\n<td style=\"width: 192.25px; height: 30px;\">Nitrate Concentration (mg\/ L)<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14.3379px;\">\r\n<td style=\"width: 197.75px; height: 14.3379px;\">2.4<\/td>\r\n<td style=\"width: 192.25px; height: 14.3379px;\">0.647<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">1.3<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">1.062<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">14.3<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">1.432<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">0.5<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">0.579<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">45.6<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">3.561<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">46.6<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">3.938<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">1.5<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">0.927<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">53.6<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">2.549<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">4.1<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">0.357<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td style=\"width: 197.75px; height: 14px;\">3.1<\/td>\r\n<td style=\"width: 192.25px; height: 14px;\">0.245<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p class=\"p1\">Dimensions of the Lava Dome in Mt. St. Helens, t = 0 on 18 October 1980 (eruption was 18 May 1980).<\/p>\r\n\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>Days<\/td>\r\n<td>Millions of Cubic Meters<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>0<\/td>\r\n<td>2.9<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>70<\/td>\r\n<td>13<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>109<\/td>\r\n<td>28<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>173<\/td>\r\n<td>40<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>242<\/td>\r\n<td>56<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>322<\/td>\r\n<td>64<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>376<\/td>\r\n<td>75<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>547<\/td>\r\n<td>88<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>603<\/td>\r\n<td>100<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>699<\/td>\r\n<td>115<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>872<\/td>\r\n<td>152<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>922<\/td>\r\n<td>154<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>1087<\/td>\r\n<td>173<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>1343<\/td>\r\n<td>178<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>1692<\/td>\r\n<td>212<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>1858<\/td>\r\n<td>243<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n&nbsp;\r\n<div class=\"textbox shaded\">\r\n<h2>FYI<\/h2>\r\nDivers who want or need to descend to depths greater than 100 feet employ different techniques and equipment to help them safely navigate the depth. For example, different gas mixtures or rebreather equipment may be used. \u00a0Gas mixtures such as oxygen, helium, and nitrogen can help to mitigate the narcotic effects of breathing gas at great depths.[footnote]https:\/\/en.wikipedia.org\/wiki\/Trimix_(breathing_gas)[\/footnote]\r\n\r\n[caption id=\"attachment_2980\" align=\"aligncenter\" width=\"351\"]<img class=\"wp-image-2980\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/12\/21212829\/Trevor_Jackson_returns_from_SS_Kyogle-300x225.jpg\" width=\"351\" height=\"263\" \/> A scuba diver using rebreather with open circuit bailout cylinders returning from a 600-foot (180 m) dive.[\/caption]\r\n\r\n<\/div>\r\n<h2><\/h2>\r\n<h2>Key Concepts<\/h2>\r\n<ul id=\"fs-id1165137785014\">\r\n \t<li>Scatter plots show the relationship between two sets of data.<\/li>\r\n \t<li>Scatter plots may represent linear or non-linear models.<\/li>\r\n \t<li>The line of best fit may be estimated or calculated using a calculator or statistical software.<\/li>\r\n \t<li>Interpolation can be used to predict values inside the domain and range of the data, whereas extrapolation can be used to predict values outside the domain and range of the data.<\/li>\r\n \t<li>The correlation coefficient, <span id=\"MathJax-Element-329-Frame\" class=\"MathJax\"><span id=\"MathJax-Span-4867\" class=\"math\"><span id=\"MathJax-Span-4868\" class=\"mrow\"><span id=\"MathJax-Span-4869\" class=\"semantics\"><span id=\"MathJax-Span-4870\" class=\"mrow\"><span id=\"MathJax-Span-4871\" class=\"mrow\"><em><span id=\"MathJax-Span-4872\" class=\"mi\">r<\/span><\/em><span id=\"MathJax-Span-4873\" class=\"mo\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span> indicates the degree of linear relationship between data.<\/li>\r\n \t<li>A regression line best fits the data.<\/li>\r\n \t<li>The least squares regression line is found by minimizing the squares of the distances of points from a line passing through the data and may be used to make predictions regarding either of the variables.<\/li>\r\n<\/ul>\r\n<h2>Glossary<\/h2>\r\n<dl id=\"fs-id1165137705061\" class=\"definition\">\r\n \t<dt><strong>correlation coefficient<\/strong><\/dt>\r\n \t<dd id=\"fs-id1165135250649\">a value, <em>r<\/em>, between \u20131 and 1 that indicates the degree of linear correlation of variables or how closely a regression line fits a data set.<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165137549428\" class=\"definition\">\r\n \t<dt><strong>extrapolation<\/strong><\/dt>\r\n \t<dd id=\"fs-id1165135485274\">predicting a value outside the domain and range of the data<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165135485278\" class=\"definition\">\r\n \t<dt><strong>interpolation<\/strong><\/dt>\r\n \t<dd id=\"fs-id1165135184191\">predicting a value inside the domain and range of the data<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165137761665\" class=\"definition\">\r\n \t<dt><strong>least squares regression<\/strong><\/dt>\r\n \t<dd id=\"fs-id1165135192379\">a statistical technique for fitting a line to data in a way that minimizes the differences between the line and data values<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165137446440\" class=\"definition\">\r\n \t<dt><strong>model breakdown<\/strong><\/dt>\r\n \t<dd id=\"fs-id1165137446445\">when a model no longer applies after a certain point<\/dd>\r\n<\/dl>","rendered":"<div class=\"textbox learning-objectives\">\n<h3>Learning Outcomes<\/h3>\n<ul>\n<li>Use prescribed strategies to build linear models.<\/li>\n<li>Use intercepts and data points to build a linear model.<\/li>\n<li>Use a diagram to build a model.<\/li>\n<li>Draw and interpret scatter plots.<\/li>\n<li>Find the line of best fit using a calculator.<\/li>\n<li>Distinguish between linear and nonlinear relations.<\/li>\n<li>Use a linear model to make predictions.<\/li>\n<\/ul>\n<\/div>\n<p>Emily is a college student who plans to spend a summer in Seattle. She has saved $3,500 for her trip and anticipates spending $400 each week on rent, food, and activities. How can we write a linear model to represent her situation? What would be the <em>x<\/em>-intercept, and what can she learn from it? To answer these and related questions, we can create a model using a linear function. Models such as this one can be extremely useful for analyzing relationships and making predictions based on those relationships. In this section, we will explore examples of <strong>linear function<\/strong> models.<\/p>\n<p>&nbsp;<\/p>\n<div style=\"width: 912px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011915\/CNX_Precalc_Figure_02_03_0012.jpg\" alt=\"Photo of the Seattle skyline.\" width=\"902\" height=\"601\" \/><\/p>\n<p class=\"wp-caption-text\">A view of the Seattle skyline. (credit: EEK Photography\/Flickr)<\/p>\n<\/div>\n<h2>Build Linear Models<\/h2>\n<p>When <strong>modeling<\/strong> scenarios with linear functions and solving problems involving quantities with a <strong>constant rate of change<\/strong>, we typically follow the same problem solving strategies that we would use for any type of function. Let\u2019s briefly review them:<\/p>\n<div class=\"textbox\">\n<ol>\n<li>Identify changing quantities, and then define descriptive variables to represent those quantities. When appropriate, sketch a picture or define a coordinate system.<\/li>\n<li>Look for information that provides values for the variables or values for parts of the functional model, such as slope and initial value.<\/li>\n<li>Determine what we are trying to find, identify, solve, or interpret.<\/li>\n<li>Identify a solution pathway from the provided information to what we are trying to find. Often this will involve checking and tracking units, building a table, or even finding a formula for the function being used to model the problem.<\/li>\n<li>When needed, write a formula for the function.<\/li>\n<li>Solve or evaluate the function using the formula.<\/li>\n<li>Reflect on whether your answer is reasonable for the given situation and whether it makes sense mathematically.<\/li>\n<li>Clearly convey your result using appropriate units, and answer in full sentences when necessary.<\/li>\n<\/ol>\n<\/div>\n<h3>Building Linear Models<\/h3>\n<p>Now let\u2019s take a look at the student in Seattle. In her situation, there are two changing quantities: time and money. The amount of money she has remaining while on vacation depends on how long she stays. We can use this information to define our variables, including units.<\/p>\n<ul>\n<li>Output: <em>M<\/em>, money remaining, in dollars<\/li>\n<li>Input: <em>t<\/em>, time, in weeks<\/li>\n<\/ul>\n<p>So, the amount of money remaining depends on the number of weeks. Hence, amount of money remaining is a function of time: <i>M<\/i>(<em>t<\/em>)<\/p>\n<p>We can also identify the initial value and the rate of change.<\/p>\n<ul>\n<li>Initial Value: She saved $3,500, so $3,500 is the initial value for <em>M<\/em>.<\/li>\n<li>Rate of Change: She anticipates spending $400 each week, so \u2013$400 per week is the rate of change, or slope.<\/li>\n<\/ul>\n<p>Notice that the unit of dollars per week matches the unit of our output variable divided by our input variable. Also, because the slope is negative, the linear function is decreasing. This should make sense because she is spending money each week.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011918\/CNX_Precalc_Figure_02_03_0022.jpg\" alt=\"Pictoral of M(t) = -400t + 3500, with -400 highlighted as the slope, and 3500 highlighted as the intercept\" width=\"487\" height=\"131\" \/><\/p>\n<p>The <strong>rate of change<\/strong> is constant, so we can start with the <strong>linear model<\/strong> [latex]M(t)=mt+b[\/latex]. Then we can substitute the intercept and slope provided.<\/p>\n<p>To find the <em>x<\/em>-intercept, we set the output to zero and solve for the input.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}0=-400t+3500\\hfill \\\\ t=\\frac{3500}{400}\\hfill \\\\ t=8.75\\hfill \\end{array}[\/latex]<\/p>\n<p>The <em>x<\/em>-intercept is 8.75 weeks. Because this represents the input value when the output will be zero, we could say that Emily will have no money left after 8.75 weeks.<\/p>\n<p>When modeling any real-life scenario with functions, there is typically a limited domain over which that model will be valid\u2014almost no trend continues indefinitely. Here the domain refers to the number of weeks. In this case, it doesn\u2019t make sense to talk about input values less than zero. A negative input value could refer to a number of weeks before she saved $3,500, but the scenario discussed poses the question once she saved $3,500 because this is when her trip and subsequent spending starts. It is also likely that this model is not valid after the <em>x<\/em>-intercept, unless Emily will use a credit card and goes into debt. The domain represents the set of input values, so the reasonable domain for this function is [latex]0\\le t\\le 8.75[\/latex].<\/p>\n<p>In the above example, we were given a written description of the situation. We followed the steps of modeling a problem to analyze the information. However, the information provided may not always be the same. Sometimes we might be provided with an intercept. Other times we might be provided with an output value. We must be careful to analyze the information we are given and use it appropriately to build a linear model.<\/p>\n<h3>Using a Given Intercept to Build a Model<\/h3>\n<p>Some real-world problems provide the <em>y<\/em>-intercept, which is the constant or initial value. Once the <em>y<\/em>-intercept is known, the <em>x<\/em>-intercept can be calculated. Suppose, for example, that Hannah plans to pay off a no-interest loan from her parents. Her loan balance is $1,000. She plans to pay $250 per month until her balance is $0. The <em>y<\/em>-intercept is the initial amount of her debt, or $1,000. The rate of change, or slope, is \u2013$250 per month. We can then use slope-intercept form and the given information to develop a linear model.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}f\\left(x\\right)=mx+b\\hfill \\\\ f\\left(x\\right)=-250x+1000\\hfill \\end{array}[\/latex]<\/p>\n<p>Now we can set the function equal to 0 and solve for <em>x<\/em>\u00a0to find the <em>x<\/em>-intercept.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}0=-250x+1000\\hfill \\\\ 1000=250x\\hfill \\\\ 4=x\\hfill \\\\ x=4\\hfill \\end{array}[\/latex]<\/p>\n<p>The <em>x<\/em>-intercept is the number of months it takes her to reach a balance of $0. The<em>\u00a0<\/em><em>x<\/em>-intercept is 4 months, so it will take Hannah four months to pay off her loan.<\/p>\n<h3>Using a Given Input and Output to Build a Model<\/h3>\n<p>Many real-world applications are not as direct as the ones we just considered. Instead they require us to identify some aspect of a linear function. We might sometimes be asked to evaluate the linear model at a given input or set the equation of the linear model equal to a specified output.<\/p>\n<div class=\"textbox\">\n<h3>How To: Given a word problem that includes two pairs of input and output values, use the linear function to solve a problem.<\/h3>\n<ol>\n<li>Identify the input and output values.<\/li>\n<li>Convert the data to two coordinate pairs.<\/li>\n<li>Find the slope.<\/li>\n<li>Write the linear model.<\/li>\n<li>Use the model to make a prediction by evaluating the function at a given <em>x<\/em>\u00a0value.<\/li>\n<li>Use the model to identify an <em>x<\/em>\u00a0value that results in a given <em>y<\/em>\u00a0value.<\/li>\n<li>Answer the question posed.<\/li>\n<\/ol>\n<\/div>\n<div class=\"textbox exercises\">\n<h3>Example: Using a Linear Model to Investigate a Town\u2019s Population<\/h3>\n<p>A town\u2019s population has been growing linearly. In 2004 the population was 6,200. By 2009 the population had grown to 8,100. Assume this trend continues.<\/p>\n<ol>\n<li>Predict the population in 2013.<\/li>\n<li>Identify the year in which the population will reach 15,000.<\/li>\n<\/ol>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q413748\">Show Solution<\/span><\/p>\n<div id=\"q413748\" class=\"hidden-answer\" style=\"display: none\">\n<p>The two changing quantities are the population size and time. While we could use the actual year value as the input quantity, doing so tends to lead to very cumbersome equations because the <em>y<\/em>-intercept would correspond to the year 0, more than 2000 years ago!<\/p>\n<p>To make computation a little nicer, we will define our input as the number of years since 2004:<\/p>\n<ul>\n<li>Input: <em>t<\/em>, years since 2004<\/li>\n<li>Output: <em>P<\/em>(<em>t<\/em>), the town\u2019s population<\/li>\n<\/ul>\n<p>To predict the population in 2013 (<em>t\u00a0<\/em>= 9), we would first need an equation for the population. Likewise, to find when the population would reach 15,000, we would need to solve for the input that would provide an output of 15,000. To write an equation, we need the initial value and the rate of change, or slope.<\/p>\n<p>To determine the rate of change, we will use the change in output per change in input.<\/p>\n<p style=\"text-align: center;\">[latex]m=\\frac{\\text{change in output}}{\\text{change in input}}[\/latex]<\/p>\n<p>The problem gives us two input-output pairs. Converting them to match our defined variables, the year 2004 would correspond to [latex]t=0[\/latex], giving the point [latex]\\left(0,\\text{6200}\\right)[\/latex]. Notice that through our clever choice of variable definition, we have &#8220;given&#8221; ourselves the <em>y<\/em>-intercept of the function. The year 2009 would correspond to [latex]t=\\text{5}[\/latex], giving the point [latex]\\left(5,\\text{8100}\\right)[\/latex].<\/p>\n<p>The two coordinate pairs are [latex]\\left(0,\\text{6200}\\right)[\/latex] and [latex]\\left(5,\\text{8100}\\right)[\/latex]. Recall that we encountered examples in which we were provided two points earlier in the module. We can use these values to calculate the slope.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l} m=\\frac{8100 - 6200}{5 - 0}\\hfill \\\\ \\text{}m=\\frac{1900}{5}\\hfill \\\\ \\text{}m=380\\text{ people per year}\\hfill \\end{array}[\/latex]<\/p>\n<p style=\"text-align: left;\">We already know the <em>y<\/em>-intercept of the line, so we can immediately write the equation: [latex]\\begin{array}{l}P\\left(t\\right)=380t+6200 \\\\ \\hfill \\end{array}[\/latex]<\/p>\n<p>To predict the population in 2013, we evaluate our function at <em>t\u00a0<\/em>= 9.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}P\\left(9\\right)=380\\left(9\\right)+6,200\\hfill \\\\ \\text{}P\\left(9\\right)=9,620\\hfill \\end{array}[\/latex]<\/p>\n<p>If the trend continues, our model predicts a population of 9,620 in 2013.<\/p>\n<p>To find when the population will reach 15,000, we can set [latex]P\\left(t\\right)=15000[\/latex] and solve for <em>t<\/em>.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}15000=380t+6200\\hfill \\\\ \\text{ }8800=380t\\hfill \\\\ \\text{ }t\\approx 23.158\\hfill \\end{array}[\/latex]<\/p>\n<p>Our model predicts the population will reach 15,000 in a little more than 23 years after 2004, or somewhere around the year 2027.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p>A company sells doughnuts. They incur a fixed cost of $25,000 for rent, insurance, and other expenses. It costs $0.25 to produce each doughnut.<\/p>\n<ol>\n<li>Write a linear model to represent the cost <em>C<\/em>\u00a0of the company as a function of <em>x<\/em>, the number of doughnuts produced.<\/li>\n<li>Find and interpret the <em>y<\/em>-intercept.<\/li>\n<\/ol>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q218698\">Show Solution<\/span><\/p>\n<div id=\"q218698\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]C\\left(x\\right)=0.25x+25,000[\/latex] The <em>y<\/em>-intercept is (0, 25,000). If the company does not produce a single doughnut, they still incur a cost of $25,000.<\/p>\n<\/div>\n<\/div>\n<p><iframe loading=\"lazy\" id=\"mom200\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=1425&amp;theme=oea&amp;iframe_resize_id=mom200\" width=\"100%\" height=\"250\"><\/iframe><\/p>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p>A city\u2019s population has been growing linearly. In 2008, the population was 28,200. By 2012, the population was 36,800. Assume this trend continues.<\/p>\n<ol>\n<li>Predict the population in 2014.<\/li>\n<li>Identify the year in which the population will reach 54,000.<\/li>\n<\/ol>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q171054\">Show Solution<\/span><\/p>\n<div id=\"q171054\" class=\"hidden-answer\" style=\"display: none\">\n<p>41,100;\u00a02020<\/p><\/div>\n<\/div>\n<p><iframe loading=\"lazy\" id=\"mom200\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=3483&amp;theme=oea&amp;iframe_resize_id=mom200\" width=\"100%\" height=\"450\"><\/iframe><\/p>\n<\/div>\n<h3>Using a Diagram to Model a Problem<\/h3>\n<p>It is useful for many real-world applications to draw a picture to gain a sense of how the variables representing the input and output may be used to answer a question. To draw the picture, first consider what the problem is asking for. Then, determine the input and the output. The diagram should relate the variables. Often, geometric shapes or figures are drawn. Distances are often traced out. If a right triangle is sketched, the Pythagorean Theorem relates the sides. If a rectangle is sketched, labeling width and height is helpful.<\/p>\n<div class=\"textbox exercises\">\n<h3>Example: Using a Diagram to Model Distance Walked<\/h3>\n<p>Anna and Emanuel start at the same intersection. Anna walks east at 4 miles per hour while Emanuel walks south at 3 miles per hour. They are communicating with a two-way radio that has a range of 2 miles. How long after they start walking will they fall out of radio contact?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q960486\">Show Solution<\/span><\/p>\n<div id=\"q960486\" class=\"hidden-answer\" style=\"display: none\">\n<p>In essence, we can partially answer this question by saying they will fall out of radio contact when they are 2 miles apart, which leads us to ask a new question:\u00a0&#8220;How long will it take them to be 2 miles apart?&#8221;<\/p>\n<p>In this problem, our changing quantities are time and position, but ultimately we need to know how long will it take for them to be 2 miles apart. We can see that time will be our input variable, so we\u2019ll define our input and output variables.<\/p>\n<ul>\n<li>Input: <em>t<\/em>, time in hours.<\/li>\n<li>Output: [latex]A\\left(t\\right)[\/latex], distance in miles, and [latex]E\\left(t\\right)[\/latex], distance in miles<\/li>\n<\/ul>\n<p>Because it is not obvious how to define our output variable, we\u2019ll start by drawing a picture.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011920\/CNX_Precalc_Figure_02_03_0032.jpg\" alt=\"Picture of one person walking south and another walking in a perpendicular direction (east) from the other, a line is drawn between them to make a right triangle.\" width=\"487\" height=\"364\" \/><\/p>\n<p>Initial Value: They both start at the same intersection so when [latex]t=0[\/latex], the distance traveled by each person should also be 0. Thus the initial value for each is 0.<\/p>\n<p>Rate of Change: Anna is walking 4 miles per hour and Emanuel is walking 3 miles per hour, which are both rates of change. The slope for <em>A<\/em>\u00a0is 4 and the slope for <em>E<\/em>\u00a0is 3.<\/p>\n<p>Using those values, we can write formulas for the distance each person has walked.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}A\\left(t\\right)=4t\\\\ E\\left(t\\right)=3t\\end{array}[\/latex]<\/p>\n<p>For this problem, the distances from the starting point are important. To notate these, we can define a coordinate system, identifying the &#8220;starting point&#8221; at the intersection where they both started. Then we can use the variable, <em>A<\/em>, which we introduced above, to represent Anna\u2019s position and define it to be a measurement from the starting point in the eastward direction. Likewise, can use the variable, <em>E<\/em>, to represent Emanuel\u2019s position measured from the starting point in the southward direction. Note that in defining the coordinate system, we specified both the starting point of the measurement and the direction of measure.<\/p>\n<p>We can then define a third variable, <em>D<\/em>, to be the measurement of the distance between Anna and Emanuel. Showing the variables on the diagram is often helpful.<\/p>\n<p>Recall that we need to know how long it takes for <em>D<\/em>, the distance between them, to equal 2 miles. Notice that for any given input <em>t<\/em>, the outputs <em>A<\/em>(<em>t<\/em>), <em>E<\/em>(<em>t<\/em>), and <em>D<\/em>(<em>t<\/em>) represent distances.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011923\/CNX_Precalc_Figure_02_03_0042.jpg\" width=\"487\" height=\"363\" alt=\"image\" \/><\/p>\n<p>This picture\u00a0shows us that we can use the Pythagorean Theorem because we have drawn a right triangle.<\/p>\n<p>Using the Pythagorean Theorem, we get:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{lllllll}D{\\left(t\\right)}^{2}=A{\\left(t\\right)}^{2}+E{\\left(t\\right)}^{2}\\hfill & \\hfill \\\\ D{\\left(t\\right)}^{2}={\\left(4t\\right)}^{2}+{\\left(3t\\right)}^{2}\\hfill & \\hfill \\\\ D{\\left(t\\right)}^{2}=16{t}^{2}+9{t}^{2}\\hfill & \\hfill \\\\ D{\\left(t\\right)}^{2}=25{t}^{2}\\hfill & \\hfill \\\\ \\text{}D\\left(t\\right)=\\pm \\sqrt{25{t}^{2}}\\hfill & \\text{Solve for }D\\left(t\\right)\\text{by taking the square root of each side of the equation}\\hfill \\\\ D{\\left(t\\right)}=\\pm 5t\\hfill & \\hfill \\end{array}[\/latex]<\/p>\n<p>In this scenario we are considering only positive values of [latex]t[\/latex], so our distance <em>D<\/em>(<em>t<\/em>) will always be positive. We can simplify this answer to <em>D<\/em>(<em>t<\/em>) = 5<em>t<\/em>. This means that the distance between Anna and Emanuel is also a linear function. Because <em>D<\/em>\u00a0is a linear function, we can now answer the question of when the distance between them will reach 2 miles. We will set the output <em>D<\/em>(<em>t<\/em>) = 2 and solve for <em>t<\/em>.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}D\\left(t\\right)=2\\hfill \\\\ \\text{ }5t=2\\hfill \\\\ \\text{ }t=\\frac{2}{5}=0.4\\hfill \\end{array}[\/latex]<\/p>\n<p>They will fall out of radio contact in 0.4 hours, or 24 minutes.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox\">\n<h3>Q &amp; A<\/h3>\n<p><strong>Should I draw diagrams when given information based on a geometric shape?<\/strong><\/p>\n<p><em>Yes. Sketch the figure and label the quantities and unknowns on the sketch.<\/em><\/p>\n<\/div>\n<div class=\"textbox exercises\">\n<h3>Example: Using a Diagram to Model Distance between Cities<\/h3>\n<p>There is a straight road leading from the town of Westborough to Agritown 30 miles east and 10 miles north. A certain distance down this road, it junctions with a second road, perpendicular to the first, leading to the town of Eastborough. If the town of Eastborough is located 20 miles directly east of the town of Westborough, how far is the road junction from Westborough?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q156610\">Show Solution<\/span><\/p>\n<div id=\"q156610\" class=\"hidden-answer\" style=\"display: none\">\n<p>It might help here to draw a picture of the situation.\u00a0It would then be helpful to introduce a coordinate system. While we could place the origin anywhere, placing it at Westborough seems convenient. This puts Agritown at coordinates (30, 10), and Eastborough at (20, 0).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19011924\/CNX_Precalc_Figure_02_03_0052.jpg\" alt=\"Picture of a line passing through the origin and the point (30,10), another line is drawn perpendicular to it and crosses the x-axis at the point (20,0)\" width=\"487\" height=\"151\" \/><\/p>\n<p>Using this point along with the origin, we can find the slope of the line from Westborough to Agritown:<\/p>\n<p style=\"text-align: center;\">[latex]m=\\frac{10 - 0}{30 - 0}=\\frac{1}{3}[\/latex]<\/p>\n<p>The equation of the road from Westborough to Agritown would be<\/p>\n<p style=\"text-align: center;\">[latex]W\\left(x\\right)=\\frac{1}{3}x[\/latex]<\/p>\n<p>From this, we can determine the perpendicular road to Eastborough will have slope [latex]m=-3[\/latex]. Because the town of Eastborough is at the point (20, 0), we can find the equation:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}E\\left(x\\right)=-3x+b\\hfill & \\hfill \\\\ 0=-3\\left(20\\right)+b\\hfill & \\text{Substitute in (20, 0)}\\hfill \\\\ b=60\\hfill & \\hfill \\\\ E\\left(x\\right)=-3x+60\\hfill & \\hfill \\end{array}[\/latex]<\/p>\n<p>We can now find the coordinates of the junction of the roads by finding the intersection of these lines. Setting them equal,<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{lllllll}\\text{ }\\frac{1}{3}x=-3x+60\\hfill & \\hfill \\\\ \\frac{10}{3}x=60\\hfill & \\hfill \\\\ 10x=180\\hfill & \\hfill \\\\ \\text{ }x=18\\hfill & \\text{Substituting this back into }W\\left(x\\right)\\hfill \\\\ \\text{ }y=W\\left(18\\right)\\hfill & \\hfill \\\\ \\text{ }y=\\frac{1}{3}\\left(18\\right)\\hfill & \\hfill \\\\ \\text{ }y=6\\hfill & \\hfill \\end{array}[\/latex]<\/p>\n<p>The roads intersect at the point (18, 6). Using the distance formula, we can now find the distance from Westborough to the junction.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\text{distance}=\\sqrt{{\\left({x}_{2}-{x}_{1}\\right)}^{2}+{\\left({y}_{2}-{y}_{1}\\right)}^{2}}\\hfill \\\\ \\text{ }=\\sqrt{{\\left(18 - 0\\right)}^{2}+{\\left(6 - 0\\right)}^{2}}\\hfill \\\\ \\text{ }\\approx 18.974\\text{ miles}\\hfill \\end{array}[\/latex]<\/p>\n<h4>Analysis of the Solution<\/h4>\n<p>One nice use of linear models is to take advantage of the fact that the graphs of these functions are lines. This means real-world applications discussing maps need linear functions to model the distances between reference points.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p>There is a straight road leading from the town of Timpson to Ashburn 60 miles east and 12 miles north. Partway down the road, it junctions with a second road, perpendicular to the first, leading to the town of Garrison. If the town of Garrison is located 22 miles directly east of the town of Timpson, how far is the road junction from Timpson?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q788968\">Show Solution<\/span><\/p>\n<div id=\"q788968\" class=\"hidden-answer\" style=\"display: none\">\n<p>approx. 21.57 miles<\/p><\/div>\n<\/div>\n<p><iframe loading=\"lazy\" id=\"mom900\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=49643&amp;theme=oea&amp;iframe_resize_id=mom900\" width=\"100%\" height=\"550\"><\/iframe><\/p>\n<\/div>\n<h2>Fitting Linear Models to Data<\/h2>\n<p>A professor is attempting to identify trends among final exam scores. His class has a mixture of students, so he wonders if there is any relationship between age and final exam scores. One way for him to analyze the scores is by creating a diagram that relates the age of each student to the exam score received. In this section, we will examine one such diagram known as a scatter plot.<\/p>\n<p>A <strong>scatter plot<\/strong> is a graph of plotted points that may show a relationship between two sets of data. If the relationship is from a <strong>linear model<\/strong>, or a model that is nearly linear, the professor can draw conclusions using his knowledge of linear functions. Below is\u00a0a sample scatter plot.<\/p>\n<div style=\"width: 497px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014335\/CNX_Precalc_Figure_02_04_0012.jpg\" alt=\"Scatter plot, titled 'Final Exam Score VS Age'. The x-axis is the age, and the y-axis is the final exam score. The range of ages are between 20s - 50s, and the range for scores are between upper 50s and 90s.\" width=\"487\" height=\"337\" \/><\/p>\n<p class=\"wp-caption-text\">A scatter plot of age and final exam score variables.<\/p>\n<\/div>\n<p>Notice this scatter plot does <em>not<\/em> indicate a <strong>linear relationship<\/strong>. The points do not appear to follow a trend. In other words, there does not appear to be a relationship between the age of the student and the score on the final exam.<\/p>\n<div class=\"textbox exercises\">\n<h3>\u00a0Example: Using a Scatter Plot to Investigate Cricket Chirps<\/h3>\n<p>The table below\u00a0shows the number of cricket chirps in 15 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-1063-1\" href=\"#footnote-1063-1\" aria-label=\"Footnote 1\"><sup class=\"footnote\">[1]<\/sup><\/a> Plot this data and determine whether the data appears to be linearly related.<\/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>44<\/td>\n<td>35<\/td>\n<td>20.4<\/td>\n<td>33<\/td>\n<td>31<\/td>\n<td>35<\/td>\n<td>18.5<\/td>\n<td>37<\/td>\n<td>26<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>80.5<\/td>\n<td>70.5<\/td>\n<td>57<\/td>\n<td>66<\/td>\n<td>68<\/td>\n<td>72<\/td>\n<td>52<\/td>\n<td>73.5<\/td>\n<td>53<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q579142\">Show Solution<\/span><\/p>\n<div id=\"q579142\" class=\"hidden-answer\" style=\"display: none\">\n<p>Plotting this data\u00a0suggests that there may be a trend. We can see from the trend in the data that the number of chirps increases as the temperature increases. The trend appears to be roughly linear, though certainly not perfectly so.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014337\/CNX_Precalc_Figure_02_04_0022.jpg\" alt=\"Scatter plot, titled 'Cricket Chirps Vs Air Temperature'. The x-axis is the Cricket Chirps in 15 Seconds, and the y-axis is the Temperature (F). The line regression is generally positive.\" width=\"487\" height=\"386\" \/>\n<\/div>\n<\/div>\n<\/div>\n<h3>Finding the Line of Best Fit<\/h3>\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 <em>y<\/em>-intercept. We can approximate the slope of the line by extending it until we can estimate the [latex]\\frac{\\text{rise}}{\\text{run}}[\/latex].<\/p>\n<div class=\"textbox exercises\">\n<h3>Example: Finding a Line of Best Fit<\/h3>\n<p>Find a linear function that fits the data in the table below\u00a0by &#8220;eyeballing&#8221; a line that seems to fit.<\/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> <\/colgroup>\n<tbody>\n<tr>\n<td><strong>Chirps<\/strong><\/td>\n<td>44<\/td>\n<td>35<\/td>\n<td>20.4<\/td>\n<td>33<\/td>\n<td>31<\/td>\n<td>35<\/td>\n<td>18.5<\/td>\n<td>37<\/td>\n<td>26<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>80.5<\/td>\n<td>70.5<\/td>\n<td>57<\/td>\n<td>66<\/td>\n<td>68<\/td>\n<td>72<\/td>\n<td>52<\/td>\n<td>73.5<\/td>\n<td>53<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q768322\">Show Solution<\/span><\/p>\n<div id=\"q768322\" class=\"hidden-answer\" style=\"display: none\">\n<p>On a graph, we could try sketching a line.<\/p>\n<p>Using the starting and ending points of our hand drawn line, points (0, 30) and (50, 90), this graph has a slope of [latex]m=\\frac{60}{50}=1.2[\/latex] and a <em>y<\/em>-intercept at 30. This gives an equation of [latex]T\\left(c\\right)=1.2c+30[\/latex]<\/p>\n<p>where <em>c<\/em>\u00a0is the number of chirps in 15 seconds, and <em>T<\/em>(<em>c<\/em>)\u00a0is the temperature in degrees Fahrenheit. The resulting equation is represented in the graph below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014339\/CNX_Precalc_Figure_02_04_0032.jpg\" alt=\"Scatter plot, showing the line of best fit. It is titled 'Cricket Chirps Vs Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.\" width=\"487\" height=\"432\" \/><\/p>\n<h4>Analysis of the Solution<\/h4>\n<p>This linear equation can then be used to approximate answers to various questions we might ask about the trend.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"mom200\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=3681&amp;theme=oea&amp;iframe_resize_id=mom200\" width=\"100%\" height=\"250\"><\/iframe><\/p>\n<\/div>\n<h3>Recognizing Interpolation or Extrapolation<\/h3>\n<p>While the data for most examples does not fall perfectly on the line, the equation is our best guess as to how the relationship will behave outside of the values for which we have data. We use a process known as <strong>interpolation<\/strong> when we predict a value inside the domain and range of the data. The process of <strong>extrapolation<\/strong> is used when we predict a value outside the domain and range of the data.<\/p>\n<p>The graph below compares the two processes for the cricket-chirp data addressed in the previous example. We can see that interpolation would occur if we used our model to predict temperature when the values for chirps are between 18.5 and 44. Extrapolation would occur if we used our model to predict temperature when the values for chirps are less than 18.5 or greater than 44.<\/p>\n<p>There is a difference between making predictions inside the domain and range of values for which we have data and outside that domain and range. Predicting a value outside of the domain and range has its limitations. When our model no longer applies after a certain point, it is sometimes called <strong>model breakdown<\/strong>. For example, predicting a cost function for a period of two years may involve examining the data where the input is the time in years and the output is the cost. But if we try to extrapolate a cost when [latex]x=50[\/latex], that is, in 50 years, the model would not apply because we could not account for factors fifty years in the future.<\/p>\n<div style=\"width: 497px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014341\/CNX_Precalc_Figure_02_04_0042.jpg\" alt=\"Scatter plot, showing the line of best fit and where interpolation and extrapolation occurs. It is titled 'Cricket Chirps Vs Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.\" width=\"487\" height=\"430\" \/><\/p>\n<p class=\"wp-caption-text\">Interpolation occurs within the domain and range of the provided data whereas extrapolation occurs outside.<\/p>\n<\/div>\n<div class=\"textbox\">\n<h3>A General Note: Interpolation and Extrapolation<\/h3>\n<p>Different methods of making predictions are used to analyze data.<\/p>\n<ul>\n<li>The method of <strong>interpolation<\/strong> involves predicting a value inside the domain and\/or range of the data.<\/li>\n<li>The method of <strong>extrapolation<\/strong> involves predicting a value outside the domain and\/or range of the data.<\/li>\n<li><strong>Model breakdown<\/strong> occurs at the point when the model no longer applies.<\/li>\n<\/ul>\n<\/div>\n<div class=\"textbox exercises\">\n<h3>Example: Understanding Interpolation and Extrapolation<\/h3>\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>44<\/td>\n<td>35<\/td>\n<td>20.4<\/td>\n<td>33<\/td>\n<td>31<\/td>\n<td>35<\/td>\n<td>18.5<\/td>\n<td>37<\/td>\n<td>26<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>80.5<\/td>\n<td>70.5<\/td>\n<td>57<\/td>\n<td>66<\/td>\n<td>68<\/td>\n<td>72<\/td>\n<td>52<\/td>\n<td>73.5<\/td>\n<td>53<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Use the cricket data above\u00a0to answer the following questions:<\/p>\n<ol>\n<li>Would predicting the temperature when crickets are chirping 30 times in 15 seconds be interpolation or extrapolation? Make the prediction, and discuss whether it is reasonable.<\/li>\n<li>Would predicting the number of chirps crickets will make at 40 degrees be interpolation or extrapolation? Make the prediction, and discuss whether it is reasonable.<\/li>\n<\/ol>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q882447\">Show Solution<\/span><\/p>\n<div id=\"q882447\" class=\"hidden-answer\" style=\"display: none\">\n<ol>\n<li>The number of chirps in the data provided varied from 18.5 to 44. A prediction at 30 chirps per 15 seconds is inside the domain of our data so would be interpolation. Using our model:<br \/>\n[latex]\\begin{array}{l}T\\left(30\\right)=30+1.2\\left(30\\right)\\hfill \\\\ T\\left(30\\right)=66\\text{ degrees}\\hfill \\end{array}[\/latex]<br \/>\nBased on the data we have, this value seems reasonable.<\/li>\n<li>The temperature values varied from 52 to 80.5. Predicting the number of chirps at 40 degrees is extrapolation because 40 is outside the range of our data. Using our model:<br \/>\n[latex]\\begin{array}{l}40=30+1.2c\\hfill \\\\ 10=1.2c\\hfill \\\\ c\\approx 8.33\\hfill \\end{array}[\/latex]<\/li>\n<\/ol>\n<p>We can compare the regions of interpolation and extrapolation using the graph below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014345\/CNX_Precalc_Figure_02_04_0052.jpg\" alt=\"Scatter plot, showing the line of best fit and where interpolation and extrapolation occurs. It is titled 'Cricket Chirps Vs Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.\" width=\"485\" height=\"429\" \/><\/p>\n<h4>Analysis of the Solution<\/h4>\n<p>Our model predicts the crickets would chirp 8.33 times in 15 seconds. While this might be possible, we have no reason to believe our model is valid outside the domain and range. In fact, generally crickets stop chirping altogether at or below 50 degrees.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p>According to the data from the table in the cricket-chirp example, what temperature can we predict if we counted 20 chirps in 15 seconds?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q271439\">Show Solution<\/span><\/p>\n<div id=\"q271439\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]54^\\circ \\text{F}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h3>Finding the Line of Best Fit Using a Graphing Utility<\/h3>\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-1063-2\" href=\"#footnote-1063-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 spreadsheet and statistical software. Least squares regression is also called linear regression.<\/p>\n<div class=\"textbox exercises\">\n<h3>Example: Finding a Least Squares Regression Line<\/h3>\n<p>Find the least squares regression line using the cricket-chirp data in the table below.<\/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<tbody>\n<tr>\n<td><strong>Chirps<\/strong><\/td>\n<td>44<\/td>\n<td>35<\/td>\n<td>20.4<\/td>\n<td>33<\/td>\n<td>31<\/td>\n<td>35<\/td>\n<td>18.5<\/td>\n<td>37<\/td>\n<td>26<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>80.5<\/td>\n<td>70.5<\/td>\n<td>57<\/td>\n<td>66<\/td>\n<td>68<\/td>\n<td>72<\/td>\n<td>52<\/td>\n<td>73.5<\/td>\n<td>53<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q374127\">Show Solution<\/span><\/p>\n<div id=\"q374127\" class=\"hidden-answer\" style=\"display: none\">\nUsing a graphing calculator or statistical software:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Enter chirps data in the L1 column.<\/li>\n<li>Enter temperature data in the L2 column.<\/li>\n<li>On a graphing utility, select Linear Regression (LinReg). Using the cricket chirp data from earlier, with technology we obtain the equation [latex]T(c) = 30.281+1.143c[\/latex]<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<table summary=\"Two rows and ten columns. The first row is labeled, 'L1'. The second row is labeled is labeled, 'L2'. Reading the remaining rows as ordered pairs (i.e., (L2, L2), 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<tbody>\n<tr>\n<td><strong>x1<\/strong><\/td>\n<td>44<\/td>\n<td>35<\/td>\n<td>20.4<\/td>\n<td>33<\/td>\n<td>31<\/td>\n<td>35<\/td>\n<td>18.5<\/td>\n<td>37<\/td>\n<td>26<\/td>\n<\/tr>\n<tr>\n<td><b>y1<\/b><\/td>\n<td>80.5<\/td>\n<td>70.5<\/td>\n<td>57<\/td>\n<td>66<\/td>\n<td>68<\/td>\n<td>72<\/td>\n<td>52<\/td>\n<td>73.5<\/td>\n<td>53<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Analysis of the Solution<\/h4>\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 30 chirps in 15 seconds from 66 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<p>The graph of the scatter plot with the least squares regression line is shown below:<\/p>\n<div style=\"width: 497px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium\" src=\"https:\/\/cnx.org\/resources\/518bc40eb0e1068ac46e62e9f2a414854c98e0f6\/CNX_Precalc_Figure_02_04_006.jpg\" alt=\"Scatter plot, showing the line of best fit: T(c) = 30.281 + 1.143c. It is titled 'Cricket Chirps vs. Air Temperature'. The x-axis is 'c, Number of Chirps', and the y-axis is 'T(c), Temperature (F)'.\" width=\"487\" height=\"408\" \/><\/p>\n<p class=\"wp-caption-text\">Scatter plot, showing the line of best fit<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox\">\n<h3>Q &amp; A<\/h3>\n<p><strong>Will there ever be a case where two different lines will serve as the best fit for the data?<\/strong><\/p>\n<p><em>No. There is only one best fit line.<\/em><\/p>\n<\/div>\n<h2>Distinguish Between Linear and Nonlinear Relations<\/h2>\n<p>As we saw in the cricket-chirp example, some data exhibit strong linear trends, but other data, like the final exam scores plotted by age, are clearly nonlinear. Most calculators and computer software can also provide us with the <strong>correlation coefficient<\/strong>, which is a measure of how closely the line fits the data. Many graphing calculators require the user to turn a &#8220;diagnostic on&#8221; selection to find the correlation coefficient, which mathematicians label as <em>r<\/em>. The correlation coefficient provides an easy way to get an idea of how close to a line the data falls.<\/p>\n<p>We should compute the correlation coefficient only for data that follows a linear pattern or to determine the degree to which a data set is linear. If the data exhibits a nonlinear pattern, the correlation coefficient for a linear regression is meaningless. To get a sense of the relationship between the value of <em>r<\/em>\u00a0and the graph of the data, the image below\u00a0shows some large data sets with their correlation coefficients. Remember, for all plots, the horizontal axis shows the input and the vertical axis shows the output.<\/p>\n<div style=\"width: 911px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/10\/19014349\/CNX_Precalc_Figure_02_04_0072.jpg\" alt=\"A series of scatterplot graphs. Some are linear and some are not.\" width=\"901\" height=\"401\" \/><\/p>\n<p class=\"wp-caption-text\">Plotted data and related correlation coefficients. (credit: &#8220;DenisBoigelot,&#8221; Wikimedia Commons)<\/p>\n<\/div>\n<div class=\"textbox\">\n<h3>A General Note: Correlation Coefficient<\/h3>\n<p>The <strong>correlation coefficient<\/strong> is a value, <em>r<\/em>, between \u20131 and 1.<\/p>\n<ul>\n<li><em>r<\/em> &gt; 0 suggests a positive (increasing) relationship<\/li>\n<li><em>r<\/em> &lt; 0 suggests a negative (decreasing) relationship<\/li>\n<li>The closer the value is to 0, the more scattered the data.<\/li>\n<li>The closer the value is to 1 or \u20131, the less scattered the data is.<\/li>\n<\/ul>\n<\/div>\n<div class=\"textbox exercises\">\n<h3>Example: Finding a Correlation Coefficient<\/h3>\n<p>Calculate the correlation coefficient for cricket-chirp data in the table below.<\/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<tbody>\n<tr>\n<td><strong>Chirps<\/strong><\/td>\n<td>44<\/td>\n<td>35<\/td>\n<td>20.4<\/td>\n<td>33<\/td>\n<td>31<\/td>\n<td>35<\/td>\n<td>18.5<\/td>\n<td>37<\/td>\n<td>26<\/td>\n<\/tr>\n<tr>\n<td><strong>Temperature<\/strong><\/td>\n<td>80.5<\/td>\n<td>70.5<\/td>\n<td>57<\/td>\n<td>66<\/td>\n<td>68<\/td>\n<td>72<\/td>\n<td>52<\/td>\n<td>73.5<\/td>\n<td>53<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q520385\">Show Solution<\/span><\/p>\n<div id=\"q520385\" class=\"hidden-answer\" style=\"display: none\">\n<p>Your calculator or software will\u00a0provide you with the correlation coefficient when you use it to fit a linear regression. The correlation coefficients is labeled as <em>r\u00a0<\/em>= 0.951 for this dataset. This value is very close to 1 which suggests a strong increasing linear relationship.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h2>Use a Linear Model to Make Predictions<\/h2>\n<p>Once we determine that a set of data is linear using the correlation coefficient, we can use the regression line to make predictions. As we learned previously, a regression line is a line that is closest to the data in the scatter plot, which means that only one such line is a best fit for the data.<\/p>\n<div class=\"textbox exercises\">\n<h3>Example: Using a Regression Line to Make Predictions<\/h3>\n<p>Gasoline consumption in the United States has been steadily increasing. Consumption data from 1994 to 2004 is shown in the table below.<a class=\"footnote\" title=\"http:\/\/www.bts.gov\/publications\/national_transportation_statistics\/2005\/html\/table_04_10.html\" id=\"return-footnote-1063-3\" href=\"#footnote-1063-3\" aria-label=\"Footnote 3\"><sup class=\"footnote\">[3]<\/sup><\/a> Determine whether the trend is linear, and if so, find a model for the data. Use the model to predict the consumption in 2008.Is this an interpolation or an extrapolation?<\/p>\n<table id=\"Table_02_04_03\" summary=\"Two rows and twelve columns. The first row is labeled, 'Year'. The second row is labeled is labeled, 'Consumption (billions of gallons)'. Reading the remaining rows as ordered pairs (i.e., (Year, Consumption), we have the following values: ('94, 113), ('95, 116), ('96, 118), ('97, 119), ('98, 123), ('99, 125), ('00, 126), ('01, 128), ('02, 131), ('03, 133), and ('04, 136).\">\n<tbody>\n<tr>\n<td><strong>Year<\/strong><\/td>\n<td>&#8217;94<\/td>\n<td>&#8217;95<\/td>\n<td>&#8217;96<\/td>\n<td>&#8217;97<\/td>\n<td>&#8217;98<\/td>\n<td>&#8217;99<\/td>\n<td>&#8217;00<\/td>\n<td>&#8217;01<\/td>\n<td>&#8217;02<\/td>\n<td>&#8217;03<\/td>\n<td>&#8217;04<\/td>\n<\/tr>\n<tr>\n<td><strong>Consumption (billions of gallons)<\/strong><\/td>\n<td>113<\/td>\n<td>116<\/td>\n<td>118<\/td>\n<td>119<\/td>\n<td>123<\/td>\n<td>125<\/td>\n<td>126<\/td>\n<td>128<\/td>\n<td>131<\/td>\n<td>133<\/td>\n<td>136<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q671301\">Show Solution<\/span><\/p>\n<div id=\"q671301\" class=\"hidden-answer\" style=\"display: none\">\n<p>Let <em>t<\/em> represent years since 1994.<\/p>\n<p>Use your calculator or statistical software to create the equation for the regression line:<\/p>\n<p style=\"text-align: center;\">[latex]C\\left(t\\right)=113.318+2.209t[\/latex]<\/p>\n<p>The correlation coefficient was calculated to be 0.997, suggesting a very strong increasing linear trend.<\/p>\n<p>Using this to predict consumption in 2008, which is 14 years after 1994 [latex]\\left(t=14\\right)[\/latex],<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}C\\left(14\\right)=113.318+2.209\\left(14\\right)\\hfill \\\\ C\\left(14\\right)=144.244\\hfill \\end{array}[\/latex]<\/p>\n<p>The model predicts 144.244 billion gallons of gasoline consumption in 2008. This is an extrapolation because there is not a datapoint whose x1 value is 2008.<br \/>\nThe scatter plot of the data, including the least squares regression line, is shown below. Note how we changed the viewing window for the y-axis to 100 &lt; y &lt; 150.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p>Use your calculator or statistical software to find a linear regression for the following data, which represents the amount of time a scuba diver can spend underwater as a function of the depth of the water.<\/p>\n<table>\n<tbody>\n<tr>\n<td>Depth (feet)<\/td>\n<td>Time (minutes)<\/td>\n<\/tr>\n<tr>\n<td>50<\/td>\n<td>80<\/td>\n<\/tr>\n<tr>\n<td>60<\/td>\n<td>55<\/td>\n<\/tr>\n<tr>\n<td>70<\/td>\n<td>45<\/td>\n<\/tr>\n<tr>\n<td>80<\/td>\n<td>35<\/td>\n<\/tr>\n<tr>\n<td>90<\/td>\n<td>25<\/td>\n<\/tr>\n<tr>\n<td>100<\/td>\n<td>22<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>1) Write the equation for the least squares regression line.<\/p>\n<p><textarea aria-label=\"Your Answer\" rows=\"1\"><\/textarea><\/p>\n<p>2) According to the regression line, how long can a diver spend at a depth of 110 feet?<\/p>\n<p>3)How about 120 feet? Why doesn&#8217;t this make sense?<\/p>\n<p><textarea aria-label=\"Your Answer\" rows=\"1\"><\/textarea><\/p>\n<p>4) At what depth would the dive time be zero?<\/p>\n<p><textarea aria-label=\"Your Answer\" rows=\"1\"><\/textarea><\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q23398\">Show Solution<\/span><\/p>\n<div id=\"q23398\" class=\"hidden-answer\" style=\"display: none\">\n<p>1) The equation for the regression line is [latex]y=-1.1143x+127.24[\/latex]<br \/>\n2) A diver can spend [latex]y=-1.1143(110)+127.24=1.51[\/latex] minutes at a depth of 110 feet.<br \/>\n3) A diver can spend [latex]y=-1.1143(120)+127.24=-6.48[\/latex] minutes at a depth of 120 feet. This doesn&#8217;t make sense because a negative value for time doesn&#8217;t have any meaning.<br \/>\n4) To find at what depth the dive time would be zero, we need to set the regression equation equal to zero.<br \/>\n[latex]\\begin{array}{l}0=-1.1143x+127.24\\\\-127.24=-1.1143x\\\\114.19 = x\\end{array}[\/latex]<\/p>\n<p>A diver, at a depth of 114.19 feet, would have a dive time of 0 minutes.\n<\/p><\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>try it<\/h3>\n<p>Here are more data sets that you can plot in your calculator or statistical software. \u00a0Fit a linear regression for them then interpre the correlation coefficient to determine whether there appears to be a linear relationship.<\/p>\n<table>\n<tbody>\n<tr>\n<td>Depth of the Columbia River<\/td>\n<td>Water Velocity<\/td>\n<\/tr>\n<tr>\n<td>0.66<\/td>\n<td>1.55<\/td>\n<\/tr>\n<tr>\n<td>1.98<\/td>\n<td>1.11<\/td>\n<\/tr>\n<tr>\n<td>2.64<\/td>\n<td>1.42<\/td>\n<\/tr>\n<tr>\n<td>3.3<\/td>\n<td>1.39<\/td>\n<\/tr>\n<tr>\n<td>4.62<\/td>\n<td>1.39<\/td>\n<\/tr>\n<tr>\n<td>5.94<\/td>\n<td>1.14<\/td>\n<\/tr>\n<tr>\n<td>7.26<\/td>\n<td>0.91<\/td>\n<\/tr>\n<tr>\n<td>8.58<\/td>\n<td>0.59<\/td>\n<\/tr>\n<tr>\n<td>9.9<\/td>\n<td>0.59<\/td>\n<\/tr>\n<tr>\n<td>10.56<\/td>\n<td>0.41<\/td>\n<\/tr>\n<tr>\n<td>11.22<\/td>\n<td>0.22<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"width: 412px;\">\n<tbody>\n<tr style=\"height: 30px;\">\n<td style=\"width: 197.75px; height: 30px;\">% of Mississippi River in Crops (By Basin)<\/td>\n<td style=\"width: 192.25px; height: 30px;\">Nitrate Concentration (mg\/ L)<\/td>\n<\/tr>\n<tr style=\"height: 14.3379px;\">\n<td style=\"width: 197.75px; height: 14.3379px;\">2.4<\/td>\n<td style=\"width: 192.25px; height: 14.3379px;\">0.647<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">1.3<\/td>\n<td style=\"width: 192.25px; height: 14px;\">1.062<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">14.3<\/td>\n<td style=\"width: 192.25px; height: 14px;\">1.432<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">0.5<\/td>\n<td style=\"width: 192.25px; height: 14px;\">0.579<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">45.6<\/td>\n<td style=\"width: 192.25px; height: 14px;\">3.561<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">46.6<\/td>\n<td style=\"width: 192.25px; height: 14px;\">3.938<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">1.5<\/td>\n<td style=\"width: 192.25px; height: 14px;\">0.927<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">53.6<\/td>\n<td style=\"width: 192.25px; height: 14px;\">2.549<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">4.1<\/td>\n<td style=\"width: 192.25px; height: 14px;\">0.357<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td style=\"width: 197.75px; height: 14px;\">3.1<\/td>\n<td style=\"width: 192.25px; height: 14px;\">0.245<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"p1\">Dimensions of the Lava Dome in Mt. St. Helens, t = 0 on 18 October 1980 (eruption was 18 May 1980).<\/p>\n<table>\n<tbody>\n<tr>\n<td>Days<\/td>\n<td>Millions of Cubic Meters<\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>2.9<\/td>\n<\/tr>\n<tr>\n<td>70<\/td>\n<td>13<\/td>\n<\/tr>\n<tr>\n<td>109<\/td>\n<td>28<\/td>\n<\/tr>\n<tr>\n<td>173<\/td>\n<td>40<\/td>\n<\/tr>\n<tr>\n<td>242<\/td>\n<td>56<\/td>\n<\/tr>\n<tr>\n<td>322<\/td>\n<td>64<\/td>\n<\/tr>\n<tr>\n<td>376<\/td>\n<td>75<\/td>\n<\/tr>\n<tr>\n<td>547<\/td>\n<td>88<\/td>\n<\/tr>\n<tr>\n<td>603<\/td>\n<td>100<\/td>\n<\/tr>\n<tr>\n<td>699<\/td>\n<td>115<\/td>\n<\/tr>\n<tr>\n<td>872<\/td>\n<td>152<\/td>\n<\/tr>\n<tr>\n<td>922<\/td>\n<td>154<\/td>\n<\/tr>\n<tr>\n<td>1087<\/td>\n<td>173<\/td>\n<\/tr>\n<tr>\n<td>1343<\/td>\n<td>178<\/td>\n<\/tr>\n<tr>\n<td>1692<\/td>\n<td>212<\/td>\n<\/tr>\n<tr>\n<td>1858<\/td>\n<td>243<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"textbox shaded\">\n<h2>FYI<\/h2>\n<p>Divers who want or need to descend to depths greater than 100 feet employ different techniques and equipment to help them safely navigate the depth. For example, different gas mixtures or rebreather equipment may be used. \u00a0Gas mixtures such as oxygen, helium, and nitrogen can help to mitigate the narcotic effects of breathing gas at great depths.<a class=\"footnote\" title=\"https:\/\/en.wikipedia.org\/wiki\/Trimix_(breathing_gas)\" id=\"return-footnote-1063-4\" href=\"#footnote-1063-4\" aria-label=\"Footnote 4\"><sup class=\"footnote\">[4]<\/sup><\/a><\/p>\n<div id=\"attachment_2980\" style=\"width: 361px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2980\" class=\"wp-image-2980\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/12\/21212829\/Trevor_Jackson_returns_from_SS_Kyogle-300x225.jpg\" width=\"351\" height=\"263\" alt=\"image\" \/><\/p>\n<p id=\"caption-attachment-2980\" class=\"wp-caption-text\">A scuba diver using rebreather with open circuit bailout cylinders returning from a 600-foot (180 m) dive.<\/p>\n<\/div>\n<\/div>\n<h2><\/h2>\n<h2>Key Concepts<\/h2>\n<ul id=\"fs-id1165137785014\">\n<li>Scatter plots show the relationship between two sets of data.<\/li>\n<li>Scatter plots may represent linear or non-linear models.<\/li>\n<li>The line of best fit may be estimated or calculated using a calculator or statistical software.<\/li>\n<li>Interpolation can be used to predict values inside the domain and range of the data, whereas extrapolation can be used to predict values outside the domain and range of the data.<\/li>\n<li>The correlation coefficient, <span id=\"MathJax-Element-329-Frame\" class=\"MathJax\"><span id=\"MathJax-Span-4867\" class=\"math\"><span id=\"MathJax-Span-4868\" class=\"mrow\"><span id=\"MathJax-Span-4869\" class=\"semantics\"><span id=\"MathJax-Span-4870\" class=\"mrow\"><span id=\"MathJax-Span-4871\" class=\"mrow\"><em><span id=\"MathJax-Span-4872\" class=\"mi\">r<\/span><\/em><span id=\"MathJax-Span-4873\" class=\"mo\">,<\/span><\/span><\/span><\/span><\/span><\/span><\/span> indicates the degree of linear relationship between data.<\/li>\n<li>A regression line best fits the data.<\/li>\n<li>The least squares regression line is found by minimizing the squares of the distances of points from a line passing through the data and may be used to make predictions regarding either of the variables.<\/li>\n<\/ul>\n<h2>Glossary<\/h2>\n<dl id=\"fs-id1165137705061\" class=\"definition\">\n<dt><strong>correlation coefficient<\/strong><\/dt>\n<dd id=\"fs-id1165135250649\">a value, <em>r<\/em>, between \u20131 and 1 that indicates the degree of linear correlation of variables or how closely a regression line fits a data set.<\/dd>\n<\/dl>\n<dl id=\"fs-id1165137549428\" class=\"definition\">\n<dt><strong>extrapolation<\/strong><\/dt>\n<dd id=\"fs-id1165135485274\">predicting a value outside the domain and range of the data<\/dd>\n<\/dl>\n<dl id=\"fs-id1165135485278\" class=\"definition\">\n<dt><strong>interpolation<\/strong><\/dt>\n<dd id=\"fs-id1165135184191\">predicting a value inside the domain and range of the data<\/dd>\n<\/dl>\n<dl id=\"fs-id1165137761665\" class=\"definition\">\n<dt><strong>least squares regression<\/strong><\/dt>\n<dd id=\"fs-id1165135192379\">a statistical technique for fitting a line to data in a way that minimizes the differences between the line and data values<\/dd>\n<\/dl>\n<dl id=\"fs-id1165137446440\" class=\"definition\">\n<dt><strong>model breakdown<\/strong><\/dt>\n<dd id=\"fs-id1165137446445\">when a model no longer applies after a certain point<\/dd>\n<\/dl>\n\n\t\t\t <section class=\"citations-section\" role=\"contentinfo\">\n\t\t\t <h3>Candela Citations<\/h3>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <div id=\"citation-list-1063\">\n\t\t\t\t\t\t\t <div class=\"licensing\"><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Original<\/div><ul class=\"citation-list\"><li>Revision and Adaptation. <strong>Provided by<\/strong>: Lumen Learning. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><\/ul><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Shared previously<\/div><ul class=\"citation-list\"><li>College Algebra. <strong>Authored by<\/strong>: Abramson, Jay et al.. <strong>Provided by<\/strong>: OpenStax. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2\">http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: Download for free at http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2<\/li><li>Precalculus. <strong>Authored by<\/strong>: Jay Abramson, et al.. <strong>Provided by<\/strong>: OpenStax. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175\">http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: Download For Free at : http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175.<\/li><li>Question ID 1425. <strong>Authored by<\/strong>: unknown, mb Lippman, David. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: IMathAS Community License CC-BY + GPL<\/li><li>Question ID 3483. <strong>Authored by<\/strong>: Triplett, Shawn, mb Lippman, David. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: IMathAS Community License CC-BY + GPL<\/li><li>Question ID 49643. <strong>Authored by<\/strong>: Parsons, Marc, mb Sousa, James. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em>. <strong>License Terms<\/strong>: IMathAS Community License CC-BY + GPL<\/li><li>Scuba diver using rebreather with open circuit bailout cylinders returning from a 600-foot (180 m) dive. <strong>Authored by<\/strong>: Trevor Jackson. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"https:\/\/commons.wikimedia.org\/w\/index.php?curid=25988843\">https:\/\/commons.wikimedia.org\/w\/index.php?curid=25988843<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">CC BY-SA: Attribution-ShareAlike<\/a><\/em><\/li><\/ul><\/div>\n\t\t\t\t\t\t <\/div>\n\t\t\t\t\t <\/div>\n\t\t\t <\/section><hr class=\"before-footnotes clear\" \/><div class=\"footnotes\"><ol><li id=\"footnote-1063-1\">Selected data from <a href=\"http:\/\/classic.globe.gov\/fsl\/scientistsblog\/2007\/10\/\" target=\"_blank\" rel=\"noopener\">http:\/\/classic.globe.gov\/fsl\/scientistsblog\/2007\/10\/<\/a>. Retrieved Aug 3, 2010 <a href=\"#return-footnote-1063-1\" class=\"return-footnote\" aria-label=\"Return to footnote 1\">&crarr;<\/a><\/li><li id=\"footnote-1063-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-1063-2\" class=\"return-footnote\" aria-label=\"Return to footnote 2\">&crarr;<\/a><\/li><li id=\"footnote-1063-3\"><a href=\"http:\/\/www.bts.gov\/publications\/national_transportation_statistics\/2005\/html\/table_04_10.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.bts.gov\/publications\/national_transportation_statistics\/2005\/html\/table_04_10.html<\/a> <a href=\"#return-footnote-1063-3\" class=\"return-footnote\" aria-label=\"Return to footnote 3\">&crarr;<\/a><\/li><li id=\"footnote-1063-4\">https:\/\/en.wikipedia.org\/wiki\/Trimix_(breathing_gas) <a href=\"#return-footnote-1063-4\" class=\"return-footnote\" aria-label=\"Return to footnote 4\">&crarr;<\/a><\/li><\/ol><\/div>","protected":false},"author":21,"menu_order":25,"template":"","meta":{"_candela_citation":"[{\"type\":\"original\",\"description\":\"Revision and Adaptation\",\"author\":\"\",\"organization\":\"Lumen Learning\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"},{\"type\":\"cc\",\"description\":\"College Algebra\",\"author\":\"Abramson, Jay et al.\",\"organization\":\"OpenStax\",\"url\":\"http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"Download for free at http:\/\/cnx.org\/contents\/9b08c294-057f-4201-9f48-5d6ad992740d@5.2\"},{\"type\":\"cc\",\"description\":\"Precalculus\",\"author\":\"Jay Abramson, et al.\",\"organization\":\"OpenStax\",\"url\":\"http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"Download For Free at : http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175.\"},{\"type\":\"cc\",\"description\":\"Question ID 1425\",\"author\":\"unknown, mb Lippman, David\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"IMathAS Community License CC-BY + GPL\"},{\"type\":\"cc\",\"description\":\"Question ID 3483\",\"author\":\"Triplett, Shawn, mb Lippman, David\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"IMathAS Community License CC-BY + GPL\"},{\"type\":\"cc\",\"description\":\"Question ID 49643\",\"author\":\"Parsons, Marc, mb Sousa, James\",\"organization\":\"\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"IMathAS Community License CC-BY + GPL\"},{\"type\":\"cc\",\"description\":\"Scuba diver using rebreather with open circuit bailout cylinders returning from a 600-foot (180 m) dive\",\"author\":\"Trevor Jackson\",\"organization\":\"\",\"url\":\"https:\/\/commons.wikimedia.org\/w\/index.php?curid=25988843\",\"project\":\"\",\"license\":\"cc-by-sa\",\"license_terms\":\"\"}]","CANDELA_OUTCOMES_GUID":"","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1063","chapter","type-chapter","status-publish","hentry"],"part":5012,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/pressbooks\/v2\/chapters\/1063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/wp\/v2\/users\/21"}],"version-history":[{"count":23,"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/pressbooks\/v2\/chapters\/1063\/revisions"}],"predecessor-version":[{"id":5022,"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/pressbooks\/v2\/chapters\/1063\/revisions\/5022"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/pressbooks\/v2\/parts\/5012"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/pressbooks\/v2\/chapters\/1063\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/wp\/v2\/media?parent=1063"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/pressbooks\/v2\/chapter-type?post=1063"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/wp\/v2\/contributor?post=1063"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/tulsacc-collegealgebrapclc\/wp-json\/wp\/v2\/license?post=1063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}