Measurements and probability
01 · Events and frequencies
Events and frequencies
Frequency describes what happened; probability describes what the model predicts.
Your turn
Divide by ten
Observed frequency is successes divided by trials.
Understand the calculation, step by step
A probability lies in [0,1] and totals one across possible outcomes. An empirical frequency varies between samples; finitely many trials do not make it exactly equal to probability. Compare multiple measurement series before treating a fluctuation as a sensor change.
Frequency and probability
frequency = successes / 10Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
02 · Expected measurement
Expected measurement
Expectation is the average result predicted over many repetitions.
Your turn
Expected mean
The expected mean need not be any individual possible value.
Understand the calculation, step by step
Expectation is a probability-weighted average: E[X]=ΣxP(X=x), or an integral against a density. It may be a value X never takes. Linearity E[aX+b]=aE[X]+b does not require independence; products need additional care.
Expectation and variance
X∈{0,2}, P(X=2)=p ; E[X]=2p ; Var(X)=4p(1−p)Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
03 · Spread and variance
Spread and variance
Variance measures how widely results spread around their mean.
Your turn
Weight squared deviations
Variance adds squared deviations from the mean, weighted by probability.
Understand the calculation, step by step
Var(X)=E[(X−E[X])²]=E[X²]−E[X]²; its unit is squared. Standard deviation restores the measurement unit. Independent variances add; correlated measurements require covariance terms. A very stable sensor can still be biased.
Scaled Bernoulli variance
X∈{0,2}, P(X=2)=p ; Var(X)=4p(1−p)Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
04 · Sets and events
Sets and events
To count “A or B”, avoid counting cases belonging to both twice.
Your turn
Combine A or B
Add A and B then subtract the overlap once. Areas are proportional.
Understand the calculation, step by step
Union, intersection and complement encode “or”, “and” and “not”. P(A∪B)=P(A)+P(B)−P(A∩B) avoids double counting. Disjoint events have empty intersection; independent events satisfy P(A∩B)=P(A)P(B), a different property.
Union of two events
P(A)=0.4, P(B)=0.5 ; P(A∪B)=0.9−P(A∩B)Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
05 · Count before dividing
Count before dividing
Choosing two objects without caring about order gives fewer possibilities than ordering them.
Your turn
Count pairs
Each filled cell is a distinct unordered pair without replacement.
Understand the calculation, step by step
Permutations count orders; combinations select without order. Choosing k distinct objects from n without replacement gives C(n,k)=n!/(k!(n−k)!). “Favourable / possible cases” requires equally likely outcomes; check that assumption first.
Count without order
C(n,2)=n(n−1)/2Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
06 · Conditioning and independence
Conditioning and independence
Additional information can change the probability assigned to an event.
Your turn
Recompute the share
The same intersection now represents x/0.5 of retained cases.
Understand the calculation, step by step
Conditioning on B restricts the universe to B: P(A|B)=P(A∩B)/P(B), for P(B)>0. Independence means P(A|B)=P(A), not incompatibility. A sensor whose noise depends on temperature calls for conditioning the model on temperature.
Condition
P(B)=0.5 ; P(A|B)=P(A∩B)/0.5Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
07 · Random variables
Random variables
A random variable turns a possible outcome into a number you can analyze.
Your turn
Expected mean
The expected mean need not be any individual possible value.
Understand the calculation, step by step
A random variable assigns a number to each outcome. Different outcomes may share a value, and their probabilities add. Mapping “left target” and “right target” to robot distance produces a distribution of distances different from the distribution of states.
Expectation and variance
X∈{0,2}, P(X=2)=p ; E[X]=2p ; Var(X)=4p(1−p)Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
08 · Discrete and continuous distributions
Discrete and continuous distributions
For a continuous measurement, calculate probability over an interval rather than at one exact number.
Your turn
Measure area
Probability is an area: width b times height 1/4.
Understand the calculation, step by step
A discrete distribution assigns mass to values; a continuous distribution has a density integrated over a region. Density can exceed one, probability cannot. The cumulative distribution F(b)=P(X≤b) applies to both. An individual point has probability zero under a continuous distribution.
Uniform density
X∼U[0,4] ; P(0≤X≤b)=b/4 ; P(X=b)=0Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
09 · Central limit theorem
Central limit theorem
Averaging more independent measurements reduces fluctuation but does not correct bias.
Your turn
Dashed: width with your initial sample count.
Standard error
The curves illustrate normal distributions of width 2/√n; bias does not disappear.
Understand the calculation, step by step
For independent identically distributed measurements with finite variance, the standardized mean approaches a normal distribution. Its standard error is σ/√n. Individual measurements do not become normal and bias remains. Heavy tails or dependence can invalidate this simple approximation.
Standard error
σ=2 ; standard error of the mean = 2/√nCheck my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
10 · Point estimation and bias
Point estimation and bias
An estimate summarizes observations and remains sensitive to data and assumptions.
Your turn
Compute the mean
The marker places the mean of the three retained values on the axis.
Understand the calculation, step by step
An estimator is a rule applied to a sample; an estimate is its observed value. The mean estimates position under zero-mean noise. An unbiased iid variance estimate divides squared deviations by n−1. Mean squared error combines variance and squared bias.
Sensor estimation
measurements=(1,2,x) ; mean=(3+x)/3Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
11 · Confidence interval
Confidence interval
An interval expresses estimation-method uncertainty under specific assumptions.
Your turn
Dashed: the starting interval.
Draw the bounds
This procedure covers the parameter in 95% of repetitions under these assumptions.
Understand the calculation, step by step
A 95% procedure covers a fixed parameter in 95% of repetitions under its assumptions. It does not assign 95% frequentist probability to that parameter after observation. This exercise assumes known variance and a normal mean; estimated variance calls for a Student interval under normality.
Normal interval
known σ=2 ; mean=5 ; 95% half-width ≈1.96×2/√nCheck my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
12 · Bootstrap and sample limitations
Bootstrap and sample limitations
Bootstrap reuses observed data to see how an estimate might vary.
Your turn
Compute the mean
The marker places the mean of the three retained values on the axis.
Understand the calculation, step by step
Bootstrap resamples n observations with replacement and recomputes a statistic. Repetition approximates its sampling distribution. One resample, as here, illustrates mechanics without estimating an interval. Bootstrap cannot reveal unobserved situations and dependent series need an adapted method.
Resampling with replacement
data=(1,2,x) ; sampled indices=(0,2,2) ; mean*=(1+2x)/3Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
13 · Bayes and base rates
Bayes and base rates
A positive detector is not certainty: how rare its target is also matters.
Your turn
Keep positive results
Among all positive signals, which share actually comes from an object?
Understand the calculation, step by step
Bayes reverses a condition: P(H|D)=P(D|H)P(H)/P(D). The denominator sums routes producing the data. High sensitivity is insufficient when objects are rare: false positives may dominate. Compare two priors with the same sensor.
Bayes and false positives
P(+|object)=0.9, P(+|empty)=0.2 ; P(object|+)=0.9p/(0.9p+0.2(1−p))Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
14 · Likelihood and parameters
Likelihood and parameters
Likelihood compares how well different parameters explain fixed observations.
Your turn
Compare candidates
Curve height is 4p³(1−p), not a probability distribution over p.
Understand the calculation, step by step
Likelihood L(θ)=P(data|θ) is a function of the parameter with data fixed. It is not a probability distribution over θ. Independent Bernoulli trials with s successes out of n give likelihood proportional to pˢ(1−p)ⁿ⁻ˢ. Compare candidates without swapping parameters and observations.
Binomial likelihood
3 successes out of 4 ; L(p)=C(4,3)p³(1−p)Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
15 · Prior to posterior
Prior to posterior
New observations update an initial belief rather than replacing it arbitrarily.
Your turn
Read the new mean
The resulting curve is normalized; the vertical line marks its mean.
Understand the calculation, step by step
With a Beta(a,b) prior and independent Bernoulli data, the posterior is Beta(a+s,b+n−s). The prior contributes pseudo-counts whose relative influence declines as n grows. Posterior mean and maximum likelihood usually differ. The exercise uses Beta(2,2) and four trials.
Beta update
prior Beta(2,2) ; posterior Beta(2+s,6−s) ; mean=(2+s)/8Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
16 · Ordinary least squares
Ordinary least squares
Least squares chooses a line that reduces discrepancies from observations.
Your turn
Read residuals
Short segments show what the line does not explain.
Understand the calculation, step by step
OLS minimizes Σ(yᵢ−a−bxᵢ)². Slope is Σ(xᵢ−x̄)(yᵢ−ȳ)/Σ(xᵢ−x̄)² for nonconstant x, and intercept is ȳ−bx̄. Residuals are orthogonal to design-matrix columns. Outliers or errors in x call for reconsidering the model.
Fit a line
x=(0,1,2), y=(0,2,c) ; OLS slope=c/2 ; intercept=(2+c)/3−c/2Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
17 · Correlation and causality
Correlation and causality
Two quantities can vary together without one causing the other.
Your turn
Read correlation
Correlation is +1 or −1 here; it measures neither slope nor causation.
Understand the calculation, step by step
Pearson correlation normalizes covariance by both standard deviations. It measures linear association, not causation; nonlinear dependence can have zero correlation. Zero variance makes it undefined. Positive scaling preserves correlation; negative scaling reverses its sign.
Correlation and scale
x=(1,2,3), y=cx ; corr(x,y)=sign(c)Check my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
18 · Analysis of variance
Analysis of variance
Comparing groups requires looking at differences and variation within each group.
Your turn
Form the F ratio
Divide the two mean squares. This diagram does not compute a p-value.
Understand the calculation, step by step
ANOVA compares between-group and within-group variation. F divides mean squares, already adjusted by degrees of freedom. A large value does not identify which pair differs. The test requires independence and an appropriate residual model. This exercise computes F without claiming a p-value.
Variance ratio
within-group MS=2 ; F = between-group MS / within-group MSCheck my understanding
Keep a thought in my notebook
Read the source and go further
The extended record combines confirmed reading, interaction, correct answer and a note of at least 40 characters. You can continue at any time.
Take this further
atomsh / lab