I am trying and failing to replicate this calculation in Alteryx and Excel.
Your recommended sample size is: 225
The sample size (n) is calculated according to the formula: n = [z2 * p * (1 - p) / e2] / [1 + (z2 * p * (1 - p) / e2 * N)]
Where: z = 1.96 for a confidence level (α) of 95%, p = proportion (expressed as a decimal), N = population size, e = margin of error.
z = 1.96, p = 0.5, N = 542, e = 0.05
n = [1.962 * 0.5 * (1 - 0.5) / 0.052] / [1 + (1.962 * 0.5 * (1 - 0.5) / 0.052 * 542)]
n = 384.16 / 1.7088 = 224.815
n ≈ 225
The sample size (with finite population correction) is equal to 225
https://goodcalculators.com/sample-size-calculator/
---
I have 4 Formulas in Alteryx at the moment and a constant for record count (542 in this case)
a2 = POW(1.96,2)
e2 = POW(0.05,2)
Calculation P1 = ([a2]*0.5*(1-0.5)/[e2])
Calculation P2 = 1 + ([a2] * 0.5 * (1 - 0.5) / [e2] * [Count])
The first 3 calculations match the expected results but Calculation P2 is incorrect. I received similar results in Excel. The final result should be Calculation P1 / Calculation P2.
Any idea what I am doing wrong?
