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.

2.11. EXAMPLE: BUS RIDERSHIP 19<br />

Again, this is a very common approach. But be sure <strong>to</strong> take care that we are in an “if and only if”<br />

situation. Yes, R+B = 4, B > 0 implies R = 3, B = 1, but we must make sure that the converse<br />

is true as well. In other words, we must also confirm that R = 3, B = 1 implies R+B = 4, B > 0.<br />

That’s trivial in this case, but one can make a subtle error in some problems if one is not careful;<br />

otherwise we will have replaced a higher-probability event by a lower-probability one.<br />

2.11 Example: Bus Ridership<br />

Consider the following analysis <strong>of</strong> bus ridership. (In order <strong>to</strong> keep things easy, it will be quite<br />

oversimplified, but the principles will be clear.) Here is the model:<br />

• At each s<strong>to</strong>p, each passsenger alights from the bus, independently, with probability 0.2 each.<br />

• Either 0, 1 or 2 new passengers get on the bus, with probabilities 0.5, 0.4 and 0.1, respectively.<br />

• Assume the bus is so large that it never becomes full, so the new passengers can always get<br />

on.<br />

• Suppose the bus is empty when it arrives at its first s<strong>to</strong>p.<br />

Let Li denote the number <strong>of</strong> passengers on the bus as it leaves its i th s<strong>to</strong>p, i = 1,2,3,... Let’s find<br />

some probabilities, say P (L2 = 0).<br />

For convenience, let Bi denote the number <strong>of</strong> new passengers who board the bus at the i th s<strong>to</strong>p.<br />

Then<br />

P (L2 = 0) = P (B1 = 0 and L2 = 0 or B1 = 1 and L2 = 0 or B1 = 2 and L2 = 0) (2.47)<br />

2<br />

= P (B1 = i and L2 = 0) (2.48)<br />

=<br />

i=0<br />

2<br />

P (B1 = i)P (L2 = 0|B1 = i) (2.49)<br />

=<br />

i=0<br />

0.5 2 + (0.4)(0.2)(0.5) + (0.1)(0.2 2 )(0.5) (2.50)<br />

= 0.292 (2.51)<br />

For instance, where did that first term, 0.5 2 , come from? Well, P (B1 = 0) = 0.5, and what about<br />

P (L2 = 0|B1 = 0? If B1 = 0, then the bus approaches the second s<strong>to</strong>p empty. For it <strong>to</strong> then leave<br />

that second s<strong>to</strong>p empty, it must be the case that B2 = 0, which has probability 0.5.

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

Saved successfully!

Ooh no, something went wrong!