# How to test correlation between ordinal and a binary variable?

I wanna know which test should I use to see if there's correlation between the number of risk factors for a disease (three groups: none, 1, 2 or more), and the presence of symptoms for this disease (two groups: yes or no).

I'm very confused about the hypothesis I want to test, but I think my question would be "As risk factors increase, do patients become more symptomatic?"

I'd phrase this as a logistic regression model, where the model is $$\log(\frac{p}{1-p}) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon_i,$$ where $$x_1$$ is 1 if there is 1 risk factor present, zero otherwise, and $$x_2$$ is 1 if there are 2 or more risk factors present, and zero otherwise.
Note that $$p$$ is the likelihood of disease, and the expression $$log(\frac{p}{1-p})$$ is known as the log odds of the disease.