Sometimes it is debated whether one profession or person contributes more to society than another, for example whether a scientist is more valuable than a doctor. There are many dimensions to any job. One could compare the small and probabilistic contribution to many people’s lives that a scientist makes to the large and visible influence of a doctor to a few patients’ wellbeing. These debates can to some extent be avoided, because a simple measure of a person’s contribution to society is their income. It is an imperfect measure, as are all measures, but it is an easily obtained baseline from which to start. If the people compared are numerous, un-cartelized and employed by numerous competitive employers, then their pay equals their marginal productivity, as explained in introductory economics.
People are usually employed by one firm at a time, and full-time non-overtime work is the most common, so the employers can be thought of as buying one “full-time unit” of labour from each worker. The marginal productivity equals the total productivity in the case where only one or zero units can be supplied. So the salary equals the total productivity at work.
Income from savings in a competitive capital market equals the value provided to the borrower of those savings. If the savings are to some extent inherited or obtained from gifts, then the interest income is to that extent due to someone else’s past productivity. Then income is greater than the contribution to society.
Other reasons why income may be a biased measure are negative externalities (criminal income measures harm to others), positive externalities (scientists help future generations, but don’t get paid for it), market power (teachers, police, social workers employed by monopsonist government get paid less than their value), transaction costs (changing a job is a hassle for the employer and the employee alike) and incomplete information (hard to measure job performance, so good workers underpaid and bad overpaid on average). In short, all the market failures covered in introductory economics.
If the income difference is large and the quantitative effect of the market failures is similar (neither person is a criminal, both work for employers whose competitive situations are alike, little inheritance), then the productivity difference is likely to be in the same direction as the salary difference. If the salary difference is small and the jobs are otherwise similar, the contribution to society is likely similar, so ranking their productivity is not that important. Comparison of people whose labour markets have different failures to a different extent is difficult.