the rank of your school shouldnt affect the mark you get. im not sure whether it does or not, so dont jump down my throat or whatever,
But, you cant compare yourself to others in your school, especially if its a low ranked school, because there will be thousands of other people doing better than you if you dont try. It is sort of like, relative.
e.g. if you hang with your friends from your school, and compared to them you are a super nerd who never sees the sun, you have to realise that there will be people who are studying more than you.
at my school, i'm in a really dumb year. our principal calls us "the year who likes to party". There are predictions that we will be the worst year to go through the college, and they are probably right. So, if i compare myself to the rest of the year, and im ranked 1st in all my subjects, it doesnt mean much, because our year is not "academically focused". Just remember that there are wizz kids out there spending 12 hours a day studying, and go and study, rather than worrying about your school affected your marks.