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.

3.12. PARAMETERIC FAMILIES OF PMFS 67<br />

The pmf is<br />

It turns out that<br />

P (X = k) = e−λλk , k = 0, 1, 2, ... (3.119)<br />

k!<br />

EX = λ (3.120)<br />

V ar(X) = λ (3.121)<br />

The derivations <strong>of</strong> these facts are similar <strong>to</strong> those for the geometric family in Section 3.12.1. One<br />

starts with the Maclaurin series expansion for e t :<br />

and finds its derivative with respect <strong>to</strong> t, and so on. The details are left <strong>to</strong> the reader.<br />

e t =<br />

∞<br />

i=0<br />

t i<br />

i!<br />

(3.122)<br />

The Poisson family is very <strong>of</strong>ten used <strong>to</strong> model count data. For example, if you go <strong>to</strong> a certain<br />

bank every day and count the number <strong>of</strong> cus<strong>to</strong>mers who arrive between 11:00 and 11:15 a.m., you<br />

will probably find that that distribution is well approximated by a Poisson distribution for some λ.<br />

There is a lot more <strong>to</strong> the Poisson s<strong>to</strong>ry than we see in this short section. We’ll return <strong>to</strong> this<br />

distribution family in Section 5.5.4.5.<br />

3.12.4.1 R Functions<br />

Relevant functions for a Poisson distributed random variable X with parameter lambda are:<br />

• dpois(i,lambda), <strong>to</strong> find P (X = i)<br />

• ppois(i,lambda), <strong>to</strong> find P (X ≤ i)<br />

• qpois(q,lambda), <strong>to</strong> find c such that P (X ≤ c) = q<br />

• rpois(n,lambda), <strong>to</strong> generate n independent values <strong>of</strong> X

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

Saved successfully!

Ooh no, something went wrong!