# Jan Christian Refsgaard(Jan Christian Refsgaard)

Karma: 104

Data Scientist

• Wild Speculation:

I am 70% confident that if we were smarter then we would not need it.

If you have some data that you (magically) know the likelihood and prior. Then you would have some uncertainty from the parameters in the model and some from the parameters, this would then change the form of the posterior for example from normal to a t-distribution to account for this extra uncertainty.

In the real world we assume a likelihood and guess a prior, and even with simple models such as y ~ ax + b we will usually model the residual errors as a normal distribution and thus thus loose some of the uncertainty, thus our residual errors are different in and out of sample.

Practical Reason

Also, a model with more* parameters will always have less residual errors (unless you screw up the prior) and thus the in sample predictions will seem better

Modern Bayesians have found two ways to solve this issue

1. WAIC: Which uses information theory see how the posterior predictive distribution captures the generative process and penalizes for the effective number of parameters.

2. PSIS-LOO: does a very fast version of LOO-CV where for each you factor that contribution to the posterior to get an out of sample posterior predictive estimate for .

Bayesian Models just like Frequentest Models are vulnerable to over fitting if they have many parameters and weak priors.

*Some models have parameters which constrains other parameters thus what I mean is “effective” parameters according to the WAIC or PSIS-LOO estimation, parameters with strong priors are very constrained and count as much less than 1.

• If there are 3 competing models then Ideally you can make a larger model where each submodel is realized by specific parameter combinations.

If a M2 is simply M1 with an extra parameter b2, then you should have a stronger prior b2 being zero in M2, if M3 is M1 with one parameter transformed, then you should have a parameter interpolating between this transformation so you can learn that between 40-90% interpolating describe the data better.

If it’s impossible to translate between models like this then you can do model averaging, but it’s a sign of you not understanding your data.

• You are correct, we have to assume a model, just like we have to assume a prior. And strictly speaking the model is wrong and the prior is wrong :). But we can calculate how good the posterior predictive describe the data to get a feel for how bad our model is :)

• I am a little confused by what x is on your statement, and by why you think we can’t compute the likelihood or posterior predictive. In most real problems we can’t compute the posterior but we can draw from it and thus approximate it via MCMC

• I agree with Radford Neal, model average and Bayes factors are very sensitive to the priors specification of the models, if you absolutely have to do model average methods such as PSIS-LOO or WAIC that focus on the predictive distribution are much better. If you had two identical models where one simply had a 10 times boarder uniform prior then their posterior predictive distributions would be identical but their Bayes factor would be 110, so a model average (assuming uniform prior on p(M_i)) would favor the narrow prior by a factor 10 where the predictive approach would correctly cobclude that they describe the data equal well and thus conclude that the models should be weighed equal.

Finally model average is usually conseptually wrong and can be solved by making a larger model that encompass all potential models, such as a hierarchical model to partial pool between the group and subject level models, gelmans 8 schools data is a good example: there are 8 schools and there are 2 simple models one with 1 parameter (all schools are the same) and one with 8 (every school is a special snow flake), and then the hierarchical model with 9 parameters, one for each school and one for how much to pool the estimates towards the group mean, gelmans radon dataset is also good for learning about hierarchical models

• I am one of those people with an half baked epistemology and understanding of probability theory, and I am looking forward to reading Janes. And I agree there are a lot of ad hocisms in probability theory which means everything is wrong in the logic sense as some of the assumptions are broken, but a solid moden bayesian approach has much less adhocisms and also teaches you to build advanced models in less than 400 pages.

HMC is a sampling approach to solving the posterior which in practice is superior to analytical methods, because it actually accounts for correlations in predictors and other things which are usually assumed away.

WAIC is information theory on distributions which allows you to say that model A is better than model B because the extra parameters in B are fitting noice, basically minimum description length on steroids for out of sample uncertainty.

Also I studied biology which is the worst, I can perform experiments and thus do not have to think about causality and I do not expect my model to acout for half of the signal even if it’s ‘correct’

• I think the above is accurate.

I disagree with the last part, but it has two sources of confusion

1. Frequentists vs Bayesian is in principle about priors but in practice about about point estimates vs distributions

1. Good Frequentists use distributions and bad Bayesian use point estimates such as Bayes Factors, a good review is this is https://​​link.springer.com/​​article/​​10.3758/​​s13423-016-1221-4

2. But the leap from theta to probability of heads I think is an intuitive leap that happens to be correct but unjustified.

Philosophically then the posterior predictive is actually frequents, allow me to explain:
Frequents are people who estimates a parameter and then draws fake samples from that point estimate and summarize it in confidence intervals, to justify this they imagine parallel worlds and what not.

Bayesian are people who assumes a prior distributions from which the parameter is drawn, they thus have both prior and likelihood uncertainty which gives posterior uncertainty, which is the uncertainty of the parameters in their model, when a Bayesian wants to use his model to make predictions then they integrate their model parameters out and thus have a predictive distribution of new data given data*. Because this is a distribution of the data like the Frequentists sampling function, then we can actually draw from it multiple times to compute summary statistics much like the frequents, and calculate things such as a “Bayesian P-value” which describes how likely the model is to have generated our data, here the goal is for the p-value to be high because that suggests that the model describes the data well.

*In the real world they do not integrate out theta, they draw it 10.000 times and use thous samples as a stand in distribution because the math is to hard for complex models

