Happy New Year, all! This is the first 2019 installment of our regular, bite-size, data-focused updates for Meta. You can check out previous posts if you like.
This month, let's look at how question views and answers are related. I expect most of us intuit that questions with more views have more answers, but how true is this? And what is the relationship like? To explore this, let's build a dataset of undeleted questions, with their number of answers, tags, and number of views. This is the number of answers as of today, so does not take into account deleted answers. How are views and answers related?
This box plot shows that overall, questions that have more answers do have more views, but notice that there is a large amount of individual variation. Also notice that the y-axis is logarithmic.
Linear models
We can learn more about this relationship by fitting some simple models, modeling the number of answers as a function of the number of views. Let's talk about two approaches for this model:
- a simple linear model
- a logarithmic model where we transform the views to
log(Views)
The two models are similar in that both give us statistically significant coefficients, but the R2 of the logarithmic model is higher (0.16 instead of 0.13), indicating that the logarithmic model is a better fit. This makes sense, given what the first graph looks like. Also, notice that the R2 of neither model is very high; this is because there is so much question-to-question variation and our simple model can only account for a bit of this relationship between answers and views.
Tag differences
We can also train a separate (logarithmic) model for each large tag, instead of for all questions at once. When we do this, we find that all the slopes are positive and almost all the fits have low p-values. The number of answers per question increases logarithmically with views for all technologies. That being said, the rate of increase is not the same for all technologies.
The dashed line in this plot shows the median slope, i.e. the median increase in answers per 10x increase in views for this group of tags. Some technologies are near the line, but some are farther away. Technologies like .NET, iOS, C, and C++ get more answers per view, while technologies like R and Angular get fewer answers per view. The number of answers per question increases logarithmically with views for all technologies, but around this main effect, some technologies are more "answerer-y" while some technologies are less, at the same level of views. A few smaller technologies that exhibit even more extreme relationships are COBOL and Smalltalk (more answers per view) vs. dplyr and D3.js (fewer answers per view).
What are your thoughts? This analysis uses only data that is publicly available so you can reproduce this for yourself if you like, or dig into further details. Do you have topic ideas for future data science explorations?