I am travelling to the UK for a school tour and I have an accompanied child visa, as I am under 18, which clearly states that it's only valid if accompanied by my teacher. However I wish to stay in the UK longer. Can I leave the UK alone a few days after my teacher has left?
No you shouldn't do so, even if someone suggests you can. Some people like to suggest that just because UK does not have exit immigration nobody will notice this, don't listen to them.
The adult listed on your visa is supposed to take care of your well being throughout the trip and not just facilitate you with an entry. If you remain there and the said adult leaves the UK you/they might have trouble going to the UK again.
After our first trip to the UK when we were checking in at the airport to go back home the check-in officer noticed that our child's surname was different from ours and looked at our passports for a few more minutes. Then she asked: Do you happen to carry his birth certificate with you? I had it and presented it immediately. She saw it and said perfect and gave us our boarding passes.
This incident does not directly relate to your situation but it does relate to the fact that they really care about child visitors even on exit. Even when me and my wife were both listed on his visa and were with him we were still asked for a certificate. Imagine being really unaccompanied on exit.