Pulse-powering heavy loads with a coin cell
The calculation is straightforward. The capacitor size is simply a question of how much voltage drop you can tolerate over the duration of the pulse. The average current from the battery is a function of the duty cycle.

&Delta;V = I &times; &Delta;t / C

Solving for C gives:

C = I &times; &Delta;t / &Delta;V

Let's assume you can allow &Delta;V = 0.1V. For your first example, this works out to:

C = 25 mA &times; 25 ms / 0.1 V = 6.25 mF

The average current draw is 25 mA * 25 ms / 2.5 s = 0.25 mA.

For the second example, the numbers work out to:

C = 50 mA &times; 100 ms / 0.1 V = 50 mF

Average current = 50 mA * 100 ms / 1.0 s = 5 mA.