I'm afraid I don't visit this forum often, so I'm not aware of past combat discussions. There have been a few threads on Apolyton about the formula. Here's a pretty thorough one:
Great Library: CivII combat (Marquis de Sodaq) -- same as Sodak?. Combat can be predicted well using a binomial distribution equation. Unfortunately, the original thread in which the equation was first discussed by Eggman, Euclid, and Buenos, is no longer available.
Based on the discussion there, I wrote the attached Excel program, which does the following:
1) predict the probability of success for a single attacking unit;
2) predict the average attacker's loss required to kill one defending unit;
3) allows modification of combat factors caused by terrain, special combat cases, vet status, fortified status, remaining movement, etc (this required most of the programming work);
4) briefly explains most of the modifiers.
One advantage of using Excel is that you can use the BINOMDIST function and solve the equation in a single cell, rather than make rows of results to sum. If you have Excel, please give this program a try. You can dissect it to get some detailed answers to your question. I wrote it to help scenario development, but it certainly can help you with your request. It's gone through a few rounds of beta testing (thanks, Slowthinker and Henrik), but I could use some more feedback.
I think Kobayashi also wrote a calculator in Excel that uses a more empirical approach.