Why Use Posterior-Mean Weights?
A polygenic score combines many genotype values with weights that represent estimated genetic effects. GWAS estimates are noisy, especially when the standard error is large. Using each estimate unchanged can therefore give too much influence to variants whose apparent effects reflect sampling variation. A normal prior provides a transparent way to shrink uncertain estimates toward zero: estimates with more uncertainty are pulled further, while estimates measured more precisely are changed less.
The calculation in this tutorial is the basic normal-prior, normal-likelihood update for an effect estimate. Its result is a posterior distribution for the effect and, in particular, a posterior mean that can be used as a score weight. This is a model-based update: the amount of shrinkage depends on the assumed prior variance as well as on the likelihood standard error.
The second argument of \(N(\mu,\sigma^2)\) is a variance. Thus \(SE_j^2\) and \(\tau^2\) both have units equal to the square of the outcome-effect units, while \(SE_j\), \(\tau\), \(\hat{\beta}_j\), and \(\beta_j\) share the same effect units. The prior above is centred at zero: before seeing the estimate, it favours effects near zero but allows nonzero effects. It does not assert that every true effect is exactly zero.
The likelihood approximation is appropriate when the estimate is approximately unbiased and normally distributed around the effect, with its standard error adequately estimated. Treating \(SE_j\) as fixed is standard in this update. A shared \(\tau^2\) additionally represents a modelling choice that effects are drawn from a common distribution. The scalar update is most direct when the likelihood information for a variant can be considered separately from that for other variants; correlated estimates require accounting for their joint likelihood rather than blindly applying independent updates.
Deriving the Posterior Mean
Bayes’ rule says that the posterior density is proportional to the likelihood times the prior density. For one variant, terms that depend on \(\beta_j\) are therefore proportional to \(\exp[-(\hat{\beta}_j-\beta_j)^2/(2SE_j^2)]\exp[-\beta_j^2/(2\tau^2)]\). Combining the two quadratic terms gives the posterior precision, the reciprocal of posterior variance.
The last term does not depend on \(\beta_j\), so it contributes only to the normalising constant. The squared term identifies a normal posterior with the following mean and variance.
The multiplier is larger when the estimate is more precise relative to the prior scale. If \(SE_j^2\) is small compared with \(\tau^2\), then \(\kappa_j\) is near 1 and the estimate changes little. If \(SE_j^2\) is large compared with \(\tau^2\), then \(\kappa_j\) is smaller and the estimate is pulled more strongly toward zero. The sign is retained because \(\kappa_j\) is positive.
For independent variant likelihoods and independent priors with the same \(\tau^2\), this calculation applies separately to each variant. The posterior means can then be used in a weighted-sum score. If the effect estimates are correlated, separate scalar likelihoods do not represent their joint information; the joint dependence must be modelled to obtain appropriate posterior means.
Worked Example: Updating One Variant Estimate
Suppose a hypothetical GWAS estimates an effect of \(0.12\) outcome standard deviations per effect allele, with \(SE=0.05\) outcome standard deviations per allele. Use a zero-centred normal prior with \(\tau=0.10\) outcome standard deviations per allele. Assume the normal likelihood approximation is reasonable and that the standard error is treated as fixed.
The prior variance is \(\tau^2=0.10^2=0.0100\), and the likelihood variance is \(SE^2=0.05^2=0.0025\). Therefore,
The posterior-mean weight is \(0.0960\) outcome standard deviations per effect allele, rather than the unshrunk estimate of \(0.12\). The posterior variance and standard deviation are
This update assumes the stated prior scale; it does not establish that the true effect equals \(0.0960\). It gives a posterior distribution whose centre is \(0.0960\), conditional on the estimate and the model.
From Posterior Means to Score Weights
Let \(G_{ij}\) be the dosage for person \(i\) at variant \(j\), coded as the number of copies of the same effect allele used to define \(\hat{\beta}_j\). A score formed from posterior-mean weights is the sum of each dosage multiplied by its posterior-mean effect. For independent variant updates under the model above, each weight is \(\kappa_j\hat{\beta}_j\). The score’s units follow from the genotype coding and effect units: if dosages are allele counts and effects are in outcome standard deviations per allele, the score is in outcome standard deviations.
A posterior-mean score is still a weighted sum; the Bayesian update changes the weights, not the basic score definition. Because \(\kappa_j\) depends on the variant’s standard error, the weights need not all be reduced by the same percentage. If all variants have the same standard error and share the same prior variance, the multipliers are equal; otherwise, variant-specific uncertainty leads to variant-specific shrinkage.
Worked Example: Constructing a Score With Variant-Specific Shrinkage
Consider three hypothetical variants with independent normal likelihood estimates and independent zero-centred priors sharing \(\tau=0.08\) outcome standard deviations per allele. Their estimates, standard errors, and a hypothetical person’s effect-allele dosages are shown below. Assume the estimates use the same effect-allele orientation as the dosages.
| Variant | \(\hat{\beta}_j\) | \(SE_j\) | \(G_{ij}\) |
|---|---|---|---|
| 1 | 0.10 | 0.04 | 2 |
| 2 | -0.06 | 0.08 | 1 |
| 3 | 0.02 | 0.02 | 0 |
The prior variance is \(\tau^2=0.0064\). For variant 1, \(SE_1^2=0.0016\), so \(\kappa_1=0.0064/(0.0064+0.0016)=0.8000\), and the posterior mean is \(0.8000(0.10)=0.0800\). For variant 2, \(SE_2^2=0.0064\), so \(\kappa_2=0.0064/(0.0064+0.0064)=0.5000\), and its posterior mean is \(0.5000(-0.06)=-0.0300\). For variant 3, \(SE_3^2=0.0004\), so \(\kappa_3=0.0064/(0.0064+0.0004)=0.9412\), and its posterior mean is approximately \(0.9412(0.02)=0.01882\).
The score for the person is
in outcome-standard-deviation score units under this coding. The unshrunk score for the same dosages would be \(2(0.10)+1(-0.06)+0(0.02)=0.1400\). Variant 2 has the greatest standard error relative to the prior scale, and its estimate receives the strongest proportional shrinkage. Variant 3’s dosage is zero for this person, so its weight does not contribute to this particular score.
Posterior Uncertainty and Interpretation
A posterior mean is a point summary, but the update also supplies posterior uncertainty. Under the model, a central 95% posterior credible interval is the posterior mean plus or minus 1.96 posterior standard deviations. The interval describes uncertainty about the effect conditional on the model, prior, and observed estimate; it is not a frequentist confidence interval and does not describe variation in a future validation metric.
Worked Example: A Posterior Interval for an Effect
For a hypothetical variant, suppose \(\hat{\beta}=0.09\) outcome standard deviations per allele, \(SE=0.03\) outcome standard deviations per allele, and \(\tau=0.06\) outcome standard deviations per allele. Assume the normal likelihood and zero-centred normal prior are appropriate, with the standard error treated as fixed.
Here \(\tau^2=0.0036\), \(SE^2=0.0009\), and the shrinkage multiplier is
The posterior mean is \(0.8000(0.09)=0.0720\) outcome standard deviations per allele. The posterior variance is \(0.0036(0.0009)/0.0045=0.000720\), giving posterior standard deviation \(\sqrt{0.000720}=0.02683\). Thus the central 95% posterior credible interval is
in outcome standard deviations per allele, to the shown precision. Conditional on this model and the data, the posterior probability that the effect is positive is approximately \(\Phi(0.0720/0.02683)=\Phi(2.683)=0.9964\), where \(\Phi\) is the standard normal cumulative distribution function. This probability is a posterior statement under the specified prior and likelihood, not a probability that a null hypothesis is true.
What the Shrinkage Assumptions Do—and Do Not—Say
The prior variance determines how much the model expects effects to vary before seeing each estimate. A smaller \(\tau^2\) means a more concentrated prior around zero and, for a fixed standard error, stronger shrinkage. A larger \(\tau^2\) means a more diffuse prior and less shrinkage. Choosing or estimating a suitable prior scale is therefore consequential; the equations do not determine \(\tau^2\) by themselves.
A common mistake is to say, “The posterior mean is the GWAS estimate multiplied by a fixed shrinkage percentage, so every variant is reduced equally.” That is only true when the variants share both the same prior variance and the same standard error. In general, \(\kappa_j=\tau^2/(\tau^2+SE_j^2)\) varies across variants. Another error is to treat the posterior mean as a proven causal effect. It is a model-based estimate of an association effect, conditional on the likelihood and prior; it does not by itself establish causation or guarantee predictive performance in another population.
Finally, applying the scalar formula independently to correlated marginal GWAS estimates can misrepresent the information in the data. The product of separate likelihoods is justified only when the likelihood contributions are independent under the model. When linkage disequilibrium induces dependence among estimates, a joint likelihood is needed; the scalar update should not be mistaken for an LD-aware calculation.
Check Your Understanding
Use the normal likelihood and zero-centred normal prior described above.
- If \(\tau=0.10\) and \(SE=0.10\), what is the shrinkage multiplier? Is the posterior mean closer to zero than the estimate?
- For a fixed prior variance, which estimate receives more proportional shrinkage: one with \(SE=0.02\) or one with \(SE=0.08\)? Explain using the multiplier.
- Why must the effect-allele coding of each dosage agree with the effect-allele definition of its weight?
- What does a 95% posterior credible interval describe, and what conditioning information does its interpretation depend on?
- Why can separate scalar updates be inappropriate when GWAS effect estimates are correlated through linkage disequilibrium?