What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

Use Case:

Suppose a new popular question comes in and has 20 views on it before the first answer is submitted. The first answer is pretty good, so when the question hits 120 views it has 20 votes: 1 vote for every 5 views...not bad! Also, several other answers have been submitted, but the other answers don't really add much and are thus all sitting at 1 or 2 votes, so sorting by votes works wonderfully at this point and brings the best answer to the top.

However, at the time of the 119th view, Jon Skeet was eating his last bite of lunch with Bill Gates (who unfortunately does not allow Jon to log into SE when they are eating out together because it intimidates him). Thus, Jon sees the question while he's washing his hands and types out and submits his answer while he's drying them with a paper towel. At this point, the question has 120 views (Jon was the 120th viewer).

As always, Jon's answer is stupendous, and so his answer has 10 votes by the time the question has 150 views*, while the first answer now has 26 votes. Thus, the first answer is still sitting at 1 vote for every 5 views, whereas Jon's answer is sitting at 1 vote for every 3 views, meaning a greater percentage of people like Jon's answer over the first answer. Herein lies our problem that sorting by votes will not always put the best answer at the top of our list.

*You may be asking yourself, "Why doesn't Jon's answer have 30 votes at 150 views?". The answer to this excellent question is that 20 of the 30 viewers were lazy and didn't read past the top-sorted answer.

Proposal:

Add "Weighted Votes" as an additional (default?) sorting option. This would essentially allow users to sort on the percentage of people who thought the answer deserved an up-vote.

Option 1:

Formula:

numberOfVotes / answerViews   //If answerViews > 0
0                             //If answerViews == 0

Variables:

numberOfVotes = The number of votes on the question
answerViews = The number of views after the answer was submitted. This value of this could range from the question's current view count minus the view count when the answer was submitted (which would miss returning users) to a count of the distinct users who viewed each question (for a completely accurate view count).

Analysis:

At 150 views from our use case, the first answer's sort would be .2 and Jon's answer's sort would be .333, so Jon's would be sorted to the top.

Now, the real question is how quick would Jon's answer float to the top? Let's say that viewers 121-129 don't read the zero-voted answers, so they don't see Jon's answer. However, viewer #130 reads all the answers, and thus gives Jon the first up-vote. At this point, Jon's answer will have a weighted vote score of .1, and will thus still appear below the first answer. Similarly, viewers 131-134 don't read answers with fewer than 2 votes, but the 135th viewer reads Jon's answer and gives it another up-vote, leaving it still below the first answer at .1333. In viewers 136-140, his answer gets 2 more votes to put it at 4 total votes, which puts the weighted votes count at .2, which is when his answer would overtakes the first answer. Thus, in this case it would take 20 viewers before Jon's answer would get sorted to the top spot using this method.

Option 2 (More Involved):

Formula:

numberOfVotes / answerReads   //If answerReads > 0
0                             //If answerReads == 0

Variables:

numberOfVotes = The number of votes on the question
answerReads = Come up with a mechanism to determine when an answer is actually "read". This would be similar to Google Reader, where when a user hovers their mouse over an answer or scrolls past it, the answer is marked read for that user.

Analysis:

At 150 views from our use case, the first answer's sort would be .2 and Jon's answer's sort would be 1, so Jon's would be sorted to the top.

How long would it take Jon's answer to get to the top spot? His answer would be at the top after the first reader up-votes his answer, which would be the 130th viewer. Thus, it would take 10 viewers for his answer to get on top instead of 20.

Note: I also considered sorting unread/unviewed answers to the top, which would mean that 121st viewer would see Jon's answer and vote it up, and so his answer would immediately take the first position. However, if that were done the worst answer could be at the top for one unlucky viewer, so I don't think this would be a good decision. Instead, I think it better that the truly interested "130th" viewer get the first vote on it.

Update:

To see this in action, here is a sample query using option 1 to sort questions with over 50,000 views by popularity.

Points to consider:

  • "Be careful with what 'views' means": For option 1, view counts on answers would have to be tallied similar to how view counts on questions are tallied.
  • "Massively overwrought system": Up to you.
  • "Involves a huge change to how the data is stored": This is an incorrect assumption, as answers are stored in posts which already have a viewCount column. This column is currently unused and would need to be populated for answers, but no data change is needed.
  • "huge change to how the UI works...": The only change would be to add a "popularity" tab next to "active", "oldest", and "votes".
  • "Debatable gain": Up to you, but I definitely see the merits of this.
  • "A vote is a vote": Yes, and sorting by total votes would not be removed. This would just be an additional sort.
  • "The smaller population won't always represent the larger population" & "What if the first viewer of a new answer upvotes it? Does that make a 1 vote answer shoot up to the top over a 50 vote answer?": This could be solved by modifying the query so that answers with less history will stay at the bottom longer (thanks blahdiblah for the link).
  • "Drastically skewed when...thousands of external visitors...do not have voting accounts": To avoid this, the "view" count for the answer sort should only count viewers able to vote.
