A highly scientific, mathematically researched, and supercomputer tested process known as 'best guess'. In all seriousness, I try to compare the trait I'm making to similar existing traits in the pathfinder race builder. But for many of them, the RP cost is a ballpark approximation of what I figure balanced would be. As I said, balance may be wonky.