math we'll go through so that's one of the things we'll use a lot the other thing we'll use a lot is Bayes rule Bayes rule hopefully sounds familiar where how do you derive it we actually derive it from looking at this the expression for the joint the X comma Y is px given Y x py which is also because the roles of X and y are arbitrary it doesn't matter which one comes first or second in this equation here we can swap the roles and we have P Y given x times PX from that using just this part over here we can write P X given Y as P y