Hi all, I have a minor but complex question which relates to rounding when determining sample size for a z confidence interval.
Say p = 0.9 and (1-p) is 0.1, and the z score for a 95% confidence interval is 1.96.
We don't want the margin of error to exceed 2% each way (+/-)
z* times Standard Error is less than or equal to Margin of Error.......
So I set up the equation as
1.96 * ( √ ((0.9*0.1) / n) ) ≤ ± 0.02
Divide by both sides to remove 1.96.
( √ ((0.9*0.1) / n) ) ≤ 0.01020408163
Now square each side.
(0.9*0.1)/n ≤ 1.04123282 * 10 ^(-4)
0.09/n ≤ 1.04123282 * 10 ^(-4)
0.09/1.04123282 * 10 ^(-4) ≤ n
864.36 ≤ n
for a margin of error that is no more than ± 0.02, the sample size, n, must be no more than 864.36.
Now here is my question: do I round 864.36 to 865, or round it down to 864 as it is mathematically? Because clearly the sample size must be a whole number.
I have received conflicting information as to whether I should round up or down.
If I plug 864 into the original equation,
1.96 * ( √ ((0.9*0.1) / 864) ) ≤ 0.02
I get the following: 0.02000416623 ≤ 0.02.
That is a categorically untrue statement.
If I plug 865 into the equation,
1.96 * ( √ ((0.9*0.1) / 865) ) ≤ 0.02
I get the following: 0.01999259979 ≤ 0.02.
This statement is true.
Khan Academy, though, I believe, rounded down to 864 (producing an untrue inequality)
but my teacher has always rounded up (producing a true inequality)
which way? is it 864 or 865?
Thanks,
Audentes
Say p = 0.9 and (1-p) is 0.1, and the z score for a 95% confidence interval is 1.96.
We don't want the margin of error to exceed 2% each way (+/-)
z* times Standard Error is less than or equal to Margin of Error.......
So I set up the equation as
1.96 * ( √ ((0.9*0.1) / n) ) ≤ ± 0.02
Divide by both sides to remove 1.96.
( √ ((0.9*0.1) / n) ) ≤ 0.01020408163
Now square each side.
(0.9*0.1)/n ≤ 1.04123282 * 10 ^(-4)
0.09/n ≤ 1.04123282 * 10 ^(-4)
0.09/1.04123282 * 10 ^(-4) ≤ n
864.36 ≤ n
for a margin of error that is no more than ± 0.02, the sample size, n, must be no more than 864.36.
Now here is my question: do I round 864.36 to 865, or round it down to 864 as it is mathematically? Because clearly the sample size must be a whole number.
I have received conflicting information as to whether I should round up or down.
If I plug 864 into the original equation,
1.96 * ( √ ((0.9*0.1) / 864) ) ≤ 0.02
I get the following: 0.02000416623 ≤ 0.02.
That is a categorically untrue statement.
If I plug 865 into the equation,
1.96 * ( √ ((0.9*0.1) / 865) ) ≤ 0.02
I get the following: 0.01999259979 ≤ 0.02.
This statement is true.
Khan Academy, though, I believe, rounded down to 864 (producing an untrue inequality)
but my teacher has always rounded up (producing a true inequality)
which way? is it 864 or 865?
Thanks,
Audentes