I feel like talking about something a bit conceptual. I hope some nerds would enjoy this.
the things we study in astrophysics are incredibly distant specks, and there is only so much you can do to get information out of them. you have the spectrum, the brightness, the polarization, and how those vary with time. to get much out of it, you need a theoretical model of how that light is produced, and you match that to the data.
as a very broad example, let's say the spectrum of some object depends on its shape and size. by finding a theoretical spectrum given by a shape and size that matches the observation, you can kinda measure the shape and size of that thing. but how do you do that in practice?
BAYESIAN MARKOV CHAIN MONTE CARLO (MCMC) BAYBEEE
okay that may sound scary but bear with me here. so you have a model, the parameters the model takes in, and the data. to see what parameters fit the best, you can kinda just...guess. say you have 2 parameters and makes 1000 guesses each - that's a million guesses. but what if you have 5 parameters? or 10? it just rises exponentially. you need a better way of guessing than brute forcing:
- Bayesian: "given model A and parameters B, how likely can this model replicate observation C"
- Monte Carlo: any method that uses randomness
- Markov Chain: a chain of probabilistic events where the outcome affects where you next proceed
basically, you randomly guess the parameters, then you calculate how likely is it for the model to replicate the observations given these parameters. if it fits the observed data better than a previous guess, you keep that guess. if it's worse, you can randomly still accept it so your chain doesn't get stuck. then you guess again. rinse and repeat many, many times.
in the end, you find the distributions of how likely your parameters are to be a certain value, and that's how you calculate error bars for your inferred parameters.
there's a lot of different mcmc algorithms with fancy educated guesses, but this is the basic idea. while it beats brute forcing, it is computationally quite heavy. you often end up doing these with cpu clusters/supercomputers.
