Docsity

Beta ray backscattering, Slides of Nuclear Physics

Partial preview of the text

Download Beta ray backscattering and more Slides Nuclear Physics in PDF only on Docsity!

COMPUTATIONAL

PHYSICS

PRESENTED BY : LIPIKA RATNESH

LIPASHA GANJEER

LEAST SQUARES CURVE FITTING METHOD

OBJECTIVES

Introduction to LS Fit How it works Designing a Fortran program for it Applications

LEAST SQUARES CURVE FITTING

  • LS fit is a mathematical procedure for finding the best-fitting curve that minimizes the sum of the squared differences between the observed data points and the values predicted by the curve.
  • For understanding this, we must have an idea about some statistical term such as mean, variance, standard deviation, correlation and regression coefficients.

Carl F. Gauss

WHY IS IT NAMED SO? One may consider the actual deviations instead of the squared differences then as being a signed quantity, the positive deviations can cancel the negatives. Now, if one can use the absolute value of the variables then that will have an advantage of avoiding cancellation of errors, but it is not a good function analytically as it is not differentiable and will also not allow to use tools from calculus. So we are left with option of taking the square of the deviations of the points.

HOW IT WORKS

Let (xi,yi) be the given set of points which is being best fitted by the curve y= f(x) such that

If ei is the error of approximation at x = xi, then we have;

ei =yi-f(xi)

We can write the sum of the squares of the errors as :

Now, the condition for error to be a minimum is that :

After differentiating with a and b respectively :

e

Y

X

Solving the previous two equations respectively, we get :

Further solving equation 1 and 2, we get :

START

Set the values of sum to zero Declare the variables Sx=Sx+x(i) Sy=Sy+y(i) Sx2=Sx2+x(i)x(i) Sy2=Sy2+y(i)y(i) Sxy=Sxy+x(i)*y(i) NEXT i PRINT A AND B END ๐‘Ž = ฯƒ ๐‘ฆ ฯƒ ๐‘ฅ^2 โˆ’ ฯƒ ๐‘ฅ ฯƒ ๐‘ฅ๐‘ฆ ๐‘› ฯƒ ๐‘ฅ^2 โˆ’ ฯƒ ๐‘ฅ 2 ๐‘ = ฯƒ ๐‘ฅ ฯƒ ๐‘ฆ โˆ’ ๐‘› ฯƒ ๐‘ฅ๐‘ฆ ฯƒ ๐‘ฅ 2 โˆ’ ๐‘› ฯƒ ๐‘ฅ^2 DO i=1,n FLOWCHART :

EXAMPLE 2 :

  • Taking log on both sides:

log(y) = log(a) + n*log(x)

  • Then, we can write this in the

form of straight line equation;

Y = A + n*X

  • Now using the formula for

slope and intercept we can

find out a and n

Fitting to a curve y= 0.497(x)^0.

APPLICATIONS Here are some of its applications :

  • Health and Fitness : LS fitting can be applied in analyzing personal health data, such as weight loss progress and heart rate monitoring, to understand patterns and make informed decisions.
  • Weather Forecasting : Meteorologists use LS fitting to analyze historical weather data and make predictions about future weather patterns, helping in forecasting temperature trends, precipitation levels, and storm patterns.
  • Market Research : LS fitting is used in market research to analyze consumer behavior and marketing strategies, helping businesses make informed decisions about product development and marketing campaigns.
  • Sports Analysis : LS fitting is used in sports analytics to analyze player performance data, predict game outcomes, helping coaches and athletes to make data-driven decisions.

THANK YOU FOR

YOUR PATIENCE!