p score calculations