 Okay, so today we're going to look at a case for a normal distribution with a known mean mu, but an unknown precision tau. And I'm just going to remind you that tau is defined as being one over the variance. So our precision is one over the variance. So if we write out our likelihood of observing data and data points from such a distribution with some parameter mean and tau for our precision, we would write it in this form. So first of all, we need to think that tau will be our random variable of interest at the end. So we want to think in terms of tau. So we want to separate this out as much as possible in terms of thinking about tau. So we would have our likelihood f x1 to xn given mu tau. We're going to say that's equal to right. So tau is to the half in here, but it's n times so n over 2 is raised to the power. Then we have this is 2 pi is to the minus a half here, but it's n times so times 2 pi minus n over 2. And you can see this is constant with respect to tau. So we will be able to ignore this at some point. Then we have e to the minus tau. I'm just working in terms of tau here. And when you bring a product inside an exponential, it becomes a sum. So i equals 1 to n xi minus mu. Remember mu is known and we've observed data xi. So that gives us just another way of writing this but thinking in terms of tau. So here we have a form of tau to the power of something. Forget about a constant times e to the minus tau times something else. So we want to think about a distribution that might fit naturally with this. So we recall the form of a gamma distribution and think standardly we might be using a random variable such as y. So we would have f of y given with alpha and beta r parameters. We would have it as being beta to the power of alpha over the gamma function of alpha y to the alpha minus 1 e to the minus beta y. In terms of our prior, our random variable is tau. So we would replace y with tau. So g of tau is beta to the alpha over the gamma function of alpha. Again, this is constant with respect to tau. So we won't be needing it to carry it throughout our calculations. Tau to the alpha minus 1 e to the minus beta tau. Okay, so we get to this point and we have a little think and we say, oh look, we've tau to the power of something times e, the exponential of something that depends on a minus tau. Well, how does this match with what we've already seen quite nicely? So our posterior is proportional to the prior times likelihood. So because we're thinking about proportional in terms of tau, everything that doesn't depend on tau from up here, we're not going to bring into this calculation. So we can say it's proportional to tau to the power of a alpha minus 1 e to the minus beta tau. That comes from what we think might be a good prior. Times tau to the power of n over 2 e to the minus tau times the sum of i equals 1 to n xi minus mu to be squared over 2. Then we group like terms together. So we have tau to the alpha plus n over 2 minus 1 e to the minus tau times beta plus the sum of i equals 1 to n xi minus mu to be squared over 2. So again we see we were to group these together nicely. We have tau to the power of something minus 1 times e to the minus tau, so exponential of minus tau times something else. This is the same functional form as a gamma distribution and this is why it's extremely important to know the functional forms of different distributions when you're trying to think and show conjugacy. So this is a gamma with parameters alpha plus n over 2 beta plus the sum of i equals 1 to n xi minus mu to be squared over 2. So that immediately shows you your updating rules. So you add the number of observations divided by 2 to your first parameter and the sums of squares over 2 to your second parameter and you can work out your constant of integration quite easily without having to do any integration, so your constant of proportionality. So that is beta plus the sum of i equals 1 to n xi minus mu to be squared over all over 2 and all that to the power of alpha plus n over 2 divided by gamma function of alpha plus n over 2 and we have tau to the power of alpha plus n over 2 minus 1 e to the minus tau times beta plus the sum i equals 1 to n xi minus mu to be squared over 2 and that shows that your gamma distribution is your conjugate prior for a precision from a normal distribution if you have a known mean mu.