Suppose that a logistic regression model is fit in order to predict which survivors of major strokes will suffer another major stroke within the next $60$ days. The single predictor $X$ is used, and the estimated coefficients are $\hat{\beta}_0=−1.11$ and $\hat{\beta}_1= 0.02$. Suppose that this model was fit using a case-control sample comprised of $50$ cases of major stroke survivors who suffered another major stroke within $60$ days, and $50$ control observations (where the controls were survivors of major strokes who did not suffer another major stroke within $60$ days). But now it is desired to make an adjustment so that the fitted model can serve as the basis for a classifier to be applied to a population of major stroke survivors in which it is expected that exactly $10$ percent of them will suffer another major stroke within $60$ days. If one randomly selected member of this population has the value of $15$ for the predictor variable, use the adjusted logistic regression model to estimate the probability that he will suffer another major stroke within $60$ days.
I have that
$$\hat{p(x)}=\frac{exp(\hat{\beta}_0+\hat{\beta}_1x)}{1+exp(\hat{\beta}_0+\hat{\beta}_1x)}$$
I'm reading the adjustment we make is to set
$$\begin{align*} \hat{\beta}_0^* &=\hat{\beta}_0+log\left(\frac{\pi}{1-\pi}\right)-log\left(\frac{\tilde{\pi}}{1-\tilde{\pi}}\right)\\\\ &=-1.11+log\left(\frac{0.1}{1-0.1}\right)-log\left(\frac{0.5}{1-0.5}\right)\\\\ &\approx -3.307 \end{align*}$$
where $$\pi = \text{true proportion of "cases" in the population}$$ $$\tilde{\pi} = \text{proportion of "cases" in the training data}$$
so my new logistic regression model is
$$\hat{p(x)}=\frac{exp(\hat{\beta}_0^*+\hat{\beta}_1x)}{1+exp(\hat{\beta}_0^*+\hat{\beta}_1x)}$$
giving
$$\begin{align*} \hat{p(15)} &=\frac{exp(-3.307+0.02\cdot 15)}{1+exp(-3.307+0.02\cdot 15)}\\\\ &\approx 0.047 \end{align*}$$
I just wanted verification that I did this correctly. Thanks!