The first time that the neuroscientist Sophie Scott performed standup comedy, in 2010, she did it out of professional jealousy. One of her colleagues at University College London had done his own amateur routine at a new comedy club and was bragging about how good he’d been. As one of the world’s leading researchers on laughter, Dr. Scott, 48, decided that she had to try it herself.

At the pub where she made her debut, she locked herself in the restroom and wondered, “What am I doing? Why would I put myself through this needless...