I've forgotten the formal proof for this, but hopefully this is correct:
Consider a D6 (for the sake of concrete language).
When you roll a 1, you reroll the die and keep the result. This produces an average value of 3.5, and happens 1/6 of the time.
When you roll a 2, you reroll the die and keep the result (even if it's lower). This produces an average value of 3.5, and happens 1/6 of the time.
When you roll a 3, you keep the result. This produces an average value of 3, and happens 1/6 of the time.
And so on.
This gives the following formula for the average of the D6: \$ (3.5 + 3.5 + 3 + 4 + 5 + 6) / 6 = 4.1\bar{6}\$.
Working similar formulas for the other dice, we get this table:
\begin{array}{lccc}
\hline
\text{Die} & \text{(standard) Avg.} & \text{GWF Avg.} & \Delta \\
\hline
\text{d4} & 2.5 & 3.00 & 0.50 \\
\text{d6} & 3.5 & 4.1\bar{6} & 0.6\bar{6} \\
\text{d8} & 4.5 & 5.25 & 0.75 \\
\text{d10} & 5.5 & 6.30 & 0.80 \\
\text{d12} & 6.5 & 7.3\bar{3} & 0.8\bar{3} \\
\hline
\end{array}
Dice are independent. 2D6 will have an average value of \$2 \cdot 4.1\bar{6} = 8.3\bar{3}\$.
Common weapon average damage (Great Weapon Fighting):
\begin{array}{lcc}
\hline
\text{Weapon} & \text{Avg. GWF dmg} & \text{improvement w/ GWF}\\ \hline
\text{Greatsword (2d6)} & 8.3\bar{3} & 1.3\bar{3} \\
\text{Greataxe (1d12)} & 7.3\bar{3} & 0.8\bar{3} \\
\text{Longsword (1d10)} & 6.30 & 0.80 \\
\text{Double-bladed Scimitar (2d4)} & 6 & 1 \\
\text{Smite (level 1, 2d8)} & 10.50 & 1.50 \\
\qquad \text{(+ weapon damage)} \\ \hline
\end{array}
Observations:
The ability works out to about a +1 to damage.
It scales to almost a +3 when smiting. The more dice you add (high level smite, for example), the better the ability.See errata, below
The bonus is "swingy." It can range from a -2 to a +10 on 2D6, for example.
Errata
In April of 2016, Jeremy Crawford ruled that additional dice from abilities like smite can not be re-rolled by Great Weapon Fighting.
If you are using a versatile weapon, you can only gain the benefit of the Great Weapon Fighting Style if you you are using it in both hands. Similarly, you can only gain the benefit of the Dueling Fighting Style if you are using it in one hand. (And holding no other weapons.)
So, let's take a look at how this breaks down with a longsword (or battleaxe, they're equivalent.)
- 2-handed: 1d10 + Str, reroll 1s and 2s. Average damage = 6.3 + Str
- 1-handed: 1d8 + Str + 2. Average damage = 6.5 + Str.
Obligatory anydice link: http://anydice.com/program/5b1e.
As well as this, wielding your weapon 1-handed allows you to use your other hand for something. (Like a shield!) This can be a huge benefit.
So for versatile weapons, the Dueling Fighting Style is actually strictly superior to the Great Weapon Fighting Style.
However, if you want to use a two-handed weapon, you should probably use an actual two-handed weapon rather than a versatile one, at which point you can achieve much higher damage.
Best Answer
At L1, Two Weapon fighting (TWF) is more optimized. At level 5 the preference switches to Great Weapon Fighting (GWF).
Let's look at why. We're only going to go with a brief snapshot here of L1 and L20. I'm going to assume that Str is 16 at L1 and 20 at L20. Our TWF will wield dual Scimitars (or short swords), and our GWF will wield the Maul or Great Sword.
We'll use the Ogre from the starter as our jousting dummy at L1 (AC 11) and the Nothic (AC 15) at L20 (the Ogre is a near auto hit and thus relatively uninteresting for this particular comparison). The hit chance for our L1 bout is 75%, and the hit chance for our L20 bout is 80%. When a better study of monsters is available to me, I'll update our hit chances here.
To explain the concepts here the TWF gets to add their stat bonus to their bonus action attack, whereas our GWF gets to reroll any 1s and 2s on their first pass of die rolls. We'll be using the following formula for the average die for the GWF:
\$ \text{Avg}(2\text{d}6) = 2\left( \frac2 6 * 3.5 + \frac4 6 * 4.5 = \frac{25} 6 \right) = 8.33 \$
To calculate crits in 5e, you simply multiple the dice rolled by the crit chance. Since nothing is maxed, there is no need to subtract the crit term from the main roll in this edition.
L1 AC 11:
\$ \text{GWF}: 2\text{d}6 + 3 = 11.33 * .75 + .05*8.33 = 8.914 \text{ DPR} \\ \text{TWF}: 2*(1\text{d}6+ 3) = 2*(6.5*.75 + .05*3.5) = 10.1 \text{ DPR} \$
As you can see, at L1, the TWF has an edge of about 1 DPR. Let's look at L20. At L20, our stats go to 20, the fighter makes 4 attacks per round plus the TWF gets his bonus action and the crit range is 18-20 or 15%. Our attack bonus is +11 and our hit chance is 80%
L20 AC 15:
\$ \text{GWF}: 4*(2\text{d}6+5) = 4*(13.33 * .8 + .15 * 8.33) = 47.65 \\ \text{TWF}: 5*(1\text{d}6+5) = 5*(8.5 * .8 + .15 * 3.5) = 36.63 \$
At this point the TWF is heavily outclassed by the GWF. It's not even really close. It becomes a bit closer when the hit chance is lower. But, ultimately, the problem is that the TWF only ever gets that single bonus action attack, and it's not going to be enough to compete with the GWF's big single attacks.