0% found this document useful (0 votes)
23 views16 pages

Group6 EMD6M4A AS2.docx (Report)

This document outlines an assignment for a numerical methods course. It provides details on the course code, deadline, group members, assessment criteria, and marking rubrics. Students are to solve tasks, justify their work, and demonstrate computational approaches to be evaluated on correctly defining problems, developing solution plans, analyzing information, and interpreting findings.

Uploaded by

Mior Muaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views16 pages

Group6 EMD6M4A AS2.docx (Report)

This document outlines an assignment for a numerical methods course. It provides details on the course code, deadline, group members, assessment criteria, and marking rubrics. Students are to solve tasks, justify their work, and demonstrate computational approaches to be evaluated on correctly defining problems, developing solution plans, analyzing information, and interpreting findings.

Uploaded by

Mior Muaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

UNIVERSITI TEKNOLOGI MARA

ASSIGNMENT 2

COURSE : NUMERICAL METHODS WITH APPLICATIONS


COURSE CODE : MEC500
DEADLINE : WEEK 14
MODE : GROUP ASSIGNMENT

GROUP NO DUE DATE SUBMISSION DATE REMARKS


EMD6M4A 2/6/2021 2/6/2021

LECTURER NAME
DR. WAN SULAIMAN WAN MOHAMAD

No Name Student ID
1. NUR AYUNI BINTI MOHD SAWAL 2018801192
2. ABDUL HAKIM NADZMI BIN ABD RAHMAN 2018259958
3. MIOR MUHAMMAD MUAZ BIN MIOR HANIP 2018660092
4.
5.

Level Excellent Good Satisfactory Poor Very Poor


Guidelines
Scale
Scale 5 4 3 2 1

Weight Scale Total


CO / PO Assessment Criteria (Report)
(w) (y) (w * y)

CO3/PO3/C6 Solve the task and show justification 2.0

CO4/PO5/P4 Display computer computational approach 2.0

TOTAL 20%

REMARKS:
MARKING RUBRIC CO3
Scale 5 4 3 2 1
Marks
Criteria Excellent Good Satisfactory Poor Very Poor
Defining Student states the Student does
Student fails to
the problems and Student states the Student adequately not identify
define the problems
problem objectives clearly problems and defines the problems the problems
and objectives
and identifies objectives clearly. and objectives. and
adequately.
underlying issues. objectives.
Developing Student develops a
Student does
a plan to clear and concise
Student develops a Student develops an Student develops a not develop a
solve the plan to solve the
single plan and adequate plan and marginal plan and coherent plan
problem problem, offering
follows it to follows it to does not follow it to to solve the
alternative strategies,
conclusion and is conclusion and is conclusion and is problem and
and follows the plan
able to solve the able to solve the not able to solve the is not able to
to conclusion and is
problem. problem. problem. solve the
able to solve the
problem.
problem.
Collecting Student collects Student collects and Student collects Student collects Student
and information from analyzes adequate inadequate collects no
analyzing multiple sources information. information and information to viable
information and analyzes the performs basic perform meaningful information.
information in- analyses. analyses.
depth.
Interpreting Student provides a Student provides a Student provides an Student provides an Student does
findings logical logical adequate inadequate not interpret
and solving interpretation of interpretation of interpretation of interpretation of the
the the findings and the findings and the findings and the findings and findings/reach
problem clearly solves the solves the problem solves the problem does not derive a a conclusion
problem, offering but fails to provide but fails to provide logical solution to
alternative alternatives. alternatives. the problem.
solutions.
TOTAL

MARKING RUBRIC CO4


