There are many factors that may affect the internet speed...and it includes all that you have specified...It is just that the percentage may be more for one..or the other...
I feel first the laptop should be proper...and we should maintain it properly..like upgrading to new OS,using good anti virus,deleting the cookies/cache..once in a while clean the system from unwanted files..clear recycle bin etc.
Next,proper Internet mode...this is more important..Fiber optic and cable internet tend to be faster than DSL and dial-Up.so we should stick with the one that gives good internet supply...
Then proper installation with the mode that we have set up..like router or modem in case of broadband...or good cable in case of dial up etc.
Regular check of internet speed through sites like Scanmyspeed.com is also necessary...for governing good internet speed.