According to my understanding, the way we learn history is mostly determined by reading accounts of source's within the period they were living in. I could imagine that the further into history we go, the harder it gets to verify sources.
Since I'm a science guy, Im quite interested in how historians concider their sources to be "true". In science we confirm hypothesis by conducting (laboratory) research and reading papers written by other researchers -who conducted similar experiments- on the subject. Once a hypotheses has been confirmed/refuted by a study the general consensus moves towards the path with the most results proving a theory.
I can image that confirming a historical hypothesis will be more difficult, since results can't be reproduced in a laboratory setting.
Also, their might be a bias depending on the source. Especially considering the saying 'history is written by the victor'. In a laboratory setting it's quite easy to debunk a theory since we can reproduce the result. Even if the author is making false claims, reproducing these results should expose the author's bias. This seems to be different in history since you're comparing one word against another.
So for example: writers from side X claim they fought a battle and had a decisive victory over side Y with limited casualties while side Y claimed they have lost the battle but inflicted heavy casualties on side x while having low casualties themselves. Both accounts claim they lost the battle, but the stories have a huge discrepancy. How can you prove which side is telling the truth?
Simplifying my questing (tl;dr): How can historians know for certain that a specific historical event is described they way it truly happended; Is it possible that the way we learn history flavouring historical accounts of the victor or only source?
This is one of the biggest differences between history and the STEM fields. The thing is, over in STEM, you lot don't really deal with humans, as such. History, on the other hand, is all about humans. It's written by humans, written for humans, researched by, interpreted by, and presented by humans, for the benefit of humans.
The problem here is that the human is a stupid, selfish, blinkered, biased creature who is incapable of objectivity or neutrality. A human's memory is a self-serving thing, easily bent to presenting themself in the best possible light. Moreover, a human has an incredibly limited point of view; what a human thinks is happening to them right now may not even be actually what is happening when one looks at it from a more detached perspective.
It's not a question of whether a source is biased - they all are. I'm Filipino, I'm always going to write a different perspective of the Philippine-American War as compared to an American writing of the same thing. The question is, how is the source biased, and how does their bias affect their point of view? I refer you to my usual set of previous posts when asking about bias:
Further links in next post because argh tag limit. But while we're here, let's try out your example case.
So for example: writers from side X claim they fought a battle and had a decisive victory over side Y with limited casualties while side Y claimed they have lost the battle but inflicted heavy casualties on side x while having low casualties themselves. Both accounts claim they lost the battle, but the stories have a huge discrepancy. How can you prove which side is telling the truth?
This is a pretty good set already! We have agreement from both sides that there was a battle. Thus we can be reasonably sure that The Battle of Example happened. I'm not kidding here. There remains a reasonable possibility that the Battle of the Catalaunian Fields didn't happen. That we have this certainty is already a pretty good step along.
Next, compare the accounts. Who do they say has participated? Where do they say it's happening? Are they, in fact, describing the same battle? How do their accounts differ? How do they describe the proceedings? Are events in Side X's account compatible with events in Side Y? That part about the cavalry attack led by Caius Placeholderus Scipio Nonsuch into Side X's camp, when do the accounts say it happened? At the start or at the end of the battle?
Compare it to existing literature and the tropes inherent in it - is someone deliberately calling back to prized literary themes in their culture? Think about the writing styles of each writer on either side. Think about their backgrounds. Is one a political writer? Did another serve in their military? Are any of them familiar with the other side?
Consider the chain of transmission and how 'close' the writers are. Were any of them actually participating in the battle? If so, when did they write down their accounts, and who were those accounts for? A letter to a close friend is not going to be the same as an open announcement to the people, and neither are going to be quite like an internal military report.
And so on, and so on, things like this - and that's just for the battle alone. If we have the source base, we can cross-check the casualty records. Hospital records, for instance - how many were treated on the day? Supply records for before versus after - does this amount of provisions seem right for an army of this size? If Side X says they had limited casualties but their food order for the day after seems curiously low and you know you can't account for it otherwise (no looting, no 'foraging' or anything), are we really sure their casualties were so low? Track the correspondence of the participants after - maybe someone's grousing about having to retrain so many people because their unit caught the brunt of it.
Basically, even if our 'official' accounts of the battle may not match up, we can always look elsewhere. If you can't analyse the thing itself, analyse what effect it leaves on the rest of the picture. Events never happen in a vacuum.
Of course, the problem here is that, for a lot of history, we just plain don't have the sources. We don't have the Persian point of view of any of the famous Greece-versus-Persia battles (Marathon, Thermopylai, Plataiai, so on) because the Persians didn't have a written record. Neither do we have any Hun histories to confirm whether Catalaunian Fields did happen from their side. Even though there's still Debate over how large the armies are at Agincourt, the good thing about that stupidly overrated battle is that both sides agree it happened, even if they still disagree over some details. And both sides do agree on the general course of the battle, so we're decently sure.
Also, as someone from a nation which has a proven track record of losing, I laugh at 'written by the victors'. We losers absolutely have our own history. In fact, loser's testimony can and has shaped historical interpretation before; ask a WWII Pacific Theatre historian about Fuchida Mitsuo sometime. The equally delicious thing? It also took the losers (ie, Japanese records and procedures) to debunk Fuchida's lies.