Thomas Piacentini
← Workshop
← All concepts

Measurements and probability

Concept 1 / 18

Change concept
01 · Events and frequencies

Events and frequencies

Frequency describes what happened; probability describes what the model predicts.

Your turn

3
One series of ten trials—✓—✓—✓———————3 / 10 = 30 %
InputTransformationResult

Divide by ten0.3

Observed frequency is successes divided by trials.

Build
Final result · Observed frequency30 %

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 / 10

Check my understanding

For Successes in 10 trials = 4, what is the value of « frequency » ?

Answer as a proportion (0 to 1), or a percentage with the % sign.

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

25 %
0275 %25 %μ = 0.5Weighted mean
InputTransformationResult

Expected mean0.5

The expected mean need not be any individual possible value.

Build
Final result · Expected average0.5

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

For Probability p = 0.5, what is the value of « expectation » ?

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

25 %
0275 %25 %μ = 0.5Var = 0.75
InputTransformationResult

Weight squared deviations0.75

Variance adds squared deviations from the mean, weighted by probability.

Build
Final result · Spread · variance0.75

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

For Probability p = 0.5, what is the value of « variance » ?

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

20 %
Universe = 100%A only : 20 %A∩B : 20 %B only : 30 %Neither : 30 %A∪B 70 %
InputTransformationResult

Combine A or B0.7

Add A and B then subtract the overlap once. Areas are proportional.

Build
Final result · union probability70 %

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

For P(A∩B) = 0.1, what is the value of « union probability » ?

Answer as a proportion (0 to 1), or a percentage with the % sign.

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

5
n = 5 C(n, 2) = 101122334455One cell = one unordered pair
InputTransformationResult

Count pairs10

Each filled cell is a distinct unordered pair without replacement.

Build
Final result · combination count10

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)/2

Check my understanding

For Objects n (integer) = 6, what is the value of « combination count » ?

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

20 %
All casesB : 50 %keep BP(A | B) = 40 %
InputTransformationResult

Recompute the share0.4

The same intersection now represents x/0.5 of retained cases.

Build
Final result · conditional probability40 %

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.5

Check my understanding

For P(A∩B) = 0.3, what is the value of « conditional probability » ?

Answer as a proportion (0 to 1), or a percentage with the % sign.

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

25 %
0275 %25 %μ = 0.5Weighted mean
InputTransformationResult

Expected mean0.5

The expected mean need not be any individual possible value.

Build
Final result · Expected average0.5

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

For Probability p = 0.5, what is the value of « expectation » ?

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

1
¼04b=1P(0 ≤ X ≤ b) = 25 %
InputTransformationResult

Measure area0.25

Probability is an area: width b times height 1/4.

Build
Final result · interval probability25 %

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)=0

Check my understanding

For Bound b in [0,4] = 3, what is the value of « interval probability » ?

Answer as a proportion (0 to 1), or a percentage with the % sign.

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

4
σ = 2n = 4 SE = 10
InputTransformationResult

Dashed: width with your initial sample count.

Standard error1

The curves illustrate normal distributions of width 2/√n; bias does not disappear.

Build
Final result · Fluctuation of the mean1

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/√n

Check my understanding

For Size n (integer) = 16, what is the value of « standard error » ?

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

3
Data0112231 + 2 + 3 = 6Mean = 2
InputTransformationResult

Compute the mean2

The marker places the mean of the three retained values on the axis.

Build
Final result · mean2

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)/3

Check my understanding

For Third measurement = 6, what is the value of « mean » ?

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

4
0510x̄ = 5, σ = 2± 1.96[3.04 ; 6.96]
InputTransformationResult

Dashed: the starting interval.

Draw the bounds(3.04 ; 6.96)

This procedure covers the parameter in 95% of repetitions under these assumptions.

Build
Final result · Interval half-width1.96

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/√n

Check my understanding

For Size n (integer) = 16, what is the value of « half-width » ?

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

4
Data011224012424Mean = 3
InputTransformationResult

Compute the mean3

The marker places the mean of the three retained values on the axis.

Build
Final result · resampled mean3

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)/3

Check my understanding

For Third data point = 7, what is the value of « resampled mean » ?

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

10 %
Object10 %Empty90 %× 90 %× 20 %True +9 %False +18 %Object among + : 33.333 %
True positivesFalse positivesFinal probability

Keep positive results33.333 %

Among all positive signals, which share actually comes from an object?

Build
Final result · Chance an object is present after a positive signal33.333 %

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

For Prior probability p = 0.2, what is the value of « posterior probability » ?

Answer as a proportion (0 to 1), or a percentage with the % sign.

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

50 %
01✓ ✓ ✓ ×L(0.5) = 0.25
InputTransformationResult

Compare candidates0.25

Curve height is 4p³(1−p), not a probability distribution over p.

Build
Final result · Probability of the data under this setting25 %

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

For Candidate probability p = 0.8, what is the value of « likelihood » ?

Answer as a proportion (0 to 1), or a percentage with the % sign.

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

2
01Beta(2 ; 2)Beta(4 ; 4) · μ=0.5
InputTransformationResult

Read the new mean50 %

The resulting curve is normalized; the vertical line marks its mean.

Build
Final result · posterior mean50 %

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)/8

Check my understanding

For Successes s out of 4 (integer) = 3, what is the value of « posterior mean » ?

Answer as a proportion (0 to 1), or a percentage with the % sign.

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

4
Slope = 2
InputTransformationResult

Read residuals2

Short segments show what the line does not explain.

Build
Final result · slope2

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/2

Check my understanding

For Last observation y₃ = 6, what is the value of « slope » ?

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

2
r = 1
InputTransformationResult

Read correlation1

Correlation is +1 or −1 here; it measures neither slope nor causation.

Build
Final result · correlation1

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

For Nonzero scale c = -2, what is the value of « correlation » ?

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

6
MS between6MS within2F = 6 / 2 = 3
InputTransformationResult

Form the F ratio3

Divide the two mean squares. This diagram does not compute a p-value.

Build
Final result · F ratio3

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 MS

Check my understanding

For Between-group mean square = 8, what is the value of « F ratio » ?

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