I have two years of observations of the same phenomena:

- Year A: 7 118 observations

- Year B: 6 866 observations

I have randomly drawn a sample from each population:

- a: 221 observations

- b: 200 observations

Each observation is then studied in detail, and given either the value 0 or 1 (binary variable). The sample probabilities of taking the value one are:

- P_a: 0.76

- P_b: 0.68

I want to calculate whether P_b is significantly smaller than P_a (with 95% level of confidence). This is my attempt:

- P_b-P_a = 0.68 - 0.76 = -0.08

- SE_a = sqrt(0.76*(1-0.76)/221) = 0.0287

- SE_b = sqrt(0.68*(1-0.68)/200) = 0.0330

- SE_(b-a) = sqrt(SE_a^2+SE_b^2) = 0.0437

- (P_b-P_a)_low = -0.08-1.96*0.0437 = -0.17

- (P_b-P_a)_high = -0.08+1.96*0.0437 = 0.01

Conlusion: The two probabilities are not significantly different at a 95% level of conficence.

Are my formulas and conclusion correct?