• Complain

Allen Downey - Think Bayes, 2nd Edition

Here you can read online Allen Downey - Think Bayes, 2nd Edition full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2021, publisher: OReilly Media, Inc., genre: Children. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Allen Downey Think Bayes, 2nd Edition
  • Book:
    Think Bayes, 2nd Edition
  • Author:
  • Publisher:
    OReilly Media, Inc.
  • Genre:
  • Year:
    2021
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Think Bayes, 2nd Edition: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Think Bayes, 2nd Edition" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Allen Downey: author's other books


Who wrote Think Bayes, 2nd Edition? Find out the surname, the name of the author of the book and a list of all author's works by series.

Think Bayes, 2nd Edition — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Think Bayes, 2nd Edition" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Think Bayes by Allen B Downey Copyright 2021 Allen B Downey All rights - photo 1
Think Bayes

by Allen B. Downey

Copyright 2021 Allen B. Downey. All rights reserved.

Printed in the United States of America.

Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.

OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com . For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .

  • Acquisitions Editor: Jessica Haberman
  • Development Editor: Michele Cronin
  • Production Editor: Kristen Brown
  • Copyeditor:
  • Proofreader:
  • Indexer:
  • Interior Designer: David Futato
  • Cover Designer: Karen Montgomery
  • Illustrator:
  • September 2013: First Edition
  • August 2021: Second Edition
Revision History for the Early Release
  • 2021-02-01: First Release

See http://oreilly.com/catalog/errata.csp?isbn=9781492089469 for release details.

The OReilly logo is a registered trademark of OReilly Media, Inc. Think Bayes, the cover image, and related trade dress are trademarks of OReilly Media, Inc.

The views expressed in this work are those of the author, and do not represent the publishers views. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author 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-ShareAlike 4.0 International License. The author maintains an online version at https://greenteapress.com/wp/think-bayes/ (first edition).

978-1-492-08946-9

[LSI]

Chapter 1. Probability
A note for Early Release readers

With Early Release ebooks, you get books in their earliest formthe authors raw and unedited content as they writeso you can take advantage of these technologies long before the official release of these titles.

This will be the 1st chapter of the final book. Please note that theJupyter notebooks will be made active later on.

If you have comments about how we might improve the content and/or examples in this book, or if you notice missing material within this chapter, please reach out to the editor at mcronin@oreilly.com.

The foundation of Bayesian statistics is Bayess Theorem,and the foundation of Bayess Theorem is conditionalprobability.

In this chapter, well start with conditional probability,derive Bayess Theorem, and demonstrate it using a realdataset. In the next chapter, well use BayessTheorem to solve problems related to conditional probability. In thechapters that follow, well make the transition fromBayess Theorem to Bayesian statistics, and Illexplain the difference.

Linda the Banker

To introduce conditional probability, Ill use an examplefrom a famousexperiment by Tversky and Kahneman, who posed the following question:

Linda is 31 years old, single, outspoken, and very bright. She majored in philosophy. As a student, she was deeply concerned with issues of discrimination and social justice, and also participated in anti-nuclear demonstrations. Which is more probable?

  1. Linda is a bank teller.

  2. Linda is a bank teller and is active in the feminist movement.

Many people choose the second answer, presumably because it seems moreconsistent with the description. It seems uncharacteristic if Linda isjust a bank teller; it seems more consistent if she is also afeminist.

But the second answer cannot be more probable, as the question asks.Suppose we find 1000 people who fit Lindas description and10 of them work as bank tellers. How many of them are also feminists? Atmost, all 10 of them are; in that case, the two options are equallyprobable. If fewer than 10 are, the second option is less probable.But there is no way the second option can be more probable.

If you were inclined to choose the second option, you are in goodcompany. The biologistStephenJ. Gould wrote :

I am particularly fond of this example because I know that the [second] statement is least probable, yet a little homunculus in my head continues to jump up and down, shouting at me, but she cant just be a bank teller; read the description.

If the little person in your head is still unhappy, maybe this chapterwill help.

Probability

At this point I should provide a definition of probability, but thatturns out tobe surprisingly difficult. To avoid getting stuck before we start, wewill use a simple definition for now and refine it later: Aprobability is a fraction of a finite set.

For example, if we survey 1000 people, and 20 of them are bank tellers,the fraction that work as bank tellers is 0.02 or 2%. If we choose aperson from this population at random, the probability that they are abank teller is 2%. By at random I mean that every person in thedataset has the same chance of being chosen.

With this definition and an appropriate dataset, we can computeprobabilities by counting. To demonstrate, Ill use datafrom the General Social Survey (GSS).

Ill use Pandas to read the data and store it in aDataFrame.

importpandasaspdgss=pd.read_csv('gss_bayes.csv',index_col=0)gss.head()
yearagesexpolviewspartyidindus10
caseid
1197421.014.02.04970.0
2197441.015.00.09160.0
5197458.026.01.02670.0
6197430.015.04.06870.0
7197448.015.04.07860.0

The DataFrame has one row for each person surveyed and one column foreach variable I selected.

The columns are

  • caseid: Respondent id (which is the index of the table).

  • year: Year when the respondent was surveyed.

  • age: Respondents age when surveyed.

  • sex: Male or female.

  • polviews: Political views on a range from liberal to conservative.

  • partyid: Political party affiliation, Democrat, Independent, orRepublican.

  • indus10:Code forthe industry the respondent works in.

Lets look at these variables in more detail, starting with

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Think Bayes, 2nd Edition»

Look at similar books to Think Bayes, 2nd Edition. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Think Bayes, 2nd Edition»

Discussion, reviews of the book Think Bayes, 2nd Edition and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.