Evidence, trainers and tools for doctors and medical students
←
Statistics: From First Principles to RegressionStatistics
For Doctors

Public Health

Statistics: From First Principles to Regression

An introductory book, written as an unbroken chain of logic

Dr. Harsh Maheshwari · Version 3.1 · updated 28 September 2026 · CC BY-NC-SA 4.0

Download the PDF

Datasets for the R examples

Why this book

Most statistics books ask you to memorise formulas. This one derives them. Starting from what a clinician already knows, it builds every idea step by step — from describing data, through probability, sampling and estimation, to hypothesis testing, correlation and regression — without a single unexplained leap.

Later chapters extend the same reasoning to generalised linear models, survival analysis, measurement theory (validity and reliability) and threats to study validity. The aim is not to make you a calculator but to let you understand why each method works, and so recognise where it stops working. About 500 pages, with checkpoint questions and answers.

Who is it for?

  • MBBS students, interns and postgraduate residents (especially Community Medicine / PSM) who need statistics for exams and theses
  • Clinicians and early researchers who want to read, critique and write papers with real understanding rather than formula recall
  • Teachers of biostatistics looking for a derivation-first approach

Introduction

i Why this book exists

ii How to use this book

iii If you are new to statistics

iv R and software are optional

v Symbols and notation

Chapter 1: Statistics – Foundations of Data

1 Overview

1.1 What Is a Variable

1.2 Population vs Sample

1.3 Parameter vs Statistic

1.4 Organising Raw Data

1.5 Study Designs – A First Map

1.6 Data in Software – Codebooks, Entry, Cleaning and an R Primer

Chapter 2: Descriptive Statistics – Central Tendency

2 Overview

2.1 Why We Need a Typical Value

2.2 Mean

2.3 Median

2.4 Mode

2.5 Choosing the Right Measure of Central Tendency

Chapter 3: Descriptive Statistics – Dispersion

3 Overview

3.1 Why Average Alone Is Not Enough

3.2 Range

3.3 Quartiles Deciles and Percentiles

3.4 Interquartile Range

3.5 Mean Deviation

3.6 Variance

3.7 Standard Deviation

3.8 Coefficient of Variation

3.9 Skewness

3.10 Kurtosis

Chapter 4: Data Visualisation

4 Overview

4.1 Tables for Data Presentation

4.2 Diagrams for Qualitative Data

4.3 Diagrams for Quantitative Data

4.4 Scatter Diagram

4.5 Diagrams for Time, Place and Population

Chapter 5: Foundations of Probability

5 Overview

5.1 From Counting to Probability

5.2 Basic Probability Rules

5.3 Conditional Probability

5.4 Independence of Events

5.5 Bayes’ Theorem

5.6 Random Variables

5.7 Probability Distributions

Chapter 6: Sampling

6 Overview

6.1 Why We Sample

6.2 Probability Sampling Methods

6.3 Non-Probability Sampling Methods

6.4 Sampling Error vs Bias

6.5 Sampling Distribution of a Statistic

6.6 Central Limit Theorem

6.7 Standard Error

Chapter 7: Estimation

7 Overview

7.1 Point Estimation

7.2 Confidence Intervals

7.3 Margin of Error and Sample Size Estimation

7.4 Rates, Ratios and Standardisation

7.5 The Life Table

Chapter 8: Hypothesis Testing – The Framework

8 Overview

8.1 Logic of Hypothesis Testing

8.2 Null and Alternative Hypothesis

8.3 Type I and Type II Error

8.4 Significance Level and Power

8.5 p-value – Correct Interpretation

8.6 One-Tailed vs Two-Tailed Tests

8.7 General Steps in Hypothesis Testing

8.8 Choosing the Right Statistical Test

Chapter 9: Comparing Groups – Parametric Tests

9 Overview

9.1 z-test

9.2 t-test

9.3 Tests of Normality

9.4 Data Transformation Techniques

9.5 ANOVA

Chapter 10: Comparing Groups – Non-Parametric Tests

10 Overview

10.1 When to Use Non-Parametric Tests

