21

I am very curious about the dynamics of answering questions. I often learn a lot from other answers to the question I answered, even when mine was accepted. So I understand unaccepted answers as helpful too. But I was wondering: what is the average per user number of accepted answers / number of answers ratio? Even if we do not consider the accepted answer as the only one helpful to all viewers of a post, I think such a ratio would be quite interesting.

I meant to consider answers on questions with multiple answers and an accepted answer. If I had 30 answers on questions with an accepted answer and multiple answers and 15 of those were the accepted answers, my ratio would be 0.5

9
  • 1
    given that a user can only accept at most one answer, what would this number mean? If all questions had an accepted answer the ratio would still not be 1:1 Apr 2, 2017 at 7:58
  • 1
    An example: I answered 30 questions. 15 of my answers were accepted. Ratio: 0.5 Apr 2, 2017 at 8:05
  • 3
    Some askers never accept anything so if your ratio is 0 it could be either down to a) you answered questions where the user can't be bothered or doesn't know how to accept answers or b) your answer is not as helpful as some other answer. The latter might be useful to know so you can improve, the former not so much. Apr 2, 2017 at 8:09
  • 4
    Maybe what you really want to know is your ratio when applied to answers to questions with more than one answer, one of which is accepted. Apr 2, 2017 at 8:11
  • This used to be a metric, but was ultimately removed due to users conditionally offering help to another user based on it. TL;DR: Yes, this info can be gleaned via SEDE (as in another answer points out), but it's not entirely useful for you as a mere mortal.
    – Makoto
    Apr 2, 2017 at 21:17
  • 3
    @Makoto it's not the same value as accept rate. In fact it's pretty different to that as both the numerator and denominator only count questions that have an accepted answer. Apr 2, 2017 at 21:21
  • @RobertLongson Other possibilities that confuse matters even further include (c) the asker prematurely accepts a FGITW answer less helpful than yours; and (d) your answer and some other answer mutually complement each other, leading the asker to toss a coin for deciding who gets the check mark.
    – duplode
    Apr 4, 2017 at 15:02
  • 1
    @duplode Those issues apply to everyone though so if your percentage is significantly lower than average then perhaps you've something to work on. It seems that experienced answerers are around the 60-65% mark (e.g. Jon Skeet is at 65%). Apr 4, 2017 at 15:06
  • @RobertLongson I would also imagine the accept rate would be lower(on average) in very popular tags and higher in niche tags with fewer experienced users providing answers.
    – Booga Roo
    Apr 5, 2017 at 0:18

1 Answer 1

35

You can use SEDE to query the database:

if (select count(*) as total
from posts q 
inner join posts a on a.parentid = q.id
where q.posttypeid = 1 
and a.posttypeid = 2
and q.acceptedanswerid is not null
and q.answercount > 1
and a.owneruserid = ##UserId##) > 0
select cast(cast(mine as float) / total  * 100 as varchar) + '%' from 
(select count(*) as mine
from posts q 
inner join posts a on a.parentid = q.id
where q.posttypeid = 1 
and a.posttypeid = 2
and q.acceptedanswerid is not null
and q.answercount > 1
and a.owneruserid = ##UserId##
and q.acceptedanswerid = a.id) mine,
(select count(*) as total
from posts q 
inner join posts a on a.parentid = q.id
where q.posttypeid = 1 
and a.posttypeid = 2
and q.acceptedanswerid is not null
and q.answercount > 1
and a.owneruserid = ##UserId##) total
else select 'User has not answered any questions where there are multiple answers, one of which is accepted'

Here's a link to the live query.

Your score is 36% on stackoverflow FWIW.

14
  • 1
    I am going to try to write a query to create a histogram with the score of many users to be able to figure out where one stands and what the distribution looks like. Apr 3, 2017 at 20:36
  • 3
    Should I worry about the divide by zero error I get when I run this? Apr 4, 2017 at 6:20
  • @JonathanLeffler Your id gives me 46%, so presumably you're using a different one. I guess whatever user id you're using has simply not answered any questions where there are 2 or more answers one of which is accepted. In that case they have no ratio really. Apr 4, 2017 at 6:47
  • 1
    OK; I suffer from digital dyslexia at this time of night — I mistyped my user number and the code is not resilient to non-existent users or users with insufficient data to produce an answer. The user ID that I mistyped hasn't been seen since Feb 2009 and has 3 points rep in total. Apr 4, 2017 at 6:55
  • 1
    @JonathanLeffler I've updated the answer though it does make it somewhat lengthier. Apr 4, 2017 at 7:04
  • New users; new bugs! Isn't that how it usually works? Apologies for managing to find the problem. It really wasn't my intention! Apr 4, 2017 at 7:07
  • Either there is a Bug here or I got really 146% of my answers accepted ... not bad :D.
    – Tom
    Apr 4, 2017 at 14:18
  • 2
    @tom I get 62% with your ID Apr 4, 2017 at 14:21
  • Yeah, it's strange, there are two different versions of your query, but they look the same: version 1 with 146% and version 2 with 62%.
    – Tom
    Apr 4, 2017 at 14:28
  • 3
    @tom Someone else edited and broke what you're calling version 1. It's not my query any more. Apr 4, 2017 at 14:31
  • 1
    But what's the difference in both version? Looks quite the same to me.
    – Tom
    Apr 4, 2017 at 14:34
  • 2
    @Tom q.answercount > 1 vs q.answercount = 1 third line from the bottom. Apr 4, 2017 at 14:35
  • 1
    Oh, good catch :D.
    – Tom
    Apr 4, 2017 at 14:39
  • 3
    Probably the only metric where I (76%) rank higher than Jon Skeet (66%), must be a bug.
    – SleuthEye
    Apr 5, 2017 at 0:16

You must log in to answer this question.

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