The Mad Hatter’s Guide to Data Viz and Stats in R
  1. Data Viz and Stats
  2. Inference
  • Data Viz and Stats
    • Tools
      • Introduction to R and RStudio
    • Studio Flow and Data Kits
      • 12-Day Studio Index
      • Healthcare Data Kits
    • Visualization
      • Data
      • Inspect Data
      • Graphs
      • Summaries
      • Counts
      • Quantities
      • Groups
      • Distributions
      • Groups and Distributions
      • Change
      • Proportions
      • Hierarchy
      • Evolution and Flow
      • Ratings and Rankings
      • Surveys
      • Time
      • Space
        • Introduction to Maps
        • What is Vector Data?
        • The Grammar of Maps
        • Interactive Maps with leaflet
      • Networks
      • Miscellaneous Graphing Tools, and References
    • Inference
      • Basics
      • 🎲 Samples
      • Randomization
      • One Mean
      • Two Independent Means
      • Two Paired Means
      • Multiple Means (ANOVA)
      • Correlation
      • One Proportion
      • Two Proportions
    • Modelling
      • Linear Regression
      • Logistic Regression
      • 🕔 Time Series
    • Workflow
      • Facing the Abyss
      • I Publish, therefore I Am
      • Data Carpentry
    • Arts
      • Colours
      • Fonts for Charts
      • Branding and Typography
      • Annotations
      • More Annotations
      • Highlighting
      • Scales
    • AI Tools
      • Using gander and ellmer
      • Using Github Copilot and other AI tools to generate R code
      • Using LLMs to Explain Stat models
    • Case Studies
      • Demo:Product Packaging and Elderly People
      • Ikea Furniture
      • Movie Profits
      • Gender at the Work Place
      • Heptathlon
      • School Scores
      • Children's Games
      • Valentine’s Day Spending
      • Women Live Longer?
      • Hearing Loss in Children
      • California Transit Payments
      • Seaweed Nutrients
      • Coffee Flavours
      • Legionnaire’s Disease in the USA
      • Antarctic Sea ice
      • William Farr's Observations on Cholera in London
    • Projects
      • No Free Hunch

On this page

  • 1 What is Inference?
  • 2 An Idea to Encourage You: Stats Lessons from Sholay!!
  • 3 References
  • 4 Modules
Categories
All (12)
Bootstrap (1)
Central Limit Theorem (1)
Confidence Intervals (1)
Distributions (2)
Explanatory Variable (1)
Generating Parallel Worlds (3)
Inference (1)
Monte Carlo Simulation (2)
Null Distributions (2)
Permutation (3)
Populations (1)
Random Number Generation (3)
Randomization (1)
Sampling (1)
Standard Error (1)
t.test (1)
  1. Data Viz and Stats
  2. Inference

Statistical Inference

Published

November 30, 2022

Modified

October 5, 2026

1 What is Inference?

Important

Statistical inference is the process of drawing conclusions about the entire population based on the information in a sample.

In this Section we will examine samples from populations and find procedures for estimating parameters such as means and sd. We will also devise procedures for comparing means and variances across more than one population. The conditions that make these procedures possible and accurate will also be studied and we will find alternative methods when those assumptions breakdown.

Based on our ideas of data and types of variables, here is a table of what we may infer, based on the underlying data:

Data Types and Inference
Variable(s) Estimating What? Population Parameter Sample Statistic
Single Qual variable Proportion p \hat{p}
Single Quant variable Mean \mu \bar{x}
Two Qual Variables Difference in Proportions p_1 -p_2 \hat{p_1} - \hat{p_2}
One Qual, one Quant Difference in Means \mu_1 - \mu_2 \bar{x_1}-\bar{x_2}
Two Quant variables Correlation \rho r

We will examine inference procedures for all these cases.

2 An Idea to Encourage You: Stats Lessons from Sholay!!


Gabbar: “Kitne Aadmi thay?
Stats Teacher: How many observations do you have? n < 30 is a joke.

Gabbar: Kya Samajh kar aaye thay? Gabbar khus hoga? Sabaasi dega kya?
Stats Teacher: What are the levels in your Factors? Are they binary? Don’t do ANOVA just yet!

Gabbar: (Fires off three rounds ) Haan, ab theek hai!
Stats Teacher: Yes, now the dataset is balanced wrt the factor (Treatment and Control).

Gabbar: Is pistol mein teen zindagi aur teen maut bandh hai. Dekhte hain kisko kya milega.
Stats Teacher: This is our Research Question, for which we will Design an Experiment.

Gabbar: (Twirls the chambers of his revolver) “Hume kuchh nahi pataa!”
Stats Teacher: Let us perform a non-parametric Permutation Test for this Factor!

Gabbar: “Kamaal ho gaya!”
Stats Teacher: Fantastic! Our p-value is so small that we can reject the NULL Hypothesis!!

Go and like this post at: https://www.linkedin.com/pulse/stat-lessons-from-sholay-arvind-venkatadri-wgtrf/?trackingId=c0b4UCTLRea6U%2Bj%2Bm4TCtw%3D%3D

3 References

  1. https://www.openintro.org/book/os/
  2. Jesse M. Alston, Jessica A. Rick. (First published: 15 January 2021) A Beginner’s Guide to Conducting Reproducible Research. https://esajournals.onlinelibrary.wiley.com/doi/10.1002/bes2.1801

4 Modules

Title Reading Time
Basics 8 min
🎲 Samples 46 min
Uncertainty 5 min
Randomization 14 min
One Mean 41 min
Two Independent Means 57 min
Two Paired Means 30 min
Multiple Means (ANOVA) 49 min
Correlation 40 min
One Proportion 22 min
Two Proportions 42 min
Permutation Tests 23 min
No matching items
Back to top
Miscellaneous Graphing Tools, and References
Basics

License: CC BY-SA 2.0

Website made with ❤️ and Quarto, by Arvind V.

Hosted by Netlify .