10.2 Mann-Whitney U Test

10.3 Wilcoxon Signed-Rank Test

10.4 Kruskal-Wallis Test

10.5 Friedman Test

10.6 Chi-Square Test

10.7 Fisher’s Exact Test

10.8 McNemar’s Test

Chapter 11: Correlation

11 Overview

11.1 The Idea of Association

11.2 Pearson Correlation Coefficient

11.3 Spearman Rank Correlation

11.4 Point-Biserial and Phi Coefficient

11.5 Correlation vs Causation

11.6 Confounding – A Working Introduction

11.7 Stratified Analysis – Mantel–Haenszel, Effect Modification and Simpson’s Paradox

Chapter 12: Regression – Foundations

12 Overview

12.1 From Correlation to Prediction

12.2 Simple Linear Regression

12.3 Assumptions of Linear Regression

12.4 Multiple Linear Regression

12.5 Regression Diagnostics

12.6 Analysis Journey – Multiple Linear Regression

Chapter 13: Generalised Linear Models

13 Overview

13.1 Why We Need a Generalised Framework

13.2 Logistic Regression

13.3 Analysis Journey – Logistic Regression

13.4 Counts, Person-Time, Rate, and the Offset

13.5 Poisson Regression

13.6 Negative Binomial Regression

13.7 Estimating Prevalence and Risk Ratios Directly

Chapter 14: Survival Analysis

14 Overview

14.1 Why Ordinary Regression Fails for Time-to-Event Data

14.2 Censoring

14.3 Survival Function, Hazard, and the At-Risk Set

14.4 Kaplan-Meier Survival Curve

14.5 Log-Rank Test

14.6 Cox Proportional Hazards Regression

14.7 Analysis Journey – Cox Regression

14.8 Competing Risks

Chapter 15: Advanced Topics for the Community Medicine Researcher

15 Overview

15.1 Model Selection

15.2 Clustered and Hierarchical Data

15.3 Confounding Handling Techniques

15.4 Missing Data

15.5 Diagnostic Test Statistics

15.6 Sample Size and Power Calculation

15.7 Meta-Analysis Statistics

15.8 Introduction to Bayesian Statistics

15.9 Randomised Trials – Randomisation, ITT, Baseline Adjustment, Cluster and Non-Inferiority Designs

Chapter 16: Measurement Theory – Constructs, Validity, and Reliability

16 Overview

16.1 What Is a Construct

16.2 Validity of a Measurement Instrument

16.3 Reliability of a Measurement Instrument

16.4 Relationship Between Validity and Reliability

16.5 Principal Component Analysis

16.6 Building Composite Variables

16.7 Questionnaire Validation Methodology

Chapter 17: Threats to Study Validity

17 Overview

17.1 Validity of a Study

17.2 Bias in Research

17.3 Confounding

17.4 Reporting Guidelines and Writing the Statistical Methods

17.5 Qualitative and Mixed Methods – What a Quantitative Researcher Must Know

Appendix A: Checkpoint Answers

A Checkpoint Answers

A1 Chapter 1: Statistics – Foundations of Data

A2 Chapter 2: Descriptive Statistics – Central Tendency

A3 Chapter 3: Descriptive Statistics – Dispersion

A4 Chapter 4: Data Visualisation

A5 Chapter 5: Foundations of Probability

A6 Chapter 6: Sampling

A7 Chapter 7: Estimation

A8 Chapter 8: Hypothesis Testing – The Framework

A9 Chapter 9: Comparing Groups – Parametric Tests

A10 Chapter 10: Comparing Groups – Non-Parametric Tests

A11 Chapter 11: Correlation

A12 Chapter 12: Regression – Foundations

A13 Chapter 13: Generalised Linear Models

A14 Chapter 14: Survival Analysis

A15 Chapter 15: Advanced Topics for the Community Medicine Researcher

A16 Chapter 16: Measurement Theory – Constructs, Validity, and Reliability

A17 Chapter 17: Threats to Study Validity

Appendix B: R Quick Reference

B R Quick Reference

References

R References