What is the opposite of the word prediction? I thought of retrospect but that refers to events that already happened.
The OED lists retrodict as:
state a fact about the past based on inference or deduction, rather than evidence.
An example of this word being actually used in science:
This conclusion was, then, serendipitous by suggesting that there had been an early event satisfying the specific etiology that Freud had hypothesized for Lorenz's obsessional neurosis. Since this etiology required precocious masturbation events, Freud retrodicted that the patient had been punished by his father for masturbation (...)
Excerpt from Mind and Medicine, page 276. Emphasis mine.
How about "hindsight":
Hindsight: recognition of the realities, possibilities, or requirements of a situation, event, decision etc., after its occurrence.
There really is no direct antonym for prediction, in the sense of the definition "to express an outcome in advance". The thesaurus entry does list antonyms for other definitions, however.