What's the difference between 先入観 and 偏見? The dictionary is

What’s the difference between 先入観 and 偏見? The dictionary is giving me pretty much the same meanings, so I get that they’re synonyms, probably with different nuances or specific usage. I haven’t come across either of them until now, so I don’t know what to make of them. Could you please provide some examples that illustrate the difference? Thank you.

non-native Japanese speaker here:

Both refer to a type of opinion or point of view a person holds… my guess is 先入観 is neutral and the point of view (観) it refers to is open to change with available evidence (hence the 先)… while 偏見 is a derogatory term for a point of view that is based on fear or ignorance.

dooo gave the gist of it, but here’s a bit more breakdown of the kanji.

先入観 - 先 (beforehand, first) + 入 (enter, inject) + 観 (view, outlook)
偏見 - 偏 (biased, inclining) + 見 (view, opinion)

Therefore 先入観 (or 先入見) is literally “a view that is already in one’s mind (before the issue at hand)”. It corresponds to “preconceived notion”, emphasizing preexistence.
偏見 is simply “biased opinion”, or “prejudice” without any suggestion of how or why. It emphasizes the state of being unbalanced and unfair, so it is a stronger term.

観 and 見 can be treated as synonyms although 観 has the broader sense of “outlook” whereas 見 is more like one’s view or opinion on certain matters.

「先入主」という表現も見たことがあります。

A long time ago I noticed that the word “bias” was not necessarily used with negative connotations. The existence of positive bias toward old people has been discussed by some researchers.