Scale 5 4 3 2 1
Marks
Criteria Excellent Good Satisfactory Poor Very Poor
Completed Completed at least Completed less
Completed 100% Does not comply
between 75-99% 50% of the than 50% of the
of requirements. with requirements.
of the requirements. requirements. requirements.
Delivery Delivered on time, Not delivered on
Delivered on time, Delivered on time, Not delivered on
and in the correct time or in the
and in the correct and in correct time or in the
format. correct format.
format. format. correct format.
Excellent use of
white space. No details on
Good use of white White space makes Poor use of white
Creatively program included.
space. Organized program easy to space, making code
Coding organized work. Disorganized and
work. Good use of read. Organized hard to read.
Standards Excellent use of messy use of white
variables and work. Good use of Disorganized and
variables and space, making code
constants variables. messy work.
constants. No a little hard to read.
magic numbers.
Does not execute
Executes without
Executes with due to syntax errors
Executes without errors. User Executes without
minimal errors. / runtime errors
errors, excellent prompts are errors. User
User prompts (endless loop,
Runtime user prompts, good understandable, prompts contain
contain little crashes etc.) User
use of symbols, and minimum use of little information,
information, poor prompts are
spacing in output. symbols or spacing poor design.
design. misleading or non-
in output.
existent.
Structured output Some output from Output from test No output as the
Output from test
Output from test cases is test cases is cases is not program cannot be
cases is included.
included. included included. executed
Thorough and
Thorough testing Testing has been Some testing has No testing has been
Testing organized testing
has been completed completed. been completed. completed.
has been completed
TOTAL
Table of Contents
LIST OF FIGURES ................................................................................................................................ 4
LIST OF TABLES .................................................................................................................................. 4
1. INTRODUCTION .......................................................................................................................... 5
2. PROBLEM STATEMENT ............................................................................................................. 6
3. OBJECTIVES ................................................................................................................................. 7
4. RESULTS AND DISCUSSION ..................................................................................................... 8
4.2 Numerical Method Concept for the problem ................................................................................ 8
4.3 Coding ........................................................................................................................................... 8
4.3 Result and Discussion ................................................................................................................. 10
5. CONCLUSIONS AND RECOMMENDATION .......................................................................... 15
6. REFERENCES ............................................................................................................................. 16
LIST OF FIGURES
Figure 1 linear regression MATLAB coding ............................................................................................. 8
Figure 2 polynomial regression MATLAB coding .................................................................................... 9
Figure 3result for coefficient, Sr, St and r2 ............................................................................................. 11
Figure 4 best fit graph for linear regression ......................................................................................... 11
Figure 5 result for coefficient, sr, st and r2 ............................................................................................ 13
Figure 6 best fit graph for polynomial regression................................................................................. 13

LIST OF TABLES
Table 1 linear regression data ............................................................................................................... 10
Table 2 polynomial regression data ...................................................................................................... 12
1. INTRODUCTION
We will often have occasion to fit curves to data points. The techniques developed for this
purpose can be divided into two general categories: regression and interpolation. Regression is
employed where there is a significant degree of error associated with the data. Experimental
results are often of this kind. For these situations, the strategy is to derive a single curve that
represents the general trend of the data without necessarily matching any individual points. In
contrast, interpolation is used where the objective is to determine intermediate values between
relatively error-free data points. Such is usually the case for tabulated information. For these
situations, the strategy is to fit a curve directly through the data points and use the
curve to predict the intermediate values.
Regression analysis is a reliable method of identifying which variables have impact on
a topic of interest. The process of performing a regression allows you to confidently determine
which factors matter most, which factors can be ignored, and how these factors influence each
other. In order to understand regression analysis fully, it’s essential to comprehend the
following terms:
Dependent Variable: This is the main factor that you’re trying to understand or predict.
Independent Variables: These are the factors that you hypothesize have an impact on your
dependent variable.
In this assignment, we are using two types of regression, linear regression and
polynomial regression. Linear regression comprises a predictor variable and a dependent
variable related to each other in a linear fashion. Linear regression involves the use of a best fit
line. Linear regression is use when the variables are related linearly. For example, if we are
forecasting the effect of increased advertising spend on sales. However, this analysis is
susceptible to outliers, so it should not be used to analyze big data sets. Polynomial regression is
a procedure for determining the coefficients of a polynomial of a second degree, or higher,
such that the polynomial best fits a given set of data points. As in linear regression, the
derivation of the equations that are used for determining the coefficients is based on minimizing
the total error. It is used when data points are present in a non-linear fashion.

