Skip to Content
Think Bayes
book

Think Bayes

by Allen B. Downey
September 2013
Beginner content levelBeginner
210 pages
4h 38m
English
O'Reilly Media, Inc.
Content preview from Think Bayes

Chapter 8. Observer Bias

The Red Line problem

In Massachusetts, the Red Line is a subway that connects Cambridge and Boston. When I was working in Cambridge I took the Red Line from Kendall Square to South Station and caught the commuter rail to Needham. During rush hour Red Line trains run every 7–8 minutes, on average.

When I arrived at the station, I could estimate the time until the next train based on the number of passengers on the platform. If there were only a few people, I inferred that I just missed a train and expected to wait about 7 minutes. If there were more passengers, I expected the train to arrive sooner. But if there were a large number of passengers, I suspected that trains were not running on schedule, so I would go back to the street level and get a taxi.

While I was waiting for trains, I thought about how Bayesian estimation could help predict my wait time and decide when I should give up and take a taxi. This chapter presents the analysis I came up with.

This chapter is based on a project by Brendan Ritter and Kai Austin, who took a class with me at Olin College. The code in this chapter is available from http://thinkbayes.com/redline.py. The code I used to collect data is in http://thinkbayes.com/redline_data.py. For more information see “Working with the code”.

The model

Before we get to the analysis, we have to make some modeling decisions. First, I will treat passenger arrivals as a Poisson process, which means I assume that passengers are equally likely to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Neural Network Computing for the Electric Power Industry

Neural Network Computing for the Electric Power Industry

Dejan J. Sobajic
Applied Modeling Techniques and Data Analysis 2

Applied Modeling Techniques and Data Analysis 2

Yannis Dimotikalis, Alex Karagrigoriou, Christina Parpoula, Christos H. Skiadas

Publisher Resources

ISBN: 9781491945407Errata Page