SOLUTION
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 :
all the codes should be done in matlab Part C (Based off week 12 workshop content) Since the implementation of the C...
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 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...
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...
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 codes should be done in matlab
Part A (Based off week 10 workshop content) Recently a study was performed on a Queeislad highway regarding the quan tity and speed of vehicles that use the road. It is your job to determine the probability of certain eveuts with the use of probability distributions For each question, clearly state which probability distribution the random variable follows. You mast solve each problem by band and werify using a MATLAB function 1....
the codes should be done in matlab and please answer all
questions.
Part B (Based off week 11 workshop content) An engineering ccmpony bas cedered steel to be used Soer a rail eustraction project. Before ing the steel they want to test it to eusure the materia properties from the supplier are correct A random sample of the ordered steel is tested for its Yield Strength The results are shown below 1. Caleulate the sample mean and sample vwrice by...