Thread:Homuhomu123/@comment-24921408-20150202200415/@comment-25779449-20150203003114

Hey future engineer!

@Mathiaszealot told me it's called standard error calculation. Here's an example how I used that:

Aiming for error E = 3% ~ 6%, while the true probability p = 50%, with 90% confidence (Z = 1.6). The sample size (n), or the min # of trials required, is calculated as:

n = ceil( 50% * (1 - 50%) / ( 4% / 1.6)^2 )

Then I used a program to calculate the "# trials required" by varying the error (E) from 3% to 6%. Here's the output:

Error       # Trials

0.03         712

0.031         666

0.032         625

0.033         588

0.034         554

0.035         523

0.036         494

0.037         468

0.038         444

0.039         421

0.04         400

0.041         381

0.042         363

0.043         347

0.044         331

0.045         317

0.046         303

0.047         290

0.048         278

0.049         267

0.05         256

       0.051         247

0.052         237

0.053         228

0.054         220

0.055         212

0.056         205

0.057         197

0.058         191

0.059         184

If my exp't reached a sample size of 250, I will say that one has an error of 5.1% with 90% confidence.

---

p.s.1  For the exact meaning of the formula, you may check these comments, since they explain much better than I do =p

p.s.2  Here are the lines I used in the program: (Cmap)

main

{

p = 50%;

Z = 1.6;

for(E=3%; E<6%; E=E+0.1%)

{

n = ceil(p*(1-p) / (E/Z)^2);

print(^, E, n);

}

}