LocalFood, a company delivers food around your area, records its drivers' trips. They want to predict how much time it takes to finish the trip given number of miles, number of deliveries, and the area where customers live for future planning.  Assignment Miles Deliveries Area Time 1 100.0 4.0 Rural 9.3 2 50.0 3.0 Rural 4.8 3 100.0 4.0 Rural 8.9 4 100.0 2.0 Rural 6.5 5 50.0 2.0 Rural 4.2 6 80.0 2.0 Rural 6.2 7 75.0 3.0 Urban 7.4 8 65.0 4.0 Rural 6.0 9 90.0 3.0 Rural 7.6 10 90.0 2.0 Rural 6.1 11 50.0 5.0 Urban 7.0 12 45.0 6.0 Rural 7.0 13 85.0 5.0 Urban 9.6 14 65.0 2.0 Urban 6.5 15 40.0 6.0 Urban 7.2 16 50.0 3.0 Urban 6.0 17 75.0 5.0 Urban 9.9 18 75.0 4.0 Urban 8.6 19 65.0 3.0 Rural 4.9 20 90.0 3.0 Rural 7.5 2. On average, if a customer lives in an urban area, how much longer/shorter in time that LocalFood takes to finish the trip than when that customer lives in the rural area? 1. Predict the time the trip takes when a customer lives in Rural area, the number of deliveries are 4, and the number of miles are 85. Keep two decimal points. For example, if the trip is 3.25 unit longer, put in 3.25 for the answer. If the trip is 3.25 unit shorter, put in -3.25 for the answer.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

LocalFood, a company delivers food around your area, records its drivers' trips. They want to predict how much time it takes to finish the trip given number of miles, number of deliveries, and the area where customers live for future planning. 

Assignment Miles Deliveries Area Time
1 100.0 4.0 Rural 9.3
2 50.0 3.0 Rural 4.8
3 100.0 4.0 Rural 8.9
4 100.0 2.0 Rural 6.5
5 50.0 2.0 Rural 4.2
6 80.0 2.0 Rural 6.2
7 75.0 3.0 Urban 7.4
8 65.0 4.0 Rural 6.0
9 90.0 3.0 Rural 7.6
10 90.0 2.0 Rural 6.1
11 50.0 5.0 Urban 7.0
12 45.0 6.0 Rural 7.0
13 85.0 5.0 Urban 9.6
14 65.0 2.0 Urban 6.5
15 40.0 6.0 Urban 7.2
16 50.0 3.0 Urban 6.0
17 75.0 5.0 Urban 9.9
18 75.0 4.0 Urban 8.6
19 65.0 3.0 Rural 4.9
20 90.0 3.0 Rural 7.5

2. On average, if a customer lives in an urban area, how much longer/shorter in time that LocalFood takes to finish the trip than when that customer lives in the rural area?

1. Predict the time the trip takes when a customer lives in Rural area, the number of deliveries are 4, and the number of miles are 85. Keep two decimal points.

For example, if the trip is 3.25 unit longer, put in 3.25 for the answer. If the trip is 3.25 unit shorter, put in -3.25 for the answer.

Expert Solution
Step 1: Explanation
  1. To predict the time the trip takes for a customer living in a rural area, with 4 deliveries and 85 miles, we can use a linear regression model. This model will use the Miles, Deliveries, and Area features as inputs, and the Time as the target variable. The model will estimate the coefficients that minimize the mean squared error between the predictions and the actual values. To predict the time the trip takes, a simple linear regression model could be used. This model will take into account the relationship between the independent variables (miles, deliveries, and area) and the dependent variable (time). A linear regression model can be trained using the data provided, and then used to make a prediction for the given scenario. To keep the result to two decimal points, the result can be rounded.

Once the coefficients are estimated, we can use them to make predictions for new data. For example, with Miles=85, Deliveries=4, and Area=Rural, the prediction would be:

Time = coefficient_of_Miles * Miles + coefficient_of_Deliveries * Deliveries + coefficient_of_Area * Area

 

 

  1. To answer the second question, we can calculate the average difference in time between trips in rural and urban areas. This can be done by subtracting the average time for rural areas from the average time for urban areas. If the result is positive, it means that on average, it takes longer to finish the trip in an urban area compared to a rural area. If the result is negative, it means that on average, it takes shorter to finish the trip in an urban area compared to a rural area. To find out on average how much longer or shorter the trip takes when the customer lives in an urban area, we can compare the average trip time for urban and rural areas. To get the average trip time for each area, we can sum up the time for all trips in each area and divide by the number of trips in that area. The difference between the two averages will give us the answer.
 
 
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Topological Sort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education