Question

Part C (Based off week 12 workshop content) Since the implementation of the CityCycle scheme in October 2010, the Bris- bane

DATA: 

Month No.,Total CityCycle Trips
1,6075
2,7923
3,5057
4,3020
5,4178
6,6283
7,5945
8,7616
9,9497
10,7577
11,8194
12,11326
13,10908
14,11315
15,11102
16,14323
17,15003
18,16464
19,17794
20,18874
21,15755
22,19774
23,22297
24,21326
25,20553
26,19213
27,15966
28,16219
29,14573
30,18180
31,19678
32,19491
33,17495
34,19209
35,21593
36,21522
37,21843
38,20575
39,19600
40,22703
41,21912
42,24662
43,23783
44,24369
45,22640
46,25235
47,22473
48,24049
49,28844
50,26020
51,22956
52,23526
53,23140
54,30572
55,27720
56,28550
57,23973
58,28770
59,32159
60,30734
61,33994
62,30488
63,30625
64,30752
65,31016
66,34804
67,36596
68,37861
69,27677
70,35625
71,39151
72,37304
73,40865
74,40518
75,39848
76,44128
77,43110
78,47900
79,54225
80,52884
81,46830
82,57256
83,63803
84,67769
85,59458
86,62263
87,57141
88,64261
89,52937
90,63795
91,68497
92,69525
93,60628
94,68472
95,67046
96,62827
97,59943
98,71663
99,63112
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer :

AS FOR GIVEN DATA.

Matlab:

%Linear Regression
clc
M = csvread('CityCycleData.csv',1,0); %reading and storing in M
x = M(:,1); %Month number
y = M(:,2); %Total City Cycle Trips

figure, hold on
scatter(x,y)
% Yes from scatter plot we can see that the trend is approximately linear
% equation is in form: y = x1*x + intercept
% and values of x1 and intercept are mentioned in table of mdl
mdl = fitlm(x,y)

%function representing our linear equation
% y = mx + c
f = @(x) x*617.97 + (-2.1062);

SE = mdl.Coefficients(:,2);
SE = SE{:,'SE'};
alpha = 1 - 95/100;
crtical = 1 - alpha/2;
%interval for intercept and x with 95% confidence
interval = SE .* crtical

%Q4
%pValue is smalller than than alpha mentioned = 0.05 (pValue < alpha)
%so we can say that from observing table that
%the numbers of tickets are affected by months.

%Q5
%total sum of squares
SS_total = sum(y - mean(y))^2;
%regression sum of squres
SS_regression = sum(f(x) - mean(y))^2;

% Proportion of total variance of trip numbers that are being accounted for
% by month
R = 1 - SS_total / SS_regression

Screenshots :

CityCycleLinearRegression.m Linear Regression M csvread(CityCycleData.csv. 1,0); treading and 3toring in M SMonth number %To30 total sum of squares 31 SS total -sum (y - mean (y) )*2 %regression sum f squares 34ss_regression sum(f (x) - mean (y))2:8 104 o 0o oo 6 5 4 3 2 0 0 10 20 30 4050 60 70 80 90 100

Comment for any clarification, im there to help. Give thumbs up.

Add a comment
Know the answer?
Add Answer to:
DATA: Month No.,Total CityCycle Trips 1,6075 2,7923 3,5057 4,3020 5,4178 6,6283 7,5945 8,7616 9,9497 10,7577 11,8194...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Part C (Based off week 12 workshop content) Since the implementation of the CityCycle scheme in October 2010, the Bris-...

    Part C (Based off week 12 workshop content) Since the implementation of the CityCycle scheme in October 2010, the Bris- bane council has recorded the number of CityCycle trips every month. The results are available in the 'CityCycleData.csv' file on Blackboard 1. Import the data into MATLAB using the csvread function, and then visualise the data with the scatter function. Comment on whether a linear model would be appropriate to use 2. Use the fitlm function to conduct a linear...

  • all the codes should be done in matlab Part C (Based off week 12 workshop content) Since the implementation of the C...

    all the codes should be done in matlab Part C (Based off week 12 workshop content) Since the implementation of the CityCycle scheme in October 2010, the Bris- bane council has recorded the umber of City Cyele trips every month. The results are available in the CityCycleData.es file on Blackboard 1. Import the data into MATLAB using the csvread funetion, and then visualise the data with the scatter fnction Comment on whether a linear model would be appropriate to use....

  • DATA: Month No.,Total CityCycle Trips 1,6075 2,7923 3,5057 4,3020 5,4178 6,6283 7,5945 8,7616 9,9497 10,7577 11,8194...

    DATA: Month No.,Total CityCycle Trips 1,6075 2,7923 3,5057 4,3020 5,4178 6,6283 7,5945 8,7616 9,9497 10,7577 11,8194 12,11326 13,10908 14,11315 15,11102 16,14323 17,15003 18,16464 19,17794 20,18874 21,15755 22,19774 23,22297 24,21326 25,20553 26,19213 27,15966 28,16219 29,14573 30,18180 31,19678 32,19491 33,17495 34,19209 35,21593 36,21522 37,21843 38,20575 39,19600 40,22703 41,21912 42,24662 43,23783 44,24369 45,22640 46,25235 47,22473 48,24049 49,28844 50,26020 51,22956 52,23526 53,23140 54,30572 55,27720 56,28550 57,23973 58,28770 59,32159 60,30734 61,33994 62,30488 63,30625 64,30752 65,31016 66,34804 67,36596 68,37861 69,27677 70,35625 71,39151 72,37304 73,40865 74,40518 75,39848...

  • all the answers must be done please help and codes should be done in matlab Part C (Based off week 12 workshop...

    all the answers must be done please help and codes should be done in matlab Part C (Based off week 12 workshop content Sinee the implementation of the CityCyele scheme in October 2010, the Bris bane council has recorded the mamber of City Cycle trips every month The results are available in the CityCycleData.cov' fie on Blackboard 1. Import the data into MATLAB using the cavread fuaction, and the visualise the data with the scatter function Coenment on whether a...

  • Exercise 2. [Data analysis, requires R] For this questions use the bac data set from the...

    Exercise 2. [Data analysis, requires R] For this questions use the bac data set from the openintro library. To access this data set first install the package using install.packages ("openintro") (this only needs to be done once). Then load the pack- age into R with the command library(openintro). You can read about this data set in the help menu by entering the command ?openintro or help(openintro). Many people believe that gender, weight, drinking habits, and many other factors are much...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT