You then use the map( ) function to calculate dutyCycle.
The map( ) function uses integer arithmetic, so you end up with only 5 different values generated for dutyCycle.
Here I have printed the value of 'dutyCycle' out to the serial plotter:
I was going to say the answer is no, because the output can only vary between GND and 5V.
However, I realised that if you put an oscilloscope on to "AC Coupling", then it displays what you just asked for.
So it might be possible to generate a signal that goes from -2.5V to +2.5v by feeding the PWM signal in to a Low Pass Filter, and then feeding the output of the Low Pass Filter in to a High Pass Filter.
The cut-off frequencies of the two filters would need to be carefully set to get good results.
The Low Pass Filter needs to have a cut-off frequency between the original PWM frequency and the desired output frequency.
The High Pass Filter needs to have a cut-off frequency lower than the output frequency.
Maybe an active filter using 2 op-amps would work: