20.03.2013 Views

From Algorithms to Z-Scores - matloff - University of California, Davis

From Algorithms to Z-Scores - matloff - University of California, Davis

From Algorithms to Z-Scores - matloff - University of California, Davis

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

206 CHAPTER 10. INTRODUCTION TO CONFIDENCE INTERVALS<br />

Then (10.28) becomes<br />

s 2 = 1<br />

n<br />

= 1<br />

n<br />

n<br />

i=1<br />

n<br />

i=1<br />

= Y − Y 2<br />

= p − p 2<br />

Y 2<br />

i − Y 2<br />

Yi − Y 2<br />

<br />

p − 1.96 p(1 − p)/n, p + 1.96 <br />

p(1 − p)/n<br />

And note again that p(1 − p)/n is the standard error <strong>of</strong> p.<br />

10.7.2 Simulation Example Again<br />

(10.29)<br />

(10.30)<br />

(10.31)<br />

(10.32)<br />

(10.33)<br />

In our bus example above, suppose we also want our simulation <strong>to</strong> print out the (estimated)<br />

probability that one must wait longer than 6.4 minutes. As before, we’d also like a margin <strong>of</strong> error<br />

for the output.<br />

We incorporate (10.33) in<strong>to</strong> our program:<br />

1 doexpt

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!