Modified duration = 1+myMacaulay duration
Where y is the yield and m is the compounding frequency per annum. We first calculate the Macaulay duration:
Macaulay duration = Market Price of Bond∑t=1nPV(Ct)T
Where PV(Ct) is the present value of coupon payments at time t, and T is the time to maturity.
Price of the bond = 1.03150+1.03250+1.03350+1.0341050=1074.34
Thus,
Macaulay duration = 1074.341×1.03150+1074.342×1.03250+1074.343×1.03350+1074.344×1.0341050=3.73412
And so the modified duration is given by:
Modified duration = 1+myMacaulay duration
= 1+10.033.73412
= $3.62535 \approx 3.62$