Statistics with R

Learn R by running it.

Thirty courses take you from your first mean() to mixed models, forecasting, clustering and random forests — in R, the language statisticians actually use. Every lesson comes with a lab that runs real R in your browser: you write the code, you see the console and the plot, the server tells you whether the answer is right. Nothing to install.

The first course is free in full — lessons, labs, final exam and the certificate. No card, no trial clock.

🧪
Real R, in the page

Not a quiz about R — R itself, running in your browser. Write t.test(x ~ group, data = df), read the output, get told if your answer is right. 237 labs so far.

🎓
University-level, not tips

Assumptions, when a test breaks, what a p-value really says. The maths is explained, then done — with the exact R function and its exact output.

📄
A certificate per course

Pass the final exam and get a certificate with a public verification link and a PDF — one for every course you finish.

The honest part

Assumptions first. Then the function.

R will happily run a t-test on data that violates every assumption the test makes, and print a p-value to four decimals. These courses teach the assumption, how to check it in R, and what to do when it fails — before the function call. Base R where it is enough, dplyr and ggplot2 where they genuinely help, and a clear note whenever a method needs a package the browser lab cannot load, so you know what to run in RStudio.

Curriculum

Thirty courses, in order

30 courses · 240 lessons · one certificate each

🧮 R Basics
The console, vectors and functions: the three things every R script is made of.
Free, in full
🗂️ Data Structures
Types, factors, lists and data frames: how R stores data and how you get at it.
8 lessons · Beginner
🔁 R Programming
Conditions, loops, functions and the apply family: turning one-off console work into code that runs on its own.
8 lessons · Beginner
🧹 Data Import and Cleaning
Reading files, fixing types, dates and missing values, and reshaping until every row is one observation.
8 lessons · Beginner
🔗 dplyr and tidyr
Six verbs, the pipe, joins and reshaping — the grammar behind almost every R data pipeline.
8 lessons · Beginner
📈 ggplot2
The grammar of graphics: build any plot from data, aesthetics, geoms, scales, facets and themes — and know what it can hide.
8 lessons · Beginner
📊 Descriptive Statistics
Centre, spread, shape, quantiles, outliers and grouped summaries — and why quantile() disagrees with Excel.
8 lessons · Intermediate
🎲 Probability Distributions
The d/p/q/r functions for normal, binomial, Poisson, exponential, uniform, t, chi-square and F — plus simulation and normality checks.
8 lessons · Intermediate
🎲 Sampling and the Central Limit Theorem
Why one sample can stand in for a population, how far its mean can be off, and what shrinks that error.
8 lessons · Intermediate
📏 Confidence Intervals
Turning a standard error into a range for the mean, a proportion or a difference — and reading that range correctly.
8 lessons · Intermediate
⚖️ Hypothesis Testing
Null and alternative, the p-value and its three wrong readings, errors, power, multiple comparisons and p-hacking — every claim checked by simulation.
8 lessons · Intermediate
🔬 t-Tests
One-sample, Welch, Student's and paired t-tests, their assumptions, Cohen's d, confidence intervals and what to do when the assumptions fail.
8 lessons · Intermediate
📐 ANOVA
One-way and two-way aov, the F statistic by hand, assumption checks, Tukey HSD, interactions, eta-squared and the Kruskal-Wallis fallback.
8 lessons · Intermediate
🔲 Chi-Square Tests
Tables in R, goodness of fit, independence, the expected-count rule, Yates and Fisher, standardized residuals, Cramér's V and McNemar for paired data.
8 lessons · Intermediate
🪜 Nonparametric Tests
Wilcoxon, Mann-Whitney, Kruskal-Wallis, Spearman, the sign test and a hand-built permutation test — what ranks buy you and what they cost.
8 lessons · Intermediate
🪢 Correlation
Covariance, Pearson, Spearman and Kendall, cor.test, matrices with missing values, partial correlation — and the four ways a correlation lies about causation.
8 lessons · Intermediate
📈 Simple Linear Regression
Least squares by hand and with lm(), every line of summary(), intervals for coefficients and predictions, R² and its limits, assumptions and log models.
8 lessons · Advanced
🧮 Multiple Regression
Several predictors at once: confounding, factors and dummies, interactions, centring and polynomials, nested-model tests, NA handling, predict() and reporting.
8 lessons · Advanced
🩺 Regression Diagnostics
Residual patterns, plot(fit), transformations, Breusch-Pagan and VIF by hand, leverage, Cook's distance and autocorrelation — and what to do about each.
8 lessons · Advanced
⚖️ Model Selection
Overfitting by simulation, train/test splits, k-fold cross-validation by hand, AIC and BIC, step() and its dangers, nested F tests, and choosing by purpose.
8 lessons · Advanced
🎯 Logistic Regression
glm(family = binomial), odds ratios, predicted probabilities, thresholds, ROC by hand, deviance tests — and what a coefficient of −4 actually means.
8 lessons · Advanced
🔢 Count Models
Poisson regression with the log link, rate ratios, offsets for exposure, overdispersion, quasi-Poisson, and the negative binomial and zero-inflation ideas.
8 lessons · Advanced
🪺 Mixed-Effects Models
Clustered and repeated-measures data: the ICC, random intercepts, aov with Error(), shrinkage by hand and what lme4 adds.
8 lessons · Advanced
📈 Time Series Basics
ts objects, decomposition, moving averages, differencing, autocorrelation and exponential smoothing, from AirPassengers to your own dated data.
8 lessons · Advanced
📈 Forecasting
Time-ordered splits, naive baselines, Holt-Winters, ARIMA, prediction intervals, error metrics and rolling-origin backtesting in base R.
8 lessons · Advanced
🧭 Principal Component Analysis
prcomp(), scaling, eigenvalues, loadings, scores, the biplot, reconstruction by hand and when PCA fails.
8 lessons · Advanced
🫧 Clustering
Distances, k-means, the elbow and silhouette, hierarchical clustering and dendrograms — and how to tell whether the clusters mean anything.
8 lessons · Advanced
🌳 Trees and Random Forests
Gini and entropy by hand, the best split, growing and pruning a tree, bagging, out-of-bag error and the random forest idea — built in base R before you call rpart or randomForest.
8 lessons · Expert
🎲 Simulation and Bootstrapping
Monte Carlo estimation, bootstrap intervals, permutation tests and power by simulation — inference when there is no formula, and checking the formulas when there is.
8 lessons · Expert
🏁 Capstone Project
One data set, start to finish: question, plan, cleaning, model choice, diagnostics, validation, effect sizes, a clear table and plot, and a reproducible report.
8 lessons · Expert

Start with the free course.

If it teaches you something you can use tomorrow, the rest are waiting.

Open R Basics