• Regarding reading Jaynes, my understanding is its good for intuition but bad for applied statistics because it does not teach you modern bayesian stuff such as WAIC and HMC, so you should first do one of the applied books. I also think Janes has nothing about causality.

• Given 1. your model and 2 the magical no uncertainty in theta, then it’s theta, the posterior predictive allows us to jump from infrence about parameters to infence about new data, it’s a distribution of y (coin flip outcomes) not theta (which describes the frequency)

• In Bayesian statistics there are two distributions which I think we are conflating here because they happen to have the same value

The posterior describes our uncertainty of , given data (and prior information), so it’s how sure we are of the frequency of the coin

The posterior predictive is our prediction for new coin flips given old coin flips

For the simple Bernoulli distribution coin example, the following issue arise: the parameter , the posterior predictive and the posterior all have the same value, but they are different things.

Here is an example were they are different:

Here was not a coin but the logistic intercept of some binary outcome with predictor variable x, let’s imagine an evil Nazi scientist poisoning people, then we could make a logistic model of y (alive/​dead) such as , Let’s imagine that x is how much poison you ate above/​below the average poison level, and that we have , so on average half died

Now we have:

the value if we were omniscient

The posterior of because we are not omniscient there is error

Predictions for two different y with uncertainty:

Does this help?

I will PM you when we start reading Jaynes, we are currently reading Regression and other stories, but in about 20 weeks (done if we do 1 chapter per week) there is a good chance we will do Jaynes

• Uncertainty is a statement about my brain not the real world, if you replicate the initial conditions then it will always land either Head or Tails, so even if the coin is “fair” , then maybe . the uncertainty comes form be being stupid and thus being unable to predict the next coin toss.

Also there are two things we are uncertain about, we are uncertain about (the coins frequency) and we are uncertain about , the next coin toss

• I may be to bad at philosophy to give a satisfying answer, and it may turn out that I actually do not know and am simply to dumb to realize that I should be confused about this :)

1. There is a frequency of the coin in the real world, let’s say it has

1. Because I am not omniscient there is a distribution over it’s parameterized by some prior which we ignore (let’s not fight about that :)) and some data x, thus In my head there exists a probability distribution

2. The probability distribution on my head is a distribution not a scaler, I don’t know what is but I may be 95% certain that it’s between 0.4 and 0.6

2. I think there are problems with objective priors, but I am honored to have meet an objective Bayesian in the wild, so I would love to try to understand you, I am Jan Christian Refsgaard on the University of Bayes and Bayesian conspiracy discord servers. My main critique is the ‘in-variance’ of some priors under some transformations, but that is a very weak critique and my epistemology is very underdeveloped, also I just bought Jaynes book :) and will read when I find a study group, so who knows maybe I will be an objective Bayesian a year from now :)

• If I have a distribution of 2 kids and a professional boxer, and a random one is going to hit me, then argmax tells me that I will always be hit by a kids, sure if you draw from the distribution only once then argmax will beat the mean in 23 of the cases, but its much worse at answering what will happen if I draw 9 hits (argmax=nothing, mean=3hits from a boxer)

This distribution is skewed, like the beta distribution, and is therefore better summarized by the mean than the mode.

In Bayesian statistics argmax on sigma will often lead to sigma=0, if you assume that sigma follows a exponential distribution, thus it will lead you to assume that there is no variance in your sample

The variance is also lower around the mean than the mode if that counts as a theoretical justification :)

• I think argmax is not the way to go as the beta distribution and binomial likelihood is only symmetric when the coin is fair, if you want a point estimate the mean of the distribution is better, which will always be closer to 5050 than the mode, and thus more conservative, you are essentially ignoring all the uncertainty of theta and thus overestimating the probability.

• Disclaimer: Subjective Bayesian

Here is how we evil subjective Bayesian think about it

Prior:

Lets imagine two people, Janes and an Alien, Janes knows that most coins are fair and has a Beta(20, 20) prior, the alien does not know this, and puts the ‘objective’ Beta(1, 1) prior which is uniform for all frequencies.

Data:

The data comes up 12 heads and 8 tails

Posterior:

Janes has a narrow posterior Beta(32, 28) and the alien a broader Beta(13, 9), Janes posterior is also close to 5050

if Janes does not have access to the data that formed his prior or cannot explain it well, then what he believes about the coin and what the alien believes about the coin are both ‘rational’, as it is the posterior from their personal priors and the shared data.

Janes can publish a paper with the Beta(13, 9) posterior, because that is what skeptical people with weak priors will believe, while himself believing in a Beta(32, 28)

To make it more concrete Pfizer used a Beta(0.7, 1) prior for their COVID vaccine, but had they truly belied that prior they would have gone back to the drawing instead of starting a phase 3 trial, but the FDA is like the alien in the above example, with a very broad prior allowing most outcome, the Pfizers scientists are like Janes, we have all this data suggesting it should work pretty well so they may have believed in Beta(5, 15) or whatever

The other thing to notice is the coins frequency is a distribution and not an scalar because they are both unsure about the ‘real’ frequency

Does this help or am I way off?

• The probability is an external/​physical thing because your brain is physical, but I take your point.

I think the we/​our distinction arises because we have different priors

• Cholera is the devil!

The National Center for Biotechnology Information has a Taxonomy database.

Q: What do you think taxid=666 is?

A: Vibrio cholerae, coincidence? I think not!

# Jan Chris­tian Refs­gaard’s Shortform

2 Jun 2021 10:45 UTC
2 points