Confidence interval from least squares fitting?

Click For Summary
SUMMARY

This discussion centers on determining the confidence interval for a parameter ζ derived from least squares fitting of an experimental distribution to a theoretical distribution. The user employs the least squares method, calculating R² to minimize the sum of squared differences between the two distributions. The conversation highlights the need for a method to estimate the standard deviation σ around ζ, suggesting approaches such as linearized confidence intervals and Monte Carlo simulations to validate results. Key insights include the use of derivatives of the parabola formed by R² values and the importance of understanding the underlying assumptions of the fitting process.

PREREQUISITES
  • Understanding of least squares fitting and R² calculation
  • Familiarity with confidence intervals and standard deviation concepts
  • Knowledge of numerical methods for curve fitting
  • Basic statistical principles, including normal distribution and error estimation
NEXT STEPS
  • Learn about linearized confidence intervals in curve fitting
  • Explore Monte Carlo simulation techniques for parameter estimation
  • Study the relationship between maximum likelihood estimation and least squares fitting
  • Investigate methods for estimating standard deviations from residuals in curve fitting
USEFUL FOR

Data analysts, statisticians, and researchers involved in experimental data analysis and curve fitting, particularly those seeking to understand confidence intervals in parameter estimation.

oaktree
Messages
1
Reaction score
0
Hello,

Let me get right to my problem. I have an experimental distribution and a single-parameter theoretical distribution.

I want to find the value for the best fit theoretical distribution that agrees with my experimental data for the bulk of the distributions (the tails of my distributions differ substantially).

I isolate an equal portion of both distributions and calculate the sum of the squares of the differences between the two distributions for this region. i.e. least squares approach.
R2=Ʃ [ expi - theoi(x) ]2

I do this for several values that I have chosen for the single-parameter theoretical distribution and obtain a unique parameter value (which I call x=ζ) which results in the minimization of the sum of the squares (exactly what I want). Every other parameter gives a larger value for this sum of squares.

I do not know if this is necessary but I can plot all parameters that I tested vs the R2 too. This gives points that combine to form a parabola, ax2+bx+c=R2. I can take the derivative of the parabola curve to obtain the minimum of the parabola which again occurs at ζ. I have attached a pdf of this.

My question is, how do I find a confidence interval for this? I am looking for \sigma in ζ ± \sigma. Do I use the formula for the parabola to find this? Do I use R2?

I have looked through some books and online and been unsuccessful on how to find this \sigma value. Any help is appreciated. A reference book would be of great help too. Thanks!
 

Attachments

Physics news on Phys.org
oaktree said:
I do this for several values that I have chosen for the single-parameter theoretical distribution and obtain a unique parameter value (which I call x=ζ) which results in the minimization of the sum of the squares (exactly what I want).

My question is, how do I find a confidence interval for this? I am looking for \sigma in ζ ± \sigma. Do I use the formula for the parabola to find this? Do I use R2?

I may (or may not!) understand the usual method for getting confidence intervals for parameters of a curve fit, I've remarked about it in several posts and not gotten any corrections - we'll see if my luck holds.

it involves some commonly made and implausible assumptions. It goes something like this. The value of the parameter is a known function of the data. I don't want to call the parameter "x". Let's call the parameter p and the say
p = F(X_1,X_2,...X_n) where the X_i are the data.

You may not know the symbolic expression for F , but you have a numerical method for computing it, namely your curve fitting algorithm.

Let's say that your particular curve fit found that p = p_0 when the specific data was X_1 = x_1, X_2 = x_2,... X_n = x_n.

Find (symbolically or numerically) the differential expression that approximates a change in p_0 as a function of changes in the x_i.p0 + \delta p = F(x_1,x_2,...) + \delta x_1 \frac{\partial _F}{\partial X_1} + \delta x_2 \frac{\partial _F}{\partial X_2} + ...

\delta p = \delta x_1 \frac{\partial _F}{\partial X_1} + \delta x_2 \frac{\partial _F}{\partial X_2} + ...

Think of the \delta x_i are the random errors in measuring each of the x_i. Assume these are independent normally distributed random variables with mean zero. Estimate their standard deviations. (You might have some way of doing this that is independent of the curve fit. I suppose some people use the "residuals" (i.e. the "error" between the values predicted by the curve and the actual data) to do this estimation. I'm not sure how that can be justified by logical reasoning! )

The above approximation expresses the random variable \delta p a linear function of the independent mean zero normal random variables \delta x_i, which have known standard deviations. From this you can compute the standard deviation of \delta p and say things about confidence intervals around p_0.

The method is suspicious enough that the technical term for it is not "confidence interval", although some software packages are brazen enough to call it that. I think it is technically a "linearized confidence interval" and it may need another adjective (that I don't recall at the moment) to warn people.

If your theoretical distribution is from a commonly used family of curves, you might be able to look up the formula for the linearized confidence interval that the above method produces.
 
Last edited:
Least squares fit can be viewed at as a special case of a maximum likelihood proceedure where you assume that the logarithmic likelihood L is - up to some factors not depending on x - R^2.
That is, the probability density function for obtaining your data exp_i given x is
p(\{exp_i\})=C \exp(-R^2).
Now you turn the handle of general theorems about maximum likelihood to find that the asymptotic variance is \sigma^2= (\partial^2 R^2/\partial x^2)^{-1}, i.e. one over the second derivative of your parabola.
 
Another thought: You could simply Monte-Carlo the problem. Simulate sets of data with various simulated "errors" and plot the distribution of the estimated parameter. Even if you do the problem another way, you could use a simulation to check your result.
 
If there are an infinite number of natural numbers, and an infinite number of fractions in between any two natural numbers, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and an infinite number of fractions in between any two of those fractions, and... then that must mean that there are not only infinite infinities, but an infinite number of those infinities. and an infinite number of those...

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
4
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 22 ·
Replies
22
Views
6K