An ex post facto justification is a justification that is given after something happened. The term "ex post facto" is a legal term. It is a concept of law that determines judgement after some incident took place. But you can also apply this concept to belief systems.
An ex post factor justification (for a belief) is a justification given after a belief was formed. In other words, first a belief is formed and then a justification is given towards this belief. I consider this to be a terrible manner to form your beliefs for reasons that I will explain.
There are various methods to determine what is true and what is not. You can use the scientific method and work with evidence. Or you can use the philosophical method which mostly reasons something out. But whatever the method you choose to use you do not first form beliefs and then justify them.
When one looks at the evidence or when one reasons towards a conclusion he does not decide what the end result is going to be. The end result might be something positive and it can be something really dreadful, but the conclusion is never decided upon, it is discovered and accepted for what it is.
Most people that you will come across in your life have ex post facto beliefs. Those are beliefs that they attained either as a kid or by some other unreliable method and then in the course in their life found "justifications" (usually very terrible ones) to why their beliefs are true.
Religion is almost surly an ex post factor belief. In Judaism about 98% to 99% of all Juden did not become Juden out of their own will but rather because it was something they picked up from their parents. They had no reasons to practice and believe in Judaism. The 1% to 2% of Juden joined Judaism not from some rational approach towards it, but most likely because they were emotionally attracted to Judaism. They liked the ideas of Judaism and so they joined it.
Therefore, it is fair to say that religion (Judaism in particular) is almost surly an ex post factor belief system. I have never came across a Jude in my life that had no interest whatsoever in Judaism but came to accept it, regardless of what he felt, because the "arguments" for Judaism convinced him that it must be true.
Once Juden come to believe Judaism, either from child indoctrination or emotional acceptance, they need to form "justifications" to their beliefs (if even that, some people do not even look for justification, they are happy practicing what they were taught to practice with lack of justification). All of these justifications are ex post factor justifications. The Jude has a conclusion that he would like to reach. So he "reasons" and looks for "evidence" in such a manner to force this conclusion. His reasons and evidence often create double standards when it comes to matters outside of Judaism but he uses them nonetheless. For example, any normal person who discovered a book which claimed to be an autobiography and that it mentioned how the author died would immediately reject it as an autobiography because dead people cannot write about themselves. This is rather reasonable. But when it comes to Judaism the Jude rejects this simple concept because it challenges Judaism. The Torah speaks of how Moshe died, at this point reasonable people need to question whether Moshe can be its author, but the Jude ignores this point he says the Moshe had divine prophecy and was able to look into the future. Notice how they create a double standard to ignore to challenge their beliefs.
The problem with ex post facto beliefs is that they are almost always wrong. There are a about six billion people in the world and no two agree with one another. Billions and billions of beliefs and in all conflict. The chances that your beliefs are correct as very low since all these world beliefs cannot be correct simultaneously.
When it comes to mathematics all mathematicians agree with one another. To convince themselves all they have to do is give a proof to what they say and convince the other mathematician. When it comes to science all scientists nearly agree with one another. The standard of proof in science is not as pure as in mathematics. And also science is much much more difficult than mathematics. So it is understandable why there be a slight confusion in science. But even though they may have slight disagreement the disagreement is always within a certain context. You may find two scientists who differ on the specific details of the theory of evolution. You will never find a scientist who rejects the theory of evolution. Disagreement in science is the result of not knowing, but it is always within a certain context.
The reason why mathematicians comes to the same conclusions and scientists nearly come to the same conclusions is because they form their statements from bottom-up. The scientist nor the mathematician never decide what he would like to confirm. Rather they work with what they have towards a final conclusion. In such a manner there is unanimous agreement (or almost unanimous agreement) with everybody.
But ex post facto beliefs are different. The common masses do not proceed with such care in their beliefs and ideas. They stick to what they were either taught to believe as children or something they came to accept for foolish reasons. There is no high standard of justification with ex post factor beliefs. The standards of justification are twisted into double standards so that the person can rationalize what he believes.
The proper way to come to your beliefs is not by beginning with what you believe and coming up with double standards of proof to confirm it. But to begin, as much as possible, with an empty slate and start all over again. Most importantly one must decide what standards of proofs are allowable and not allowable in such a process before the beliefs are formed. Once these standards have been established then one can proceed towards a conclusion. If in honesty you do reach the same belief that you had then good for you, but if you do not then you must have the intellectual strength to give it up and accept the new belief.
Ex post facto beliefs are simply not reliable because of the high degree of chances that all ex post facto beliefs are wrong.