I'm shamelessly quoting from 4e here, but I think the following applies in most (non-mechanized) RPG's at least to some extent.
Hit Points
Over the course of a battle, you take damage from attacks. Hit points (hp) measure your ability to stand up to punishment, turn deadly strikes into glancing blows, and stay on your feet throughout a battle. Hit points represent more than physical endurance. They represent your character’s skill, luck, and resolve—all the factors that combine to help you stay alive in a combat situation.
If Hit Points are abstracted in this way, then damage must be too. Static damage doesn't necessarily mean the same exact slice or the same exact bruise inflicted on the target. The first 5 damage might be a club swing that bounced off the fighter's shield, but weakened his arm a little bit. The next 5 damage could be an actual connecting blow that left a mark. Really, 5 damage could even be a complete miss. The fighter could avoid a swing altogether, but got a stitch in his side as he wrenched out of the way. So even "inept hits" can do "damage".
Again, I'm using 4e here, but the issue of randomization is covered in which dice are used for the damage roll. Two dagger wounds aren't going to vary much from one another, hence a 1d4 is used. Two greataxe wounds could be very different, and thus we have the 1d12 for greater variance.
I guess what I'm saying here is that static damage doesn't really differ from variable damage in terms of what you'd see happening in the game world. It's just a rule difference to make combat go more smoothly for certain repetitive attacks, and more exciting for those important hits.
EDIT: I was thinking back to my time playing AD&D. I don't know how many RPG's use this model, but AD&D used 1 minute rounds. This also abstracts how static damage would be perceived in the game world, though in a different way. We can remove the Hit Point abstraction altogether and assume that 5 damage really means 5 "points" worth of physical harm to your body.
So sure, the critter might do the same amount of bodily harm to you each round (on average), but we are dealing with minutes here. That indicates that it wasn't from just one blow, but rather a series of glancing blows, solid hits, and misses. The weapon properties don't necessarily have anything to do with it. It's just the cumulative amount of punishment that went out over the minute.
- To Hit : H (Your to-hit as given by charbuilder)
- Level : L (Your Level)
- Bow Dice: B
- Quarry: U
- CritChance: C
- CritDamage: D
- Static Modifier: S
HitChance (T) = 1-((L+14-H-1)/20)-C
Odds of Quarry (Q) = 1-( (1-T)^2 ) * U + 1-( (1-C)^2)*max(U)
Average Damage = ( T*(B+S) + C*(max(B)+S+D) )*2 + Q
In english: Calculating twin-strike without quarry is trivial, you simply apply the average damage calculation as presented here and then calculate the odds of hitting at least once and multiply that through the quarry. I will assume that you are competent to add misc bonuses into your hit modifier and your static modifier.
In terms of optimization, for double-attackers, getting accuracy and the staticMod as high as possible is key. Hunter's quarry is "meh" in comparison.
Edit
Running the numbers provided from your comment with the following:
If it's not to much to ask... what would the average damage for Twin Strike be for: Ranger, Level 26, To-hit +32, Weapon Ench +5, Weapon Focus Feat giving +3 damage, hit chance 10% (epic tier feat making crits 19-20), Quarry 3d8, and +2 to damage (due to Bracers giving +2 item bonus to melee attacks). He's using 2 bastard swords (d10 damage). –
We start by listing assumptions and requirements.
Requirement: Does a twin-bastard sword ranger do excessive damage?
Assumption: Excessive damage will be defined as being able to drop a standard monster in less than two rounds, as per the DPR king thread.
Assumption: PP and ED play a significant role in this calculation. Therefore we must calculate damage with and without an optimal PP and ED.
Assumption: An optimal PP is one that is sky blue here as is ED
Assumption: Weapon choice has a significant impact, therefore we must also perform these calculations with and without magical weapon.
Assumption: Stated +32 to hit resolves into an 18 strength at level 1 pre-racial or ED. Therefore, I will assume a +2 due to ED, and not apply racial cheese.
Assumption: Feat choice has a significant impact, therefore I will assess the damage with and without the paragon-tier prime * feats. I will not perform further calculations as to frostcheese or other damage strategies.
Therefore:
Build 1, semi-competent damage: Half-orc, two-blade ranger, Heavy weapon expertise, bastard sword prof, Stormwarden PP, Indominable Champion ED (Boring as *, but whatever), Lethal Hunter, Heavy Blade Mastery, Called Shot, Prime Punisher, Slashing Storm, Weapon Focus (Heavy Blade), Iron Armbands of Power (Heroic Tier?)
There are so many more optimizations possible, but this is a good "Not too glassy" option leaving many feat, items, and so-forth.
Character builder produces the following attack: +32 v. AC // 2d19+10 damage,+3d8 quarry, +5 to damage rolls due to called shot, prime punisher, +1 to accuracy due to prime shot.
The complete expression to be evaluated is, therefore:
(32 accuracy, AC of 26+14, extra -1 due to prime shot)
Base damage, before quarry. (1-(26+14-32-1-1)/20-.1)*(5.5*2+10+5)*2+.1*(10*2+10+5+3.5*5)*2 = 41.700
Rounds to drop 1 enemy, before quarry = 5.5 = absolutely pathetic for a striker. Minimum recommended striker rounds = 4
Quarry damage, calculated correct follows the following pattern: Odds of hitting the first time * quarry + odds of critting the first time * quarry + (odds of hitting the second time * odds of missing first time) * quarry + (odds of critting the second time - odds of missing the first time) * quarry.
Odds of hitting: (1-(26+14-32-1-1)/20-.1)
60%
Odds of critting: 10%
Odds of missing: (26+14-32-1-1)/20)=30%
Total odds =1
.6*4.5*3+.1*8*3+.6*.3*4.5*3+.1*.3*8*3=13.65 expected quarry damage from one twin strike
Total DPR:
13.65+41.700=55.130
(8*26+24)/55.130=4.208
Not quite in minimum striker level damage.
Extra DPR 2*Dex (stormwarden, assuming both 11 and 16 come into play) + Wis (slashing storm)= +8+8+2 = +18
55.130+18=73.130
(8*26+24)/73.130=3.172
Just about right for a semi-optimized ranger at-will.
Dropping prime punisher and called shot gets twin-strike DPR to: 32.6, 13.257 quarry damage
32.6+13.257+18 = 63.857, 3.633 rounds, just right.
Dropping stormwarden:
32.6+13.257+2 = 47.857, 4.847 rounds, unacceptable.
Therefore, based on the parameters you described, the ranger's damage probably fits into the low end of the "striker damage" window or below and should be allowed into your game.
Best Answer
There's no way to get the damage in a general case, as whichever actions you should choose depend on the circumstances and it's impossible to know the circumstances ahead of time.
You can calculate the damage amounts based on certain assumptions, though. For example, if you assume you'll have advantage about every other turn, just take the average of the damage you do when you have advantage and the damage you do without advantage.
This has the caveat that it relies on the accuracy of your estimate, but it's literally the best you can do. Try to get a good estimate on how often you'll use each of the options and weigh each option's average damage accordingly. For example, if you deal 10 damage every fourth turn and 8 damage otherwise, your average damage should be:
$$ \left( 8 \times \dfrac 3 4 \right) + \left( 10 \times \frac 1 4 \right) = 6 + 2.5 = 8.5 $$
Only if all the five different cases are equally common, which I don't think is likely. Without knowing the 5e mechanics very well yet, I assume some of these five options happen far more than the others, meaning they'll have a higher impact on your overall average damage per turn.