STAT 638 (Fall 2026), Lecture 23
Overview
Samiran Sinha distinguishes frequentist standard error, the estimated sampling variability of an estimator across hypothetical samples, from Bayesian posterior standard deviation, uncertainty about a parameter conditional on observed data. He then develops Bayesian linear-regression model selection with inclusion indicators and a g-prior, illustrates posterior model and variable-inclusion probabilities for three predictors, and motivates Gibbs sampling and model averaging when exhaustive enumeration becomes impractical.
Key takeaways
- A frequentist standard error estimates the sampling variability of an estimator across repeated samples, whereas a Bayesian posterior standard deviation measures uncertainty about a parameter conditional on the observed data and prior.
- For a normal-mean model with a normal prior on μ and inverse-gamma prior on σ², integrating out σ² produces a scaled Student t posterior with degrees of freedom N + 2A.
- Bayesian regression model selection assigns each predictor an inclusion indicator Zⱼ, giving 2^P possible models for P predictors.
- In the three-predictor simulation, the X2-only model is favored because X2 has a strong signal and is correlated with X1 and X3; its posterior inclusion probability is about 0.973 for g = N.
- Posterior inclusion probabilities for individual variables do not need to sum to 1, but the posterior probabilities across all candidate models must sum to 1.
- Exhaustive model evaluation becomes impractical as P grows, motivating Gibbs sampling to explore model space and Bayesian model averaging to combine predictions across models.
Chapters
- Samiran Sinha resumes Chapter 9 linear-regression material after comparing classical and Bayesian analyses of simulated data.
- The previous assignment was to check code using a g-prior and supplied conditional distributions because the computed results appeared incorrect.
- Sinha notes that brms output reports posterior uncertainty, while frequentist software reports an estimated standard error, quantities that can look similar but mean different things.
- For the simple model Y = μ + ε, the classical estimator is the sample mean, μ̂ = (1/N)ΣYᵢ.
- If the error variance is σ², then Var(μ̂) = σ²/N and its standard error is estimated by σ̂/√N.
- The standard error estimates how much μ̂ would vary across many hypothetical samples of the same size N from the population.
- Sinha sets up normal observations with unknown mean μ and variance σ², a normal prior for μ, and an inverse-gamma prior for σ².
- The posterior for μ given the observations is obtained by combining the likelihood and priors, then integrating out σ².
- The derivation expands the residual sum of squares around the sample mean and collects powers of σ² before integration.
- The inverse-gamma integral yields a marginal posterior for μ with a power-form density that can be rewritten as a scaled Student t distribution.
- The degrees of freedom are identified as N + 2A, where A is the inverse-gamma prior parameter.
- The resulting posterior standard deviation describes the spread of μ conditional on the observed data and chosen prior.
- A frequentist standard error concerns the distribution of estimates over repeated samples; a Bayesian posterior standard deviation concerns the parameter given the data.
- The brms posterior standard deviation near 0.57 and frequentist standard error of 0.5755 are close in the example but are not the same quantity.
- Changing the prior in a Bayesian analysis can change posterior standard deviations, while the frequentist standard error is based on the sampling model and estimated noise.
- Bayes' rule gives a model's posterior probability proportional to its marginal likelihood, P(data | model), multiplied by its prior probability.
- A common selection rule chooses the model with the largest posterior probability.
- For linear regression with P predictors, binary inclusion choices create 2^P possible models.
- Each regression coefficient is represented as βⱼ = Zⱼbⱼ, where Zⱼ = 1 includes predictor j and Zⱼ = 0 excludes it.
- With four predictors, an indicator vector such as 1010 retains predictors 1 and 3, so the model's design matrix contains only their columns.
- Sinha presents a closed-form marginal likelihood for linear regression under a g-prior for coefficients and an inverse-gamma prior for σ².
- For three predictors, the example evaluates seven nonempty models, using equal prior probabilities and g-prior settings including g = 5, g = N, and g = 40.
- The model containing X2 alone has the largest posterior probability across the displayed g choices.
- Although the simulated truth includes X1, X2, and X3, X2 has the strongest signal and is correlated with the other predictors, so it can capture some of their effects.
- A predictor's posterior inclusion probability is the sum of posterior probabilities for all models that include it.
- For g = N, the example gives X1 an inclusion probability of about 0.195 and X2 about 0.973; predictor inclusion probabilities do not need to sum to 1.
- Model posterior probabilities do sum to 1, but exhaustive evaluation requires 2^P models, which becomes burdensome even at P = 20.
- For generalized linear models or non-normal outcomes, such as count or gamma data, the convenient closed-form marginal likelihood may not be available.
- Instead of evaluating every model, Gibbs sampling updates inclusion indicators from their full conditional distributions and explores the model space.
- In the linear-model derivation, regression coefficients and σ² can be integrated out; Sinha notes that other models may require retaining parameters and computing more difficult conditional probabilities.
- Bayesian model averaging combines predictions from multiple models, weighting each by its posterior model probability rather than relying only on the single highest-probability model.
- Sinha concludes that the simplified indicator update is specific to the linear-model setup, while Gibbs-based model exploration also applies to nonlinear models in a less simplified form.
Transcript excerpt
0:02 Sinha, Samiran: Alright, so today would be… Talking about linear degradation again. Sinha, Samiran: chapter nine Sinha, Samiran: And, so the topics will be linear regression. Sinha, Samiran: Degation from chapter. Sinha, Samiran: 9. Sinha, Samiran: Peace. Sinha, Samiran: Okay, so what we did last…
0:54 Sinha, Samiran: We analyze the data set, simulated data set. Sinha, Samiran: Using the classical method and the frequentist method, and showed you the results, the difference in the results. Sinha, Samiran: There are some differences, not much, okay, in terms of the parameter estimates. Sinha, Samiran: And? Sinha, Samiran: I also want to point out about, Sinha, Samiran: Oh, another thing we did, I wrote a code, okay, and then I asked you guys to verify the code, because the results Sinha, Samiran: based on our own coding seems not correct, and in that coding, we use the G prior distribution. I gave you the conditional distributions, you just have to code on your own, or find the mistakes in my code. Sinha, Samiran: And this was your task.
1:50 Sinha, Samiran: But going back to. Sinha, Samiran: To the. Sinha, Samiran: Package generated output, if you look at the BRMS package Sinha, Samiran: The estimated error what is that this one stands for the standard deviation. Sinha, Samiran: Standard deviation. Sinha, Samiran: of Of the Bayesian method posterior standard deviation. Sinha, Samiran: And what is… if you look at the frequentist output Sinha, Samiran: Frequentist output also gives you standard deviation okay. Sinha, Samiran: And that number is 0.5755… And the Bayesian posterior standard deviation was 0.57.
2:46 Sinha, Samiran: I want to point out the difference between these two. Although they look very close, but they do not represent the same thing, okay? And sometimes we interpret them mistakenly as the same quantity, but they are different, totally different. We call it…
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Samiran Sinha.