0% found this document useful (0 votes)
19 views19 pages

UNIT-4 Material 02

Uploaded by

jacklobescake
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)
19 views19 pages

UNIT-4 Material 02

Uploaded by

jacklobescake
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/ 19

PROBABILITY AND RANDOM VARIABLES

UNIT – IV
(CURVE FITTING)
Syllabus:
➢ Scatter diagram,
➢ Method of least squares,
➢ Fitting of a straight line,
➢ Fitting of second degree and kth degree polynomial,
➢ Fitting of exponential curve,
➢ Conversion of data to linear form,
➢ Selection of the type of curve to be fitted.

CURVE FITTING:
Generally, curve fitting falls into two main categories based on how we handle the observed
data:
Scatter diagram: The graphs that present the relationship between two variables in a data-set.
It represents data points on a two-dimensional plane or on a Cartesian system. The independent
variable or attribute is plotted on the X-axis, while the dependent variable is plotted on the Y-axis.
These plots are often called scatter graphs or scatter diagrams.
A scatter plot is also called a scatter chart, scattergram, or scatter plot, XY graph.
The scatter diagram graphs numerical data pairs, with one variable on each axis, show their
relationship.

Scatter Plot Uses and Examples:


Scatter plots instantly report a large volume of data. It is beneficial in the following
situations.

• For a large set of data points given,


• Each set comprises a pair of values,
• The given data is in numeric form.
When to use it:
Use a scatter diagram to examine theories about cause-and-effect relationships and to search
for root causes of an identified problem. Use a scatter diagram to design a control system to
ensure that gains from quality improvement efforts are maintained.
How to use it:
Collect data. Gather 50 to 100 paired samples of data that show a possible relationship.
Draw the Scatter diagram: Draw roughly equal horizontal and vertical axes of the diagram,
creating a square plotting area. Label the axes in convenient multiples (1, 2, 5, etc.) increasing
on the horizontal axes from left to right and on the vertical axis from bottom to top. Label both
axes.
Plot the paired data. Plot the data on the chart, using concentric circles to indicate repeated
data points.
Title and label the Scatter diagram.
Interpret the data. Scatter diagrams will generally show one of six possible correlations
between the variables:
✓ Strong Positive Correlation: The value of Y clearly increases as the value of X increases.
✓ Strong Negative Correlation: The value of Y clearly decreases as the value of X increases.
✓ Weak Positive Correlation: The value of Y increases slightly as the value of X increases.
✓ Weak Negative Correlation: The value of Y decreases slightly as the value of X increases.
✓ Complex Correlation: The value of Y seems to be related to the value of X, but the
relationship is not easily determined.
✓ No Correlation: There is no demonstrated connection between the two variables.
Method of least squares:

In general, the least squares method uses a straight line in order to fit through the given points
which are known as the method of linear or ordinary least squares. This line is termed as the
line of best fit from which the sum of squares of the distances from the points is minimized.
Geometrical interpretation of least squares:
The graphical method has the drawback in that the straight line drawn may not be unique, but
the principle of least squares provides a unique set of values to the constants and hence suggests
a curve of best fit to the given data. The method of least squares is probably the most systematic
procedure to fit a unique curve through the given data points.

Example-1:
By the method of least squares find the straight line to the data given below:
.
Example-2:

Home-Work-1:
Home-Work-2:

Home-Work-3:

Home-Work-4:

Fitting of Second-degree and kth-degree polynomial

Let

Which are the normal equations for the fitting of the second order-parabola.
Home-Work-1:
Home-Work-2:

Fitting of kth degree polynomial:


Generalizing from a straight line (i.e., first degree polynomial) to a kth degree polynomial

--------------

the normal equations are:

---------------

----------------

-------------

-----------------
Solving the above equations from the given tabular values, we get a, b, c, and d….values and after
that submit these values in kth degree polynomial.

Fitting of exponential curve:


x 0 0.5 1 1.5 2 2.5
y 0.10 0.45 2.15 9.15 40.35 180.75

Solving these equations, we get


Hence required.

Home-Work-1:

Home-Work-2:

Conversion of data to linear form:

We write Y = log y and X = log x. Then y = bX + log a which is a linear equation of the form
y = mx + c where m = b and c ='log a. If we plot values of Y (= log y) and X (= log x) and the
graph is a straight line, then the relationship is valid.

Selection of the type of curve to be fitted: There are two types, such are:
(i) The exponential equation 𝑦 = 𝑎𝑏 𝑥 taking logarithms on both sides, we get

which is linear in Y and x.


x 0 1 2 3 4 5 6
y 10 21 35 59 92 200 400
Solution: Given exponential curve 𝑦 = 𝑎𝑏 𝑥

Taking logarithms on both sides, we get

which is linear in Y and x.


Substituting these values in the normal equations
8A+28B=15.2893
28A+140B=64.1929,
Solving these equations, we get

Home-Work-1:

Home-Work-2:

Home-Work-3:

(ii) The Power fit calculates the least squares fit through points by using the following
equation:

where a and b are unknown constants, y be a dependent variable, and x-is an independent
variable. This model requires that x>0 for all data points, and either that all y>0 or all y<0.
Spotfire uses a nonlinear regression method for this calculation. This will result in better
accuracy of the calculation compared to using linear regression on transformed values only.
Taking logarithm on both sides, we get
Which is linear in Y and X.

Hence required.

x 2 3 4 5
y 27.8 62.1 110 161
Substituting these values in the normal equations
4A+2.0792b=7.4854
2.0792A+1.1693b=4.0618
Solving these two equations

2.0792A+1.1693b=4.0618
Hence Required.
Home-Work-1:

x 3 5 7 9 11
y 2.3 2.6 2.8 3.2 3.5

Home-Work-2:

@@End the Unit-4@@

Prepared By:

Dr. Shankar Rao Munjam., Ph.D., PDF( Shanghai)


Assistant Prof of Mathematics
Woxsen University, Hyderabad, Telangana, India
Email: [email protected]
Mobile No: +91-7989425842

You might also like