When I view the answers to this question, sorted by votes, the accepted answer appears at the top, although it has only 14 votes, and the other answer has 24. Fine, that's what I expected, acceptance trumps votes.
However, when I view the answers to this other question (still sorting by votes), the unaccepted answer with 2 votes is at the top, and the accepted answer with 1 vote is below it. Why is that? (In this case the user who asked the question accepted his own answer, but I don't see why that would make a difference.)