We used these methods to calculate the data for fatal construction site accident. Each
day, on average, two construction workers die of work-related injuries in Malaysia. In fact, one
in five workplace fatalities are construction-related. The top causes of construction-related
fatalities are falls, struck-by an object, electrocution and caught between objects. Due to the
numerous hazards on construction sites, there are many safety precautions to protect workers.
But accidents still happen and, when they do, you pay the price with a life-changing
injury. Although the construction industry is subject to safety laws and codes to regulate the
field's uncertainty, many accidents still occur.

By using the method, we are plotting a set of data points on an x- and y-axis graph is
the initial stage in this regression analysis procedure. An analyst will build a line of greatest fit
using the least squares method to show the likely link between research variables.
2. PROBLEM STATEMENT
The construction industry is growing extremely progressive and profitable. It is one of the
topmost industries that contribute to the economy of a country. This industry provides
employment opportunities and enhances economic development, especially in developing
countries, such as China, India, Indonesia, and Malaysia. However, construction is a risky
activity in which different parties engage in myriad challenges in one environment. By
analysing secondary data from Malaysia Social Security Organization (SCOSO), found that
2,822 casual occupational injuries occurred in Malaysia with an average annual incidence of
9.2 fatal job-related injuries per 100,000 workers. Recently published data from the Department
of Occupational Safety and Health (DOSH) revealed that 1,116 work-related accidents
occurred over the period of 2011 to 2016 and that 37.85%–51.50% of accidents resulting in
non-permanent disability, permanent disability, and death occurred on construction sites.

The Malaysian construction sector is characterized by accident-prone work sites. Onsite


accidents interrupt projects and increase cost. Hence, work safety with respect to overall
construction activities should be prioritized to sustain the reputation of a company. At the same
time, risk hazard can be decreased by closely following procedures provided by the authorities.
Zhu et al believed that site safety regulations must be implemented to maintain work safety.
They proposed the use of Kalman device to predict the movements of workers and mobile
equipment on a work site. The commitment of the top management to safe work conditions
and that of workers to safe work attitude are required to maintain a safe work environment.
Management should become involved in the prevention of job-related accidents by showing
leadership and vision and by incorporating the appropriate safety targets, safety analysis, and
emergency procedures to existing safety regulations. Preventative regulations against job-
related accidents promote safe work conditions and habits, such as appropriate housekeeping,
site layout space availability, good communication, personal attitude, and personal
competency. Designing effective safety regulations for construction projects eliminates or
reduces hazards and provides an opportunity for a safe work environment.
3. OBJECTIVES
• To explain the variation in one variable (called the dependent variable), based on the
variation in one or more other variables (called the independent variables)
• Using curve fitting to determine the pattern of the data
• To discover curves that fit using computational tools and mathematical formulas
• To assess the use of numerical methods in the solution of engineering issues
4. RESULTS AND DISCUSSION

4.2 Numerical Method Concept for the problem

Linear regression
For this assignment, the data of the number of deaths during construction in 2005 until
2019 has been recorded in the excel and shown using linear regression method. The
linear regression method is a fit straight line to a set of n data point. The equation of
linear regression is 𝑓(𝑥) = 𝑎𝑜 + 𝑎1 𝑥 + 𝑒. 𝑎𝑜 (intercept), 𝑎1 (slope), 𝑒(residual). There
are 3 criteria for best fit linear regression which are minimizes the sum residuals,
minimize the sum of the absolute values of the residuals and minimizes the maximum
error of any individual point.

