If we divine a discrepancy between a man's words and his character the whole impression of him becomes broken and painful he revolts the imagination by his lack of unity and even the good in him is hardly accepted.
Sometimes a character is really based on research that you do. Other times it's just based on your imagination or perhaps your conversation with the director. Or sometimes all of the above. It depends on the movie and character.