Download presentation
Presentation is loading. Please wait.
Published byMervin Stewart Modified over 8 years ago
1
NASSP Masters 5003F - Computational Astronomy - 2009 Lecture 4: mostly about model fitting. The model is our estimate of the parent function. Let’s express the model m(x i ) as a function of a few parameters θ 1, θ 2.. θ P Finding the ‘best fit’ model then just means best estimates of the θ. (Bold – shorthand for a list) Knowledge of physics informs choice of θ. The parent function – what we’d like to find out (but never can, exactly).
2
NASSP Masters 5003F - Computational Astronomy - 2009 Naive best fit calculation: Want to minimize all the deviates |y i -m i |. A reasonable single number to minimize is: But what if some bits have larger σ than others? –Answer: weight by 1/ σ 2 i – just like the best-SNR weighted average: This is sometimes (a bit deceptively) known as the chi squared ( χ 2 ) formula. Choose θ which minimizes U.
3
NASSP Masters 5003F - Computational Astronomy - 2009 Simple example: m i = θ 1 + θ 2 s i Model – red is s i, green the flat background. The data y i : Map of U.
4
NASSP Masters 5003F - Computational Astronomy - 2009 Sometimes known as the ‘method of least squares’. Have ignored possibility that x i might also have errors. Concept of degrees of freedom ν: –The higher the number P of parameters, the better the model fits the noise, therefore the lower the average (y i -m i ) 2. –Normalize by ν = N – P. Reduced χ 2 : Should ~1. χ 2 remarks
5
NASSP Masters 5003F - Computational Astronomy - 2009 How good is the fit? χ 2 for the parent function has a probability distribution Probability of χ 2 equalling U or higher is Equals: probability that the data come from the model. But… is U truly distributed as χ 2 ? –If in doubt, check with a Monte Carlo!
6
NASSP Masters 5003F - Computational Astronomy - 2009 χ 2 for Poisson data Choose data y i as estimator for σ i 2 ? –Can have zero values in denominator. Choose (evolving) model as estimator for σ i 2 ? –Gives a biased result. Better: Mighell formula Unbiased, but no good for goodness-of-fit. –Use Mighell to fit θ then standard U for “goodness of fit” (GOF).
7
NASSP Masters 5003F - Computational Astronomy - 2009 Likelihood Take, for example, a single datum y which is a parent function f + gaussian noise. IF m = f, But, can also think of this as the ‘probability’ of m given y, p(m|y). (Then no worry about the ‘if’.) Comments on p(m|y): –May not be true; hence, Bayesian use of any extra prior information. –Hard to check. –However, the flow of information seems right: ie, from known (the data) towards unknown but desired (the model). Known as the likelihood of m given y.
8
NASSP Masters 5003F - Computational Astronomy - 2009 Even simpler example: m = θ Probability p(y|θ) = θ y e –θ / y! Likelihood p(θ|y) = θ y e –θ / y! For Poissonian noise this time (because it is more interesting, and harder to handle with ‘traditional’ χ 2 ):
9
NASSP Masters 5003F - Computational Astronomy - 2009 Likelihood continued. We can use likelihood to calculate the best-fit θ. If we have several data values y=[y 1,y 2 …y N ], multiply the separate likelihoods together: It’s often easier if we take logs:
10
NASSP Masters 5003F - Computational Astronomy - 2009 Likelihood continued. Back to 2-parameter model m i = θ 1 + θ 2 s i of slide 3, but now with Poissonian noise. Minimize L same as U to get optimum θ. Can ignore the Σln(y i !) term because it doesn’t depend on any θ. p( θ 1, θ 2 |y) is an example of a joint probability distribution, in this case a bivariate one because there’s only 2 parameters.
11
NASSP Masters 5003F - Computational Astronomy - 2009 Poissonian/likelihood version of slide 3 Model – red is s i, green the flat background. The data y i : Map of the joint likelihood L.
12
NASSP Masters 5003F - Computational Astronomy - 2009 Likelihood continued. An interesting fact: –Maximum likelihood for gaussian data leads to the U (ie, ‘ χ 2’ ) expression!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.