I have a small experiment and try to find the sample size $n$. I will ask $n$ people if they agree or not with a statement and I will collect the sum of yes. Call this $R_1$. Then an intervention takes place and I collect the same data from another population of size $n$ again. The sum of yes is $R_2$.
I want a significance level of 0.05 and power of 0.80. $H_0:R_1=R_2$. Which value of $n$ shall I use to be able to assure whether $R_1$ and $R_2$ are equal or not? In a pilot, I used $n=200$ as a rule of thumb and I found a significant effect. Any help is greatly appreciated.
Offhand, I can think of four tests you might use. Because you haven't responded to my Comment, I will discuss what I guess might be what you may have in mind.
Let us suppose you have two independent samples (from 'different populations'), that the numbers Yes's are $X$ out of $n$ (before) and $Y$ out of $n$ (after), and that you want to test whether the two population proportions of Yes's are equal $H_0: p_1 = p_2$ or not $H_a: p_1 \ne p_2.$ Because you using sample sizes as large as $n = 200,$ it seems safe to use a normal approximation.
Then estimates of the population proportions are $\hat p_1 = X/n$ and $\hat p_2 = Y/n.$ Assuming $H_0$ to be true, $E(\hat p_1 - \hat p_2) = 0.$ Also. $SD(\hat p_1 - \hat p_2) \approx \widehat{SE}= \sqrt{\frac{\hat p_1(1-\hat p_1)}{n} + \frac{\hat p_2(1-\hat p_2)}{n} }.$
Thus, assuming $H_0$ to be true, the test statistic $$Z = \frac{\hat p_1 - \hat p_2}{\widehat{SE}},$$ for $\delta = 0,$ is approximately normal, and one would reject $H_0$ at the 5% level of significance if $|Z| > 1.96.$
There is no such thing as an overall power probability. The power probability depends of the size of the difference $\delta$ you want to detect. In order to find $n$ that gives power 0.80 against the alternative that has $|p_1 - p_2| > \delta.$ You would have to make some additional assumptions to do a successful power computation.
A slightly simpler procedure for finding a required sample size is to consider the 95% CI of the form $\hat p_1 - \hat p_2 \pm 1.96 \widehat{SD},$ and then find $n$ that makes the margin of error $1.96 \widehat{SD} < \delta.$ Because the worst case is when $\hat p_1 \approx \hat p_2 \approx 1/2,$ it is customary to use $\hat p_1 = \hat p_2 = 1/2$ in the expression for $\widehat{SD},$ unless you know approximate values of the population proportions. If $n = 200$ then the margin of error might be as large as $\pm 0.1.$