To fit a simple linear regression model to the data and to provide its equation (d = a*t + b), along with R2   Day Date Weekday Daily Demand Weekend 1 4/25/2016 Mon 297 0 2 4/26/2016 Tue 293 0 3 4/27/2016 Wed 327 0 4 4/28/2016 Thu 315 0 5 4/29/2016 Fri 348 0 6 4/30/2016 Sat 447 1 7 5/1/2016 Sun 431 1 8 5/2/2016 Mon 283 0 9 5/3/2016 Tue 326 0 10 5/4/2016 Wed 317 0 11 5/5/2016 Thu 345 0 12 5/6/2016 Fri 355 0 13 5/7/2016 Sat 428 1 14 5/8/2016 Sun 454 1 15 5/9/2016 Mon 305 0 16 5/10/2016 Tue 310 0 17 5/11/2016 Wed 350 0 18 5/12/2016 Thu 308 0 19 5/13/2016 Fri 366 0 20 5/14/2016 Sat 460 1 21 5/15/2016 Sun 427 1 22 5/16/2016 Mon 291 0 23 5/17/2016 Tue 325 0 24 5/18/2016 Wed 354 0 25 5/19/2016 Thu 322 0 26 5/20/2016 Fri 405 0 27 5/21/2016 Sat 442 1 28 5/22/2016 Sun 454 1 29 5/23/2016 Mon 318 0 30 5/24/2016 Tue 298 0 31 5/25/2016 Wed 355 0 32 5/26/2016 Thu 355 0 33 5/27/2016 Fri 374 0 34 5/28/2016 Sat 447 1 35 5/29/2016 Sun 463 1 36 5/30/2016 Mon 291 0 37 5/31/2016 Tue 319 0 38 6/1/2016 Wed 333 0 39 6/2/2016 Thu 339 0 40 6/3/2016 Fri 416 0 41 6/4/2016 Sat 475 1 42 6/5/2016 Sun 459 1 43 6/6/2016 Mon 319 0 44 6/7/2016 Tue 326 0 45 6/8/2016 Wed 356 0 46 6/9/2016 Thu 340 0 47 6/10/2016 Fri 395 0 48 6/11/2016 Sat 465 1 49 6/12/2016 Sun 453 1 50 6/13/2016 Mon 307 0 51 6/14/2016 Tue 324 0 52 6/15/2016 Wed 350 0 53 6/16/2016 Thu 348 0 54 6/17/2016 Fri 384 0 55 6/18/2016 Sat 474 1 56 6/19/2016 Sun 485 1

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
icon
Concept explainers
Topic Video
Question

To fit a simple linear regression model to the data and to provide its equation (d = a*t + b), along with R2

 

Day Date Weekday Daily Demand Weekend
1 4/25/2016 Mon 297 0
2 4/26/2016 Tue 293 0
3 4/27/2016 Wed 327 0
4 4/28/2016 Thu 315 0
5 4/29/2016 Fri 348 0
6 4/30/2016 Sat 447 1
7 5/1/2016 Sun 431 1
8 5/2/2016 Mon 283 0
9 5/3/2016 Tue 326 0
10 5/4/2016 Wed 317 0
11 5/5/2016 Thu 345 0
12 5/6/2016 Fri 355 0
13 5/7/2016 Sat 428 1
14 5/8/2016 Sun 454 1
15 5/9/2016 Mon 305 0
16 5/10/2016 Tue 310 0
17 5/11/2016 Wed 350 0
18 5/12/2016 Thu 308 0
19 5/13/2016 Fri 366 0
20 5/14/2016 Sat 460 1
21 5/15/2016 Sun 427 1
22 5/16/2016 Mon 291 0
23 5/17/2016 Tue 325 0
24 5/18/2016 Wed 354 0
25 5/19/2016 Thu 322 0
26 5/20/2016 Fri 405 0
27 5/21/2016 Sat 442 1
28 5/22/2016 Sun 454 1
29 5/23/2016 Mon 318 0
30 5/24/2016 Tue 298 0
31 5/25/2016 Wed 355 0
32 5/26/2016 Thu 355 0
33 5/27/2016 Fri 374 0
34 5/28/2016 Sat 447 1
35 5/29/2016 Sun 463 1
36 5/30/2016 Mon 291 0
37 5/31/2016 Tue 319 0
38 6/1/2016 Wed 333 0
39 6/2/2016 Thu 339 0
40 6/3/2016 Fri 416 0
41 6/4/2016 Sat 475 1
42 6/5/2016 Sun 459 1
43 6/6/2016 Mon 319 0
44 6/7/2016 Tue 326 0
45 6/8/2016 Wed 356 0
46 6/9/2016 Thu 340 0
47 6/10/2016 Fri 395 0
48 6/11/2016 Sat 465 1
49 6/12/2016 Sun 453 1
50 6/13/2016 Mon 307 0
51 6/14/2016 Tue 324 0
52 6/15/2016 Wed 350 0
53 6/16/2016 Thu 348 0
54 6/17/2016 Fri 384 0
55 6/18/2016 Sat 474 1
56 6/19/2016 Sun 485 1
Expert Solution
Step 1

To fit a simple linear regression line we first define the independent and the dependent variables.

Suppose d: dependent variable and t: independent variable

Then the regression equation of d on t is

d=a*t+b

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Application of Algebra
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman