Repository navigation
1.1. Uncertainty
Julio Toboso edited this page Oct 16, 2025
·
5 revisions
Randomness is about processes — the world generates outcomes unpredictably.
Uncertainty is about knowledge — we lack full information.
Think: a die roll (random process) vs. not knowing if the die landed on 3 or 4 (uncertainty).
A probability model assigns a number to how plausible each outcome is, following three axioms:
Common interpretations:
| Perspective | Meaning | Example |
|---|---|---|
| Frequentist | Long-run frequency | 30% defective parts in many samples |
| Bayesian | Degree of belief | Prior belief defect rate = 30%, updated with new data |
| Geometric/Measure | Proportion of total “space” | Dart hits area covering 0.3 of total |
- Q1: Is “I don’t know tomorrow’s temperature” randomness or uncertainty?
- Uncertainty (temperature is determined; our knowledge isn’t).
- Q2: If (P(A)=0.4) and (P(B)=0.5), estimate (P(A∩B)).
- ≈ 0.2 if independent. (P(A∩B) ≤ 0.4
- Q3: Why is
$(P(A|B)\neq P(B|A))$ generally?- Conditioning direction matters—what’s known vs. what’s inferred.
Not all averages are meaningful. Match your summary to the data scale.
| Scale | Typical statistics | Meaningful central tendency | Meaningful spread | Notes |
|---|---|---|---|---|
| Nominal | Counts, proportions, mode | Mode | None (just frequencies) | Never take means or SDs of labels. |
| Ordinal | Median, percentiles, IQR, rank correlation | Median | IQR | Preserve order; spacing not uniform. |
| Interval | Mean, SD, z-score | Mean | SD, variance | Ratios (×2) meaningless (no true zero). |
| Ratio | Mean, geometric mean, SD, CV | Mean or geometric mean | SD, CV | Ratios and proportions valid. |
Not all averages are meaningful. Match your summary to the data scale.
| Scale | Typical statistics | Meaningful central tendency | Meaningful spread | Notes |
|---|---|---|---|---|
| Nominal | Counts, proportions, mode | Mode | None (just frequencies) | Never take means or SDs of labels. |
| Ordinal | Median, percentiles, IQR, rank correlation | Median | IQR | Preserve order; spacing not uniform. |
| Interval | Mean, SD, z-score | Mean | SD, variance | Ratios (×2) meaningless (no true zero). |
| Ratio | Mean, geometric mean, SD, CV | Mean or geometric mean | SD, CV | Ratios and proportions valid. |
import pandas as pd
# Example dataset
df = pd.DataFrame({
"color": ["red","blue","blue","red","green"],
"satisfaction": [1,2,3,4,5],
"temp_C": [20,22,19,23,21],
"income": [30_000, 50_000, 45_000, 70_000, 60_000]
})
# Nominal
df["color"].value_counts(normalize=True)
# Ordinal
df["satisfaction"].median()
# Interval
df["temp_C"].mean(), df["temp_C"].std()
# Ratio
df["income"].mean(), df["income"].std() / df["income"].mean() # CV- Q1: For “favorite color,” what valid descriptive statistic exists?
- → Mode or frequency table only.
- Q2: For “pain level (1–5),” should you compute a mean?
- → No, use median or percentiles (ordinal scale).
- Q3: For “age in years,” which measure of spread is valid?
- → Standard deviation or coefficient of variation (ratio scale).
Legend:
- 🔰 Start here
- 🏵️ Important Insight
- ⚙️ Technical and applications
- 💻 Some Code
- ⚜️ Advanced Topics
- 00.1 What Is Data?
-
00.2 Three Models of Reality (planned)
- 00.2.1 The Linguistic
- 00.2.2 The Symbolic
- 00.3.3 The Mathematical
- 00.3 Maps and Reality
- 00.4 Aside: Hossack, data as structure
- 00.5 Aside: Chomsky, data as evidence
- 01.1 🔰 Sets and Logic (planned)
- 01.2 Sample Space
- 01.3 Randomness and Pattern
- 01.4 Outcomes and Events
- 01.5 Finite and Infinite Sample Spaces
- 02.1 🔰 Functions (planned)
- 02.2 Types Are Alphabets
- 02.3 Random Variables: X : Ω → 𝒳 (planned)
- 02.4 Measurement Scales
- 02.5 Numerics
- 03.1 🔰 Fractions and Proportions (planned)
- 03.2 Randomness vs Uncertainty
- 03.3 Probability: Events, Conditioning, Bayes
- 03.4 Bayes' Theorem, Step by Step
- 03.5 Expected Value and Variance (planned)
- 03.6 Bernoulli (ES)
- 03.7 Discrete Uniform (ES)
- 03.8 🧗 Kolmogorov: Ω, 𝒜, ℙ
- 04.1 🔰 Powers and Logarithms (planned)
- 04.2 Rarity
- 04.3 Information Theory (Shannon)
- 04.4 Entropy: Three Views
- 05.1 🔰 Sums and Averages (planned)
- 05.2 Data, Measured
- 05.3 Sampling (ES)
- 05.4 Population and Sample (ES)
- 05.5 Types of Sampling (ES)
- 05.6 Choosing Summaries & Visuals
- 05.7 Visualization
- 05.8 Plots
- 06.1 What Is Statistics?
- 06.2 🔰 Curves and Area (planned)
- 06.3 Statistical Thinking
- 06.4 Variation
- 06.5 Uncertainty
- 06.6 Parameters vs Estimators (ES)
- 06.7 Distributions
- 06.8 Statistical Modeling
- 06.9 Statistical Methods
- 07.1 Data Storage: Databases (stub)
- 07.2 ER Diagrams
- 07.3 Chen Diagrams
- 07.4 SQL (planned)
- 07.5 Formal Languages and Regular Expressions (planned)
- 07.6 Reproducibility (planned)
08 · μ(x) — Fuzzy - When data is flexible
- 08.1 Fuzzy Logic (planned)
- 08.2 Fuzzy Numbers (planned)
- 08.3 Possibility vs Probability (planned)
09 · x(t) — Signals and systems - Where patterns live
- 09.1 Signals (stub)
- 09.2 Sampling and Aliasing (planned)
- 09.3 Convolution (planned)
- 09.4 Frequency (planned)
- 10.1 🔰 Vectors and Matrices (planned)
- 10.2 Mathematical Modelling (planned)
- 11.1 🔰 Derivatives (planned)
- 11.2 Convex Optimisation (planned)
- 12.1 Supervised Learning (planned)
- 12.2 Data in Language Models
- 13.1 Cause and Effect (planned)
- 13.2 Capstone Guide (planned)