You can also look at the lights. If battery is too low to start it should dim the lights while stationary. Apply all lights and while watching main light press the brake - if it dims it mean no good.
Does this optimate got V meter on it? (never had one - newer will).
If it does plug it to battery "only" and it will show you remaining power/Voltage. If this will be lower than (let's say - no electrician background) 9V - it will be battery capacity reduced = replace battery.

How old is battery and how often do you ride it?