You actually want the pipe to be bigger than the exhaust outlet, a step there stops backflow. Then the length,
it should be tuned to the RPM's you want to enhance. Usually the head pipe is too short on a scooter as it looks
correct. I have a chart for intake, I wonder if it is the same as for exhaust?
As you see 18" has a maximum amplitude at 8000 RPM's on the second harmonic. This can increase power
by 10% if properly sized. You could tune for the 2nd and 3rd to occur at the torque peak and HP peak...
You also want to step open at the muffler to tune to different RPM's. Here's a properly setup pipe;
And the Dyno chart;