Chapter 24. Data Modeling and Curve Fits


Two main branches of science are experimental and theoretical. While the two parties don't always see eye-to-eye, there is a symbiotic relationship between them. The experimentalist is chiefly concerned with observation and measurement of physical phenomenon . The theoretician incorporates the experimental data into mathematical models to analyze situations for which no experimental data exists.

Experimental data, particularly when different measurement techniques and facilities are used, generally has some scatter to it. Even if scatter is minimal, the data may very well follow a nonlinear curve with respect to its independent variable. An engineer or scientific analyst usually requires an analytical expression for a collection of data, one or more mathematical expressions that provide a good representation of the data collection.

In this chapter we will look at ways to model a collection of data and to develop curve fit relations to that data. A common method used to curve fit data is by using a least squares approximation . The coefficients of a mathematical expression are determined that minimize the sum of the square of the errors between the curve fit equation and the original data points.

The least squares fit process is generic and can be applied to any number of problems. Because it is generic, we will define it as part of a generic class library. Much of the code development work for the least squares fit source code was performed in Chapter 23. The generic part of the least squares fit solution process was implemented in a method defined in the DataModeling class. Problem-specific information is encapsulated in the Polynomial class, an instance of which is sent to the leastSquaresFit() method as an input argument.

In Chapter 23 we developed many of the classes and methods needed to implement a least squares fit to a collection of data. In this chapter we will outline the mathematical derivation of the least squares method showing the governing equations for both polynomial and nonpolynomial curve fit equations. We will also briefly discuss other techniques used to model a collection of data. The topics we will discuss in this chapter are ”

  • Least squares fit to a polynomial equation

  • The DataModeling class

  • The Polynomial class

  • Example problem: curve fitting specific heat data

  • Fitting to nonpolynomial equations

  • The Power class

  • Other data modeling techniques



Technical Java. Applications for Science and Engineering
Technical Java: Applications for Science and Engineering
ISBN: 0131018159
EAN: 2147483647
Year: 2003
Pages: 281
Authors: Grant Palmer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net