Lensa ML
Lensa ML

How Probability Works

Step 1 of 6

What Is Probability?

Flip coins and watch randomness converge to a pattern

number of trialshead ratio0.5
Number of Trials10
HEADS
4
TAILS
6
HEAD RATIO
0.400

With very few flips the ratio bounces wildly — randomness dominates at small sample sizes.

Step 1 of 6: What Is Probability?

Flip coins and watch randomness converge to a pattern

number of trialshead ratio0.5
Number of Trials10
HEADS
4
TAILS
6
HEAD RATIO
0.400

With very few flips the ratio bounces wildly — randomness dominates at small sample sizes.

Step 2 of 6: The Bell Curve

Reshape a normal distribution with mean and standard deviation

xP(x)μ=0.0
Mean (μ)0.00
Std Dev (σ)1.00
MEAN (μ)
0.0
STD DEV (σ)
1.00
PEAK P(μ)
0.399
P(x > μ)
0.50

The bell curve is symmetric around μ. About 68% of values fall within ±1σ of the mean.

Step 3 of 6: Uniform & Bernoulli

Two fundamental building-block distributions

xP(x)0.4000.601
P(X=1) = p0.60
E[X]
0.600
VAR[X]
0.240

Near p = 0.5, both outcomes are equally likely and variance is maximized.

Step 4 of 6: Joint & Conditional

When two events interact — Bayes' theorem in a Venn diagram

ΩABA∩BP(B|A) = 0.6001
P(A)0.50
P(B|A)0.60
P(A∩B)
0.300
P(A∪B)
0.650
P(A|B)
0.667

P(A∩B) = P(A)·P(B|A) is the multiplication rule. Bayes' theorem inverts this to get P(A|B) = P(A∩B)/P(B).

Step 5 of 6: Expected Value

The probability-weighted average that summarizes a distribution

x1=2p(x1)=0.3x2=5p(x2)=0.25x3=8p(x3)=0.25x4=12p(x4)=0.2E[X]=6.3
Outcome 1 value (x1)2.00
Outcome 2 value (x2)5.00
Outcome 3 value (x3)8.00
Outcome 4 value (x4)12.00
x1×p(x1) = 2×0.3
0.60
x2×p(x2) = 5×0.25
1.25
x3×p(x3) = 8×0.25
2.00
x4×p(x4) = 12×0.2
2.40
E[X] = Σ xᵢ·pᵢ
6.25

E[X] is the probability-weighted average. It's the single number that best summarizes where outcomes tend to land.

Step 6 of 6: Why It Matters for ML

More data means better estimates — the foundation of learning

samplesmeanμ=5
Dataset Size (n)20
SAMPLE MEAN
4.661
TRUE MEAN
5.0
ERROR |x̄−μ|
0.339

As the dataset grows, the sample mean converges toward the true mean. In ML, more training data yields more reliable gradient estimates.