06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

“mcs” — 2017/3/3 — 11:21 — page 810 — #818<br />

810<br />

Chapter 19<br />

Random Variables<br />

f 20 .k/<br />

0:18<br />

0:16<br />

0:14<br />

0:12<br />

0:10<br />

0:08<br />

0:06<br />

0:04<br />

0:02<br />

0<br />

0<br />

5<br />

10 15 20<br />

k<br />

Figure 19.4<br />

The pdf <strong>for</strong> the unbiased binomial distribution <strong>for</strong> n D 20, f 20 .k/.<br />

23 heads plus . . . the probability of flipping no heads.<br />

The General Binomial Distribution<br />

If the coins are biased so that each coin is heads with probability p, then the<br />

number of heads has a general binomial density function specified by the pdf<br />

f n;p W Œ0::n ! Œ0; 1 where<br />

!<br />

f n;p .k/ D<br />

n k<br />

p k .1 p/ n k : (19.1)<br />

<strong>for</strong> some n 2 N C and p 2 Œ0; 1. This is because there are k n sequences with<br />

k heads and n k tails, but now p k .1 p/ n k is the probability of each such<br />

sequence.<br />

For example, the plot in Figure 19.5 shows the probability density function<br />

f n;p .k/ corresponding to flipping n D 20 independent coins that are heads with<br />

probability p D 0:75. The graph shows that we are most likely to get k D 15<br />

heads, as you might expect. Once again, the probability falls off quickly <strong>for</strong> larger<br />

and smaller values of k.

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

Saved successfully!

Ooh no, something went wrong!