share|improve this question
2  
Thus, it would take 10 viewers for his answer to get on top instead of 20. Because Jon needs more help getting votes. –  LittleBobbyTables Jan 29 '13 at 18:35
2  
You need to be careful with what "views" means. Imagine that I vists the question because I, too, and interested, can't answer it, go away but leave the tab open so I can check back. When the "3 new answers" thing comes up I refresh vote for a couple of them and leave the tab again. Then Jon answer, I notice the change refresh and vote for Jon. As I understand only my first visit counted, so now people have votes (mine) that don't belong to any view. In particular if I have been fast, Jon has 1 vote credited for zero credited views. Ouch. –  dmckee Jan 29 '13 at 18:44
    
@dmckee: You don't even necessarily need to stay on the page for that to happen. Revisiting the question won't count as another view for some time. –  animuson Jan 29 '13 at 18:48
    
@dmckee: Agreed. For "views" in option 1, the ideal solution would be where there is 1 view per question per user. Thus, if a user comes back and a new answer is added, the view count for the answer must be bumped up, whereas the view count for the question would remain the same. –  Briguy37 Jan 29 '13 at 19:40
    
@LittleBobbyTables - Shouldn't your user name be '); DROP TABLE Users -- –  JDB Jan 29 '13 at 21:05
    
I really don't understand the down-votes here. I think this would be a great tool to have, especially for old questions with great new answers that would have little chance of being seen otherwise. Would someone please care to give a good explanation of why they wouldn't like this feature? –  Briguy37 Jan 29 '13 at 21:30
2  
I think this is a massively overwrought system, involving huge change to how the data is stored and how the UI works, for debatable gain. Further, a vote is a vote, regardless of how many people have seen the question before the vote was placed. –  meagar Jan 29 '13 at 23:45
    
If you're interested in a more complex statistical analysis of calculating a post's correct ranking while taking into account different view counts, see "How not to sort by average rating." –  blahdiblah Jan 30 '13 at 1:27
1  
Another major problem with views is that the # of views can be drastically skewed when a question is "reddited" and tens of thousands of external visitors come (many of which do not have voting accounts). –  Mysticial Jan 30 '13 at 3:21

1 Answer 1

Thus, the first answer is still sitting at 1 vote for every 5 views, whereas Jon's answer is sitting at 1 vote for every 3 views, meaning a greater percentage of people like Jon's answer over the first answer.

Or, it could just be that a greater density of people willing and/or able to vote on the answers were visiting during the most recent period of time, and that the number of votes per number of views really has nothing to do with the quality of the answer.

share|improve this answer
1  
+1 And what if the first viewer of a new answer upvotes it? Does that make a 1 vote answer shoot up to the top over a 50 vote answer? –  JDB Jan 29 '13 at 19:01
    
You bring up a good point that some users are unable to vote. Thus, it is important the "view" count for the answer sort should only count viewers able to vote. As for your other point, that case is the exception. In general, smaller populations on SE will predict larger ones, and the results will only get more accurate the more data ("views") you get for answers. For example, in this case it assumes that viewers 21-120 would have voted similarly to viewers 121-150. It won't be perfect, but I really think it will give a better indication of the "value" of an answer than a flat vote count. –  Briguy37 Jan 29 '13 at 20:30
    
@Briguy37: You're also assuming that just because a user has the privilege to vote means they are able to vote. There are plenty of circumstances where a user might view a question and have no knowledge of the programming language utilized whatsoever. Views are too random. They're just not a good measurement for anything other than rough popularity of the question. –  animuson Jan 29 '13 at 20:33
    
@animuson: No, I'm assuming that the percentage of those users in the smaller population approximates the percentage of those users in the larger population. –  Briguy37 Jan 29 '13 at 21:00
    
@Cyborgx37 If 1 of 1 user found an answer helpful (keep in mind this means a the first viewer visited the question page, read the answer, and voted on it BEFORE the next viewer came), I'd say generally that that question deserves some additional review. That said, I wouldn't be opposed to a minimum view limit to avoid this occurrence if that was the consensus. P.S. I like your username suffix :) –  Briguy37 Jan 29 '13 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .