Question about Hierarchical bayesian analysis - detect outlier or abnormal sample

Can you explain whether the following makes sense?

Assume there is a model y=ax + b

Here, a & b are the parameters I want to infer, and there are 40 samples.

a[1]~a[40], b[1]~b[40]
To infer the parameters from the given data, I conducted group level Bayesian modeling.

The value of Mu_a and Mu_b are inferred, and from there a[k] and b[k] can be inferred.

At this point, I want to know whether a[4] is outliere from the group.
If the estimate of a[4] is outside of 90% HDI of mu_a, can it be considered as such?


I donโ€™t think your method would be a way to detect outliers, but to be honest, Iโ€™m not sure that I follow your model notation. However, if you are simply looking for a way to detect outliers or influential observations, check out section 6 of the Visualization in Bayesian Workflow paper Visualization in Bayesian Workflow | Journal of the Royal Statistical Society Series A: Statistics in Society | Oxford Academic