Statistics Meets Coding (Python)
Discover statistics through Python programming. Learn to explore datasets, simulate probability experiments, visualize distributions, perform hypothesis tests, and develop statistical models using real-world data.
Learn Statistics by Programming with Python
Python makes it possible to explore statistical concepts through computation and experimentation. In this course, you will learn the mathematics behind statistics and implement those concepts using Python. You will work with real datasets, write programs to perform statistical calculations, visualize patterns, simulate random events, test hypotheses, and build predictive models.
Explore the Curriculum
Each unit combines mathematical concepts, worked examples, computational experiments, and visual exploration.
01
1. Introduction to Statistics and Python
⌄
1. Introduction to Statistics and Python
Lessons
- What is statistics? Descriptive and inferential statistics LESSON
- Populations, samples, variables, and observations LESSON
- Introduction to Python and Jupyter Notebook LESSON
- Variables, lists, arrays, and data structures LESSON
- Importing CSV and Excel datasets with pandas LESSON
- Exploring datasets with pandas LESSON
02
2. Descriptive Statistics
⌄
2. Descriptive Statistics
Lessons
- Measures of central tendency: mean, median, and mode LESSON
- Measures of variability: range, variance, and standard deviation LESSON
- Quartiles, percentiles, and interquartile range LESSON
- Five-number summaries LESSON
- Calculating descriptive statistics with NumPy and pandas LESSON
- Summarizing grouped data LESSON
03
3. Data Visualization
⌄
3. Data Visualization
Lessons
- Understanding distributions with histograms LESSON
- Boxplots and identifying outliers LESSON
- Bar charts and frequency distributions LESSON
- Scatterplots and relationships between variables LESSON
- Visualizing data with Matplotlib LESSON
- Statistical visualization with Seaborn LESSON
04
4. Probability Fundamentals
⌄
4. Probability Fundamentals
Lessons
- What is probability? LESSON
- Sample spaces and events LESSON
- Addition and multiplication rules LESSON
- Conditional probability LESSON
- Independent and dependent events LESSON
- Bayes' theorem LESSON
- Simulating probability experiments with Python LESSON
05
5. Probability Distributions
⌄
5. Probability Distributions
Lessons
- Random variables and probability distributions LESSON
- Discrete and continuous distributions LESSON
- Bernoulli and binomial distributions LESSON
- Poisson distribution LESSON
- Uniform and normal distributions LESSON
- Exponential distribution LESSON
- Generating and visualizing distributions with Python LESSON
06
6. Sampling and the Central Limit Theorem
⌄
6. Sampling and the Central Limit Theorem
Lessons
- Population parameters and sample statistics LESSON
- Random sampling and sampling bias LESSON
- Sampling distributions LESSON
- Standard error LESSON
- The central limit theorem LESSON
- Monte Carlo simulations with NumPy LESSON
07
7. Confidence Intervals
⌄
7. Confidence Intervals
Lessons
- Point estimates and interval estimates LESSON
- Understanding confidence levels LESSON
- Confidence intervals for a population mean LESSON
- Confidence intervals for proportions LESSON
- Bootstrap confidence intervals LESSON
- Calculating and visualizing confidence intervals with Python LESSON
08
8. Hypothesis Testing
⌄
8. Hypothesis Testing
Lessons
- Null and alternative hypotheses LESSON
- Test statistics and p-values LESSON
- Significance levels and statistical errors LESSON
- One-sample and two-sample t-tests LESSON
- Paired t-tests LESSON
- Proportion tests LESSON
- Performing hypothesis tests with SciPy LESSON
09
9. Comparing Groups
⌄
9. Comparing Groups
Lessons
- Comparing two independent groups LESSON
- Comparing paired observations LESSON
- One-way analysis of variance (ANOVA) LESSON
- Post-hoc comparisons LESSON
- Kruskal-Wallis test LESSON
- Visualizing group differences with Python LESSON
010
10. Correlation and Regression
⌄
10. Correlation and Regression
Lessons
- Covariance and correlation LESSON
- Pearson and Spearman correlation LESSON
- Simple linear regression LESSON
- Interpreting regression coefficients LESSON
- Residuals and model diagnostics LESSON
- Multiple linear regression LESSON
- Predicting outcomes with statsmodels LESSON
011
11. Categorical Data Analysis
⌄
11. Categorical Data Analysis
Lessons
- Categorical variables and contingency tables LESSON
- Observed and expected frequencies LESSON
- Chi-square goodness-of-fit test LESSON
- Chi-square test of independence LESSON
- Fisher's exact test LESSON
- Analyzing categorical data with SciPy LESSON
012
12. Beyond Classical Statistics
⌄
12. Beyond Classical Statistics
Lessons
- Nonparametric statistics LESSON
- Bootstrap and permutation tests LESSON
- Introduction to logistic regression LESSON
- Introduction to survival analysis LESSON
- Introduction to Bayesian statistics LESSON
- Reproducible statistical analysis with Jupyter Notebook LESSON
Visualizations and Coding Projects
Use programming to turn mathematical ideas into interactive experiments and animations.
Explore and Visualize a Real Dataset
Import a dataset, calculate descriptive statistics, identify patterns, and create informative visualizations using pandas, Matplotlib, and Seaborn.
Simulate Probability Experiments
Write Python programs to simulate coin tosses, dice rolls, and other random experiments. Compare simulated results with theoretical probabilities.
Investigate a Scientific Question
Formulate hypotheses, analyze sample data, perform statistical tests, and communicate the results.
Build a Predictive Regression Model
Analyze relationships between variables, fit a regression model, evaluate its performance, and use it to make predictions.
Analyze Your Own Dataset
Complete an end-to-end statistical analysis, from importing and cleaning data to visualization, inference, and reporting.
Understand mathematics by making it move.
Explore mathematical concepts, write code, create visualizations, and develop your own computational experiments.