Measuring cognitive ability