"It could even be argued that the reason there are less older developers is because the better ones went into management and are no longer active developers."
On the contrary in my experience, engineers who are fed up with coding or find maintaining their skillset too tedious or time consuming to fit in with other responsibilities generally move into management (have kids? : move to an exec role). I've been offered several CTO positions, but still building systems while many collegues have chosen the ladder (33 yrs old here) - if anything a subset of older programmers is healthy for the ecosystem.
Exactly - My point was that it is presumptuous (and irrelevant) to assume people leave development as they get older because they aren't very good at it. It's irrelevant because those people are, by definition, no longer developers.
A bias could come into play if you could prove:
Older developers who are (more/less) knowledgable are (more/less) likely to participate in Stack Overflow.
or
Younger developers who are (more/less) knowledgable are (less/more) likely to participate in Stack Overflow.
The latter proposition of bias is probably less likely since the sample size of younger developers is much larger.
I still think the conclusion is correct assuming the provided definitions:
For any random developer you would interview from Stack Overflow, they are more likely to be more knowledgable the older they are. If the population on Stack Overflow is representative of the general developer population, than that assumption also holds true to the general population.
On the contrary in my experience, engineers who are fed up with coding or find maintaining their skillset too tedious or time consuming to fit in with other responsibilities generally move into management (have kids? : move to an exec role). I've been offered several CTO positions, but still building systems while many collegues have chosen the ladder (33 yrs old here) - if anything a subset of older programmers is healthy for the ecosystem.