You think you're right but you're actually wrong
The person is definitely a liar. If they really are believing the lie, then they might even be delusional.
As @jimreed says, such a person is a liar. This basically covers all contexts where someone says something that they know is untrue. But OP is specifically looking for a way to describe a liar who is aware that at least some other people know for certain that what he says untrue.
The most common terms for the specific context are brazen and barefaced liar, both of which occur about equally. Both these adjectives are also commonly applied to the lie itself, but for some reason barefaced lie is more common than brazen lie.
A common coarse slang term that comes to mind is bullshitter. I'm not saying Urban Dictionary is always a reliable authority, but I can't fault the example in definition 7 there - Someone who will claim he drank 2 litres of vodka and was not drunk.
If he knows is wrong, but is trying to prevent others from detecting the wrongness, he is being deceitful .
You may also call him a fabricator, a liar, or a whitewasher — although that less connotes lying about knowing the truth than of glossing over a transgression.
The act, by the way, is called scapegoating.
'Pig-headed' is the word I'd use.