The discrepancy in your calculations may be due to a misunderstanding. Let's break down your expenses:
1. Start with $50.
2. Buy water for $20, leaving $30.
3. Buy a pen for $15, leaving $15.
4. Buy a burger for $9, leaving $6.
5. Tip the waiter $6, leaving $0.
When you add up your expenses, it should equal $50, not $51. The amounts you've spent and the tip given should account for the entire $50 initial amount. Double-check your calculations, and if there's still an error, let me know where you think the discrepancy might be.