plenty of discussions about this in these forums and in this forum in particular. Have a look at the Sticky discussion at the top of this forum for example.
The installer does not contain viruses. It may contain a toolbar or some utility that might be helpful to a user, but some of which may track a users web surfing. it's called Adware by many although it is not true adware.
Running the installer would have been fine as you will see the option to 'remove' this option before continuing.
Alternatively, you could have used the "Direct download link" underneath the green Download Now button and avoided the installer.
But I got my Firefox direct from Mozilla. You don't get viruses from recognised sites and businesses.