75

Does anyone know how often an unanswered question becomes answered once a bounty is set on it? Just looking for an approximate figure.

4
  • 5
    Would you consider “answered” to mean “attracted new [upvoted] answers” or does it have to be “attracted a new answer which OP subsequently accepted”?
    – Dan Bron
    Jan 1, 2018 at 9:45
  • 1
    And also, would you consider "answered" to mean "at least got new answers, but because they're bad (NAA, VLQ, etc) they got deleted"? (because SEDE can't handle deleted posts, only devs can answer this)
    – Andrew T.
    Jan 2, 2018 at 7:27
  • An additional layer to the question would be how many more answers did questions with a bounty receive relative to similar questions without a bounty. I assume dead questions stay dead but not always. Jan 3, 2018 at 18:12
  • For what it's worth, I've concluded that bounties certainly increase views to a question and probably slightly increase answer quality compared to questions that don't get bounties. However, my analysis was done with all questions including questions that already have answers. Jan 8, 2018 at 23:07

1 Answer 1

104

Since it's not precisely clear which figures you are looking for, I threw together a SEDE query which calculates a number of them. It looks for answers posted during the bounty (thanks @JonClements for suggesting a better way to do this). While bounties are available since 2009, the SEDE query relies on post notices which are available from November 2011, but it's still a large dataset to work with.

The results, based on just over 100,000 bounties, are:

  • 88.82% of the bounties result in an answer being posted; on average, a bounty attracts 1.56 new answers.
  • 77.14% of the bounties result in answers with a positive score (but that score might be reached after the bounty ends), on average, a bounty attracts 1.15 answers with a positive score.
  • 55.09% of the bounties result in an answer which is subsequently accepted; if we only count bounties posted by the OP, that percentage rises to 58.25%.

For reference, here is the complete query. Feel free to fork it if you want to use it for further analysis.

CREATE TABLE #results (QuestionId int, BountyStart datetime, Asker int,
  Bountier int, NumberOfAnswers int, NumberOfUpvotedAnswers int,
  AcceptedAnswer int);
  
INSERT INTO #results
SELECT QuestionId, BountyStart, Asker, Bountier,
  SUM(CASE WHEN AnswerId IS NOT NULL THEN 1 ELSE 0 END) AS NumberOfAnswers,
  SUM(CASE WHEN Score > 0 THEN 1 ELSE 0 END) AS NumberOfUpvotedAnswers,
  SUM(CASE WHEN AnswerId = AcceptedAnswerId THEN 1 ELSE 0 END) AS AcceptedAnswer
  FROM

(
SELECT q.Id AS QuestionId, q.AcceptedAnswerId, q.OwnerUserId AS Asker,
  pn.CreationDate AS BountyStart, pn.OwnerUserId AS Bountier,
  adb.Id AS AnswerId, adb.Score
  FROM Posts AS q
  INNER JOIN PostNotices AS pn ON pn.PostId = q.Id
                        AND pn.PostNoticeTypeId BETWEEN 10 AND 15 -- bounty notice
                        AND pn.DeletionDate IS NOT NULL
  LEFT OUTER JOIN Posts AS abb ON abb.ParentId = q.Id
                              AND abb.CreationDate < pn.CreationDate
  LEFT OUTER JOIN Posts AS adb ON adb.ParentId = q.Id
                              AND adb.CreationDate BETWEEN pn.CreationDate AND pn.DeletionDate
  WHERE abb.Id IS NULL -- no answer before bounty
) AS answers

GROUP BY QuestionId, BountyStart, Asker, Bountier

SELECT '# of bounties', COUNT(*)
  FROM #results UNION
SELECT '% with accepted answers',
  ROUND(AVG(CAST(AcceptedAnswer AS FLOAT)) * 100, 2)
  FROM #results UNION  
SELECT '% with accepted answer (bounty by OP)',
  ROUND(SUM(CASE WHEN Asker = Bountier THEN AcceptedAnswer ELSE 0 END) * 100.0 /
        SUM(CASE WHEN Asker = Bountier THEN 1 ELSE 0 END), 2)
  FROM #results UNION
SELECT '% with any answers',
  ROUND(AVG(CASE WHEN NumberOfAnswers > 0 THEN 1.0 ELSE 0.0 END) * 100, 2)
  FROM #results UNION
SELECT 'Average # of answers',
  ROUND(AVG(CAST(NumberOfAnswers AS FLOAT)), 2)
  FROM #results UNION
