think_bayes.pdf

(7235 KB) Pobierz
Think Bayes
Allen B. Downey
Beijing
Boston Farnham Sebastopol
Tokyo
Think Bayes
By Allen B. Downey
Copyright © 2013 Allen B. Downey. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editors:
Mike Loukides and Ann Spencer
Production Editor:
Melanie Yarbrough
Proofreader:
Jasmine Kwityn
Indexer:
Allen Downey
September, 2013:
First Edition
Interior Designer:
David Futato
Cover Designer:
Randy Comer
Illustrator:
Rebecca Demarest
Revision History for the First Edition
2013-09-10:
2014-02-10:
2014-08-22:
2016-06-03:
First release
Second release
Third release
Fourth release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449370787
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Think Bayes,
the cover image of a red
striped mullet, and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
Think Bayes
is available under the Creative Commons Attribution-NonCommercial 3.0 Unported
License. The author maintains an online version at
http://thinkbayes.com.
978-1-449-37078-7
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1.
Bayes’s Theorem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Conditional probability
Conjoint probability
The cookie problem
Bayes’s theorem
The diachronic interpretation
The M&M problem
The Monty Hall problem
Discussion
Distributions
The cookie problem
The Bayesian framework
The Monty Hall problem
Encapsulating the framework
The M&M problem
Discussion
Exercises
The dice problem
The locomotive problem
What about that prior?
An alternative prior
Credible intervals
1
2
3
3
5
6
7
9
2.
Computational Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
11
12
13
15
16
16
18
18
19
20
23
24
26
iii
3.
Estimation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Zgłoś jeśli naruszono regulamin