check if p is a proportion