Polynomial regression
For MATLAB, the graph obtained is polynomial regression for number of deaths
during construction against year. This method is to minimize the sum of the squares of
the estimate residuals. The first order polynomial regression is only the straight line
that have large residual. The 2nd order polynomial regression has minimized the
residuals and the graph is in curve shape. The formula for the second order polynomial
regression is 𝑓(𝑥) = 𝑎𝑜 + 𝑎1 𝑥 + 𝑎2 𝑥 2 + 𝑒.

4.3 Coding

Linear regression

Figure 1 linear regression MATLAB coding


Polynomial regression

Figure 2 polynomial regression MATLAB coding


4.3 Result and Discussion

Linear regression
From the table below, the x and y are represented as the year and the number of deaths during construction, respectively for Malaysia in 2005 until 2019.

no x y X2 xy f(x) (y-ybar)2 (y-f(x))2


1 2005 81 4020025 162405 14656.5 5446.44 212445200.3
2 2006 64 4024036 128384 14663.8 3226.24 213154160
3 2007 76 4028049 152532 14671.1 4733.44 213016944
4 2008 113 4032064 226904 14678.4 11193.64 212150877.2
5 2009 47 4036081 94423 14685.7 1584.04 214291537.7
6 2010 88 4040100 176880 14693 6528.64 213306025
7 2011 109 4044121 219199 14700.3 10363.24 212906035.7
8 2012 73 4048144 146876 14707.6 4329.64 214171517.2
9 2013 84 4052169 169092 14714.9 5898.24 214063234.8
10 2014 89 4056196 179246 14722.2 6691.24 214130542.2
11 2015 140 4060225 282100 14729.5 17635.84 212853510.3
12 2016 160 4064256 322560 14736.8 23347.84 212483098.2
13 2017 183 4068289 369111 14744.1 30905.64 212025633.2
14 2018 169 4072324 341042 14751.4 26179.24 212646389.8
15 2019 144 4076361 290736 14758.7 18714.24 213589456.1
Total 2012 108 4048162.667 217432.6667 14707.6 11785.17333 213148944.1
Table 1 linear regression data
f(x) = 7.3x + 20
n 15
𝑎0 7.3
𝑎1 20

̅
𝑦 7.2
𝑆𝑡 24368
𝑆𝑟 9359.071429
𝑟2 0.615928

Figure 3result for coefficient, Sr, St and r2

Figure 4 best fit graph for linear regression


Polynomial regression
From table below, the x and y represent the year and the number of deaths during construction in Malaysia in 2005 until 2019
No x X2 X3 X4 y xy YX2 f(x) (y-ybar)2 (y-f(x))2
1 2005 4020025 8060150125 1.61606E+13 81 162405 325622025 2517075.75 5446.44 6.33526E+12
2 2006 4024036 8072216216 1.61929E+13 64 128384 257538304 2519594.88 3226.24 6.34804E+12
3 2007 4028049 8084294343 1.62252E+13 76 152532 306131724 2522115.27 4733.44 6.36068E+12
4 2008 4032064 8096384512 1.62575E+13 113 226904 455623232 2524636.92 11193.64 6.37322E+12
5 2009 4036081 8108486729 1.62899E+13 47 94423 189695807 2527159.83 1584.04 6.3863E+12
6 2010 4040100 8120601000 1.63224E+13 88 176880 355528800 2529684 6528.64 6.39886E+12
7 2011 4044121 8132727331 1.63549E+13 109 219199 440809189 2532209.43 10363.24 6.41153E+12
8 2012 4048144 8144865728 1.63875E+13 73 146876 295514512 2534736.12 4329.64 6.42452E+12
9 2013 4052169 8157016197 1.64201E+13 84 169092 340382196 2537264.07 5898.24 6.43728E+12
10 2014 4056196 8169178744 1.64527E+13 89 179246 361001444 2539793.28 6691.24 6.4501E+12
11 2015 4060225 8181353375 1.64854E+13 140 282100 568431500 2542323.75 17635.84 6.4627E+12
12 2016 4064256 8193540096 1.65182E+13 160 322560 650280960 2544855.48 23347.84 6.47548E+12
13 2017 4068289 8205738913 1.6551E+13 183 369111 744496887 2547388.47 30905.64 6.48826E+12
14 2018 4072324 8217949832 1.65838E+13 169 341042 688222756 2549922.72 26179.24 6.50124E+12
15 2019 4076361 8230172859 1.66167E+13 144 290736 586995984 2552458.23 18714.24 6.51431E+12
Total 2012 4048162.667 8144978400 1.63879E+13 108 217432.6667 437751688 2534747.88 11785.17333 6.42452E+12
Table 2 polynomial regression data
f(x) = 0.63x2 – 7.8x + 99
n 15
𝑎0 0.63
𝑎1 -7.8
𝑎2 99

