I Python and Statistics
Why Statistics?
Python
Getting Started
Python Links
Free Python Books
Installation and Updates
PyPI - the Python Package Index
github
Conventions
IPython
First Session with the IPython Qt Console
Personalizing IPython
Ipython Notebook
IPython Tips
Developing Python Programs
First Python Script
Functions, Modules, and Packages
Python Tips
Python Data Structures
Indexing and Slicing
Plots in Python
Interactive plots
Graphical Output in Python: Functional and Object-oriented Approach
Pandas
Data Handling
Grouping
Statsmodels
Seaborn
General Routines
Exercises
Data Input
Data from Textfiles
Visual Inspection
Reading ASCII-data into Python
Regular Expressions
Input from MS Excel
Input from Matlab and other formats
Matlab
II Basics Principles and Hypothesis Tests
Basic Principles
Datatypes
Categorical
Numerical
Data Display
Univariate Data
Bivariate and Multivariate Plots
Populations and Samples
Degrees of Freedom
Study Design
Terminology
Overview
Personal Tips
Types of Studies
Design of Experiments
Structure of Experiments
Clinical Investigation Plan
Exercises
Distributions of one Variable
Discrete Distributions
Bernoulli Distribution
Binomial Distribution
Poisson Distribution
Programs: Discrete Distribution Functions
Continuous Distribution
Characterizing a Distribution
Distribution Center
Quantifying Variability
Parameters Describing the Form of a Distribution
Normal Distribution
Central Limit Theorem
Application Example
Other Continuous Distributions
Exercises
Statistical Data Analysis
Typical Analysis Procedure
Data Screening
Normality Check
Transformation
Hypothesis tests
An Example
Generalization
The interpretation of the p-value, and the "p-value fallacy"
Types of Error
Sample Size
Sensitivity and Specificity
ROC Curve
Common Statistical Tests for Comparing Groups
Examples
Exercises
Tests of Means of Continuous Data
Distribution of a Sample Mean
One sample t-test for a mean value
Wilcoxon signed rank sum test
Comparison of Two Groups
Paired T-Test
T-Test Between Independent Groups
Non-parametric Comparison of Two Groups: Mann-Whitney Test
Statistical Hypothesis Tests vs Statistical Modeling
Comparison of More Groups
Analysis of Variance - ANOVA
Multiple Comparisons
Kruskal-Wallis test
Exercises
Tests on Categorical Data
One Proportion
Explanation
Example
Frequency Tables
One-way Chi-square Test
Chi-square Contingency Test
Fisher's Exact Test
McNemar's Test
Cochran's Q Test
Analysis Programs
Exercises
Relations Between Several Variables
Two-way ANOVA
Three-way ANOVA
Analysis of Survival Times
Survival Distributions
Survival Probabilities
Censorship
Kaplan-Meier survival curve
Comparing Survival Curves in Two Groups
III Statistical Modelling
Advanced Statistical Analysis
statsmodels
PyMC: Bayesian Statistics and Markov Chain Monte Carlo Modeling
scikit-learn
Generalized Linear Models
Statistical Models
Linear Correlation
Correlation Coefficient
Rank Correlation
General linear regression model
Example 1: Simple Linear Regression
Example 2: Quadratic Fit
Coefficient of determination
Model Language
Design Matrix
Example: Program Effectiveness
Linear Regression Analysis with Python
Example 1: Line Fit with Confidence Intervals
Example 2: Noisy Quadratic Polynomial
Example 3: Tobacco and Alcohol in the UK
Model Results
Definitions for Regression with Intercept
The R2 Value
2 - The adjusted R2 Value
Model Coefficients and Their Interpretation
Analysis of Residuals
Comparison
Example 3: Regression Using Sklearn
Conclusion
Assumptions
Interpretation
Bootstrapping
Exercises
Multivariate Dataanalysis
Visualization of Multivariate Correlations
Scatterplot Matrix
Correlation Matrix
Multilinear Regression
Tests on Discrete Data
Comparing Groups of Ranked Data
Logistic Regression
Example: The Challenger Disaster
Generalized Linear Models
Exponential Family of Distributions
Linear Predictor and Link Function
Ordinal Logistic Regression
Optimization
Code
Bayesian Statistics
Bayesian vs. Frequentist Interpretation
Bayesian Example
The Bayesian Approach in the Age of Computers
Example: The Challenger Disaster
Appendix
Python Programs
Glossary
Acronyms
Index Topics
Python Programs