Think Stats Probability and Statistics for Programmers - Downey.pdf
Probability and Statistics for Programmers Think Stats Probability and Statistics for Programmers Version Allen B. Downey Green Tea Press Needham, Massachusetts Green Tea Press 9 Washburn Ave Needham MA 02492 Permission is granted to copy, distribute, and/or modify this document under the terms of the mons Attribution-mercial Unported Li- cense, which is available at /licenses/by-nc// . Preface Why I wrote this book Think Stats: Probability and Statistics for Programmers is a textbook for a new kind of introductory prob-stat class. It emphasizes the use of statistics to explore large datasets. It takes putational approach, which has several advantages: • Students write programs as a way of developing and testing their un- derstanding. For example, they write functions pute a least squares fit, residuals, and the coefficient of determination. Writing and testing this code requires them to understand the concepts and implicitly corrects misunderstandings. • Students run experiments to test statistical behavior. For example, they explore the Central Limit Theorem (CLT) by generating samples from several distributions. When they see that the sum of values from a Pareto distribution doesn’t converge to normal, they remember the assumptions the CLT is based on. • Some ideas that are hard to grasp mathematically are easy to under- stand by simulation. For example, we approximate p-values by run- ning Monte Carlo simulations, which reinforces the meaning of the p-value. • Using discrete distributions putation makes it possible to present topics like Bayesian estimation that are not usually covered in an introductory class. For example, one exercise asks students to compute the posterior distribution for the “German tank problem,” which is difficult analytically but surprisingly putationally. • Because students work in a general-purpose programming language (Python), they are able to import data from
Think Stats Probability and Statistics for Programmers - Downey 来自淘豆网www.taodocs.com转载请标明出处.