Sunteți pe pagina 1din 6

Mech300 Numerical Methods, Hong Kong University of Science and Technology.

Part Five

Curve Fitting

1
Mech300 Numerical Methods, Hong Kong University of Science and Technology.

Motivation
y
sampling points In all practical engineering cases, the sampling data
are acquired at discrete points.
interpolation points
That means the function values at points other than
these sampling points are undefined; but they are
wanted in many applications.

Curve fitting tries to fit a continuous curve


through the sampling data that can then define the
function value at any point by interpolation.
x=c x x
y

In many cases, it is not required to find a curve


that fit exactly every sampling point; instead a
curve (e.g. the blue line) that shows the trend of
the function is wanted. This is called regression.

Example: how to prove g = 9.8 m/s2 ?


2
x
Mech300 Numerical Methods, Hong Kong University of Science and Technology.

Noncomputer Methods for Curve Fitting

Visually sketch a line that conforms to the data


(inaccurate)

Connect the data points consecutively by lines segments


(significant errors if the data are not evenly spaced or the
underlying relationship is highly curvilinear)

Connect the data points consecutively by simple curves


(too tedious and difficult to do manually)

3
Mech300 Numerical Methods, Hong Kong University of Science and Technology.

Simple Statistics

∑ yi 158.4
arithmetic mean : y= y= = 6.6
n 24

standard derivation : s y =
St
=
∑ yi − y ( ) 2

sy =
0.2170
= 0.097133
n −1 n −1 24 − 1

∑ yi − ( ∑ yi ) / n
2 2
variance : s 2y =
St
= s 2y = 0.097133 2 = 0.009435
n −1 n −1

sy 0.097133
coefficient of variance : c .v . = 100% c .v . = 100% = 1.47%
y 6.6
4
Mech300 Numerical Methods, Hong Kong University of Science and Technology.

The Normal Distribution

normal distribution

histogram

In most engineering applications, the sampling data set conforms to the


normal distribution if the size of the data set is sufficiently large.

For the normal distribution, the range defined by y − s y and y + s y will


encompass approximately 68 percent of the total measurement. Similarly,
the range between y − 2s y and y + 2s y will encompass approximately 95%.
5
Mech300 Numerical Methods, Hong Kong University of Science and Technology.

Overall Structure

S-ar putea să vă placă și