For each observed event with , let be its risk set. The Cox partial likelihood is
Maximize it to obtain , estimate its variance from the observed partial information, and test using a partial likelihood-ratio test, Wald test, or score test. A positive fitted coefficient means the group with has the larger hazard.