# Bayesian update with the shifted and scaled data

Suppose I have data $$y$$ (N observations) which follows a normal distribution:

$$y \sim N(\alpha+\beta*\mu,\sigma^2)$$

while $$\alpha$$ and $$\beta$$ are known parameters. I want to update $$\mu$$ and the prior is $$\mu \sim N(\mu_0,\sigma^2_0)$$.

My question is what is the posterior distribution for $$\mu$$?

I know the posterior when $$X \sim N(\mu,\sigma^2)$$ (here). But in my case, $$y$$ is a shifted and scaled version of $$X$$.

For my own derivation, I treat the above as a regression problem, and I get

$$\mu \sim N(\frac{\beta^T(y-\alpha)+\mu_0/\sigma^2_0}{\beta^T\beta+1/\sigma^2_0},\frac{\sigma^2}{\beta^t\beta+1/\sigma^2})$$

However, the above formula does seem correct. For instance, suppose I have two data, $$y_1$$ and $$y_2$$. Updating with $$y_1$$ then $$y_2$$ vs updating with $$y_2$$ then $$y_1$$ will result in different posteriors.

Any help is appreciated!

You can do a standard update for distribution parametrized by $$\mu’ = \alpha + \beta\mu$$. Next, given that it's a location-scale transformation you can just transform it. But your likelihood is characterized by $$\mu$$ not $$\mu’$$, so you cannot use the distribution for $$\mu$$ in the next update, but the one for $$\mu’$$.