SELECT 'Median # of answers',
  CAST(
   (SELECT MAX(NumberOfAnswers) FROM
     (SELECT TOP 50 PERCENT NumberOfAnswers FROM #Results ORDER BY NumberOfAnswers) AS BottomHalf)
   +
   (SELECT MIN(NumberOfAnswers) FROM
     (SELECT TOP 50 PERCENT NumberOfAnswers FROM #Results ORDER BY NumberOfAnswers DESC) AS TopHalf)
  AS FLOAT) / 2.0
  FROM #results UNION
SELECT 'Modal # of answers',
  (SELECT TOP 1 NumberOfAnswers
  FROM #results GROUP BY NumberOfAnswers ORDER BY COUNT(*) DESC) UNION
SELECT 'Maximum # of answers',
  MAX(NumberOfAnswers)
  FROM #results UNION
SELECT '% with any upvoted answers',
  ROUND(AVG(CASE WHEN NumberOfUpvotedAnswers > 0 THEN 1.0 ELSE 0.0 END) * 100, 2)
  FROM #results UNION
SELECT 'Average # of upvoted answers',
  ROUND(AVG(CAST(NumberOfUpvotedAnswers AS FLOAT)), 2)
  FROM #results UNION
SELECT 'Median # of upvoted answers',
  CAST(
   (SELECT MAX(NumberOfUpvotedAnswers) FROM
     (SELECT TOP 50 PERCENT NumberOfUpvotedAnswers FROM #Results ORDER BY NumberOfUpvotedAnswers) AS BottomHalf)
   +
   (SELECT MIN(NumberOfUpvotedAnswers) FROM
     (SELECT TOP 50 PERCENT NumberOfUpvotedAnswers FROM #Results ORDER BY NumberOfUpvotedAnswers DESC) AS TopHalf)
  AS FLOAT) / 2.0
  FROM #results UNION
SELECT 'Modal # of upvoted answers',
  (SELECT TOP 1 NumberOfUpvotedAnswers
  FROM #results GROUP BY NumberOfUpvotedAnswers ORDER BY COUNT(*) DESC) UNION
SELECT 'Maximum # of upvoted answers',
  MAX(NumberOfUpvotedAnswers)
  FROM #results;
  
DROP TABLE #results;
18
  • Is a more specific time available from the PostNotices table for the bounty window? Jan 1, 2018 at 13:06
  • 12
    "only 23.5% of the bounties result in an answer which is subsequently accepted." To be fair it should be mentioned that not all bounties are intended to lookup for an acceptable answer, but merely to achieve more attention (I think I'll do that again now ;-))
    – user0042
    Jan 1, 2018 at 13:35
  • @user0042 I agree with that, but I included it because it might be the statistic the OP is looking for. Somehow it ended up being the only bolded figure, but it wasn't meant to stand out.
    – Glorfindel
    Jan 1, 2018 at 13:54
  • @JonClements I can try. It looks like post notices for bounties were introduced in September 2011, so we'll be missing some of the older bounties. That might actually be beneficial for the reliability of the numbers, though.
    – Glorfindel
    Jan 1, 2018 at 14:04
  • 1
    Interesting. The new selection method has a rather large influence on the results. Did I make a mistake somewhere?
    – Glorfindel
    Jan 1, 2018 at 14:36
  • 3
    The median, mode, and range would be useful data points for interpreting the results, as well as the actual size of the dataset being operated on.
    – user4639281
    Jan 1, 2018 at 17:37
  • 1
    @TinyGiant just over 100k bounties. Median and mode aren't really interesting (1), but it's nice to see that there was a question where a bounty sprouted a whopping 32 new answers (of which 25 were upvoted) – found with this query.
    – Glorfindel
    Jan 1, 2018 at 21:14
  • 2
    All the bounties I have created so far were to reward existing answers; yet I do not see any filter by bounty reason. It might be a factor in the answer ratio. Jan 2, 2018 at 11:40
  • @MatthieuM it's possible to do so if you fork the query. Change the AND pn.PostNoticeTypeId BETWEEN 10 AND 15 -- bounty notice to AND pn.PostNoticeTypeId = 15; 15 is the post notice type corresponding to that reason. See this query for a list of IDs.
    – Glorfindel
    Jan 2, 2018 at 11:51
  • @Glorfindel: Ah nice! Actually I wanted to exclude 15, since a bounty "I want to reward an existing answer" does not promote adding answers. It barely changes the result though. Jan 2, 2018 at 12:24
  • OK, thanks for checking. Maybe people don't read bounty notices?
    – Glorfindel
    Jan 2, 2018 at 12:25
  • @Glorfindel: Or maybe by the time they read the notice, they have already opened the question anyway. Or maybe reason 15 is barely used because people are Scrooges so only are willing to offer rep to get new answers. Or... :D Jan 2, 2018 at 12:27
  • 1
    This is neat, essentially, bountying a question almost guarantees at least one more positively voted answer. Obviously with the way posts go, in practice some bounties will receive more answers, and some none, but overall it is very interesting to see the average above 1 like that.
    – Travis J
    Jan 2, 2018 at 19:51
  • @TravisJ That's exactly vice versa: posting a bounty to a hard question takes more bounty hunters in, but 50% of the time all of them lack sufficient knowledge to answer the question. Some especially nasty guys even have several friends to upvote their horrific answer, so that SO awards the bounty automatically. Jan 2, 2018 at 22:42
  • 1
    I don't think your explanation was vice versa of anything I said. It is just another aspect of the data set: that about 50% of the answers actually completely solve the problem. Pretty awesome really, getting stuck is rough, and it is nice just to get progress sometimes which is what I was reading into with the at least 1 new answer angle. That said, the rest of the tin hat stuff you said is unsubstantiated garbage not really warranting a response.
    – Travis J
    Jan 2, 2018 at 23:02

You must log in to answer this question.

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