̅
𝑦 7.2
𝑆𝑡 24368
𝑆𝑟 7720.415966
𝑟2 0.683174

Figure 5 result for coefficient, sr, st and r2

Figure 6 best fit graph for polynomial regression


Discussions
Polynomial regression is a type of regression analysis in which the relationship between the
independent and dependent variables is represented by an nth degree polynomial. The data of
the year from 2005 until 2019 against number of death during construction in Malaysia are
used as modelled in this project and using first order polynomial and the second order where it
fit the polynomial equation on the data with a curvilinear relationship between dependent
variables and independent variables.

The first order polynomial denotes a linear equation, whereas the second order polynomial
denotes a quadratic equation. When the points in the data are not captured by the linear
regression model and it fails to describe the best result, a polynomial is used. The r 2 must be
greater than or equal to one in order to be a perfect fit for the graph. As a result, it was
demonstrated that as the degree order polynomial increases, so does the model's performance.
The r2 is 0.615928 for the first order. In the meantime, r2 for second order is 0.683174,
indicating that the method is significant enough to define the best possible model.

Finally, there are some advantages and disadvantages to using polynomial regression to
complete the data. The advantage of using polynomial regression is that it works on any size
dataset and works very well on non-linear problems. The disadvantage is that the user must
select the right polynomial degree for good variance or bias trade off.
5. CONCLUSIONS AND RECOMMENDATION

CONCLUSION

In conclusion, polynomial regression analysis is the better method at fitting the


data than linear regression since polynomial regression gives approximation of the
relationship between the independent and dependent variable. As we can observed
through the line plotted in the graph between linear regression and polynomial
regression, linear regression line is not well fitted to the graph compared to polynomial
regression line as polynomial regression method has a low value of error. There is
always pros and cons of using certain method in numerical findings. As for the
polynomial regression, the pros and cons are:

Advantage

• It provides best approximation of the relationship between the dependent and


independent variable.
• Fits a broad range of function under it.
• Fits a wide range of curvature.

Disadvantage

• Too sensitive to the outliers.


• Fewer models validation tools.

Recommendation

In order to obtain a trustworthy result, below are some recommendations we can


practice.
i. Specify the correct models.
ii. Check the residual plot by making sure that the model fits the data adequately.
iii. Minimize the excessive multicollinearity.
6. REFERENCES
1. Chapra, S. C. (2015). In R. P. Canale, Numerical Methods for Engineers. New
York: McGraw-Hill Education.
2. Gilat, Amos (2014). Numerical methods for engineers and scientists : an
introduction with applications using MATLAB 3rd Edition. Ohio State
University : Don Fowley
3. Frost, J. (2021, April 12). Statistics by Jim - When Can I Use Regression.
Retrieved from Statistics by Jim: https://statisticsbyjim.com/regression/when-
use-regression-analysis/
4. Ghanim, H. A. (2020). Numerical method1 Linear regression. 13.
5. A. Adib, "Basics of linear regression," Meduim, 6 November 2018. [Online].
Available: https://medium.com/datadriveninvestor/basics-of-linear-regression-
9b529aeaa0a5. [Accessed 6 May 2020].

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy