Chapter 4: In All Probability
Welcome to Last Minute Lecture.
This free chapter overview is designed to help students review and understand key concepts.
These summaries supplement, not replace, the original textbook and may not be redistributed or resold.
For complete coverage, always consult the official text.
Reasoning with uncertainty.
It's one of the trickiest things our brains do, right?
Yeah.
Even for really smart people.
You know, those brain bending puzzles that just
Absolutely.
Yeah.
Our intuition, which usually serves us so well, can just completely lead us astray when probability gets involved.
And there's probably no better or maybe more infamous example of that than the Monty Hall Dilemma.
If you've never heard it, picture this.
You're on a game show.
Three doors.
Right.
Behind one door, there's a fantastic prize, let's say a car.
Behind the other two,
goats.
Definitely not the prize you Now the host, who crucially knows where the car is, deliberately opens one of the other doors.
Never your door.
And always a door with a goat.
Okay.
Let's say they open door number three, reveal a goat.
Then they turn to you and they ask, do you want to switch your choice from door number one to door number two?
And that's the moment, isn't it?
You've got your door one still closed.
Door three is open.
Goat confirmed.
Door two is the only other closed door.
Stick or switch.
My gut, and I think this is people's gut reaction, is okay, two doors left, one car.
It's got to be 50 -50 now.
Switching doesn't make any difference.
That 50 -50 feeling is so strong, so intuitive.
But back in 1990, when Marilyn Vosavante tackled this in her Parade magazine column, her answer was really direct.
And well, it caused quite a stir.
She said,
yes, you should switch.
The first door had a one -third chance, but the second door now has a two -thirds chance.
And she was absolutely right.
But the reaction, wow.
Oh, it was incredible.
A flood of letters, really angry ones, even from people with PhDs, mathematicians, statisticians who just could not accept it.
They insisted that revealing the goat must make it 50 -50 between the remaining doors.
So how do we wrap our heads around this?
Why does switching actually double your odds?
It feels wrong.
It does feel wrong.
One way Vosavante herself suggested thinking about it is to scale it up.
Imagine like a million doors instead of three.
Okay, a million doors.
You pick door one.
The host, knowing where the car is, then opens 999 ,998 other doors, all showing goats.
So now there are just two doors left closed.
Your original door one and one other single door, let's say door 777 ,777.
Do you stick with door one, your one in a million shot, or do you switch to the one door the host deliberately left closed out of the other 999 ,999?
Oh yeah.
When you put it like that, you'd switch in a heartbeat.
It seems obvious the host basically pointed to the winning door, at least the much more likely door.
Exactly.
The host's action conveys a huge amount of information in that scenario.
Another way to think about it, mathematician Keith Devlin suggested this.
Your first pick, door one, has a 13 chance.
That means the other two doors combined, doors two and three, must hold the remaining 23 chance.
Right.
The car is either behind door 113 or behind door two or three 23.
Correct.
Now the host opens one of those other doors, say door three, and shows you a goat.
That 23 probability that was spread across doors two and three doesn't just evaporate.
Since door three is revealed to be a goat, the entire 23 probability concentrates onto the single remaining door in that group, which is door two.
Ah, I see.
So the host revealing a goat in the unpicked group effectively transfers all the probability from that group onto the single remaining unpicked door.
My door's probability stays at 13.
Precisely.
Your door's odds don't change, but the information provided by the host dramatically changes the odds of the other remaining door.
And, you know, this problem is notoriously tricky.
The famous mathematician Paul Erdos.
Brilliant guy.
Yeah.
He apparently refused to believe the answer was 23 when told.
Just couldn't accept it intuitively.
He was only convinced, the story goes, after seeing computer simulations that ran the game at thousands of times and clearly showed the strategy winning about two thirds of the time.
Wow.
That really shows how much our intuition can fail us with probability.
And the simulation convincing Erdos, that kind of highlights two different ways of thinking about probability, doesn't it?
Like seeing how often something happens over many trials versus reasoning about belief and evidence.
Exactly.
The simulation shows the frequentist perspective.
Probability as the long run frequency of an event.
Switching wins 23 of the time in the long run.
The mathematical proof, which often uses Bayes theorem, reflects the Bayesian perspective.
Probability as a degree of belief updated by evidence.
Okay, so we definitely need to dig into Bayes theorem later since that sounds like the tool for this kind of updating.
But first, maybe we should cover some probability basics because you mentioned this is core to machine learning.
Yes, absolutely essential.
Most modern machine learning is deeply probabilistic at its core.
Even algorithms that might seem deterministic on the surface, like say the perceptron finding a line to separate data points.
Yeah, that seems pretty cut and dried.
Find the line.
Well, it finds a line, but there could be infinitely many possible lines that separate the data.
And the choice of one specific line implies a certain probability of misclassifying any new data point that comes along.
So the prediction itself is inherently probabilistic dealing with uncertainty.
Okay, so even a seemingly simple classification has this uncertainty baked in.
Exactly.
And thinking about machine learning through the lens of probabilities, distributions, and statistics, it's a very powerful way to understand what's going on under the hood.
So where do we start?
Basic building blocks.
Let's start with an experiment.
In probability terms, that's just any process with an uncertain outcome.
Tossing a coin, measuring temperature, you clicking an ad online, picking a door in Monty Hall, those are all experiments.
Okay.
And a random variable, usually written as X, is just a way to assign a number to each possible outcome of an experiment.
For a coin toss, maybe X is one if it's heads, zero if it's tails.
For temperature, X could be the actual measured value, a real number.
Right.
And if we say toss a coin 10 times, it gets six heads.
That gives you an empirical probability, sometimes called probability.
Based on those specific 10 tosses, the empirical probability of getting heads is 6 out of 10, or .6.
Which is different from the theoretical probability for a fair coin.
Right.
The theoretical probability for a fair coin is 0 .5, or 12.
The key idea, often called the law of large numbers, is that as you perform the experiment more and more times, toss the coin thousands, millions of times, the empirical probability will get closer and closer to the true theoretical probability.
Just like in the Monty Hall simulation, where the win rate settled down to 13 and 23 over many trials.
Precisely the same principle.
Now, the way the probabilities are assigned to all the possible values of a random variable is called its probability distribution.
It basically tells you the likelihood of each outcome.
Okay, so distributions describe the probabilities, and there are different types, like for coin flips versus temperatures.
Exactly.
For variables that can only take separate values like head stales, or 0, 1, 2, 3 on a die roll, we have discrete distributions.
We often describe these with a probability mass function,
or PMF.
PMF mass function.
Yeah, it gives you the probability mass assigned to each specific outcome.
The simplest is the Bernoulli distribution for just two outcomes, like a single coin toss, head stale, success failure, defined by one parameter p, the probability of success.
The sources also mention that rigged digital display example, where numbers 0 through 6 appear with specific unequal probabilities.
That's another discrete distribution defined by its PMF.
And for things like height or temperature, which can take any value within a range.
Those are continuous random variables.
You can't really talk about the probability of getting exactly 21 .537 degrees Celsius, because there are infinite possible values.
Instead, we use a probability density function, or PDF.
Density function, PDF.
Right, the PDF gives you the probability density at any point.
The probability of the variable falling within a specific range, like temperature between 20 and 25 degrees, is the area under the PDF curve over that range.
Okay, area under the curve for ranges, and the most famous one is?
The normal distribution, or Gaussian distribution, that classic bell shape.
The bell curve.
People talk about that all the time.
They do.
There's a bit of folklore about it applying to everything, which isn't strictly true, but it pops up a lot, partly because it has nice mathematical properties.
It's definitely a key continuous distribution.
And how do we summarize what these distributions look like, like numerically?
Good question.
We use statistics.
The most common summary is the expected value, which is just the fancy term for the mean or average value you'd expect if you ran the experiment many, many times.
The average outcome over the long run.
Exactly.
For a discrete variable, you calculate it by multiplying each possible value by its probability from the PMF and summing them up.
Like for that rig display, the expected value isn't just the average of 0 to 6, it's weighted by how often each number actually appears.
Right, the weighted average based on the probabilities.
Makes sense.
Then to measure how spread out the values are around that mean, we use variance and its square root, the standard deviation.
Okay, variance and standard deviation measure the spread.
Yep.
A distribution with a low variance means the values are tightly clustered around the mean.
High variance means they're more spread out.
For the normal distribution, the standard deviation is particularly useful.
Fall within one standard deviation of the mean, 95 % within two, and so on.
It gives you a concrete sense of the typical range.
Got it.
Mean for the center, standard deviation for the spread.
Useful summaries.
Very useful.
And in machine learning, a lot of what algorithms do is look at the data you have and try to estimate these kinds of parameters, the mean, the variance, the p for a Bernoulli for an assumed type of distribution that they think generated the data.
Which brings us back, I think, to Bayes' theorem.
Because if we're estimating things and have data,
that feels like where it comes in, updating our estimates.
It's absolutely fundamental for that.
Bayes' theorem provides the mathematical rule for how to update the probability of a hypothesis being true in light of new evidence.
You often see it written as P -H -E equals P -E -H times P -H divided by P -E.
Okay, let's unpack that a bit.
P -H -E.
H is hypothesis.
E is evidence.
Right.
P -H -E is the posterior probability, the probability of your hypothesis H being true after you've seen the evidence E.
Okay.
Probability after evidence.
P -H is the prior probability, your belief about the hypothesis H before you saw any evidence.
Belief before evidence.
And P -E -H is the likelihood, the probability of observing that specific evidence E if your hypothesis H were actually true.
How likely is the evidence, assuming the hypothesis is true?
Okay.
And that P -E on the bottom is the overall probability of the evidence, sometimes called the marginal likelihood.
It acts as a normalizing constant, making sure the posterior probabilities add up correctly.
But the core relationship is often stated as posterior is proportional to likelihood times
Your updated belief depends on your initial belief and how well the evidence fits that belief.
Let's make this concrete with that disease test example from the sources.
That one always throws me so that there's a rare disease affects maybe one in a thousand people.
Okay, very low base rate.
And there's a test for it that's pretty good, say 90 % accurate, meaning
if you have the disease, it correctly says positive 90 % of the time.
And if you don't have the disease, it correctly says negative 90 % of the time.
Right.
Which also means it gives a false positive 10 % of the time for healthy people.
Okay.
So you take the test and it comes back positive.
What's the actual probability you have the disease?
My media thought is 90 % because the test is 90 % accurate.
That's the intuition trap again.
It feels like it should be 90%.
But it's not.
It's nowhere near 90%.
Let's use Bayes' theorem.
Our hypothesis H is you have the disease.
Our evidence E is you tested positive.
What's our prior pH?
One in a thousand.
So 0 .001.
Leely low.
Exactly.
Very low prior.
What's the likelihood?
pH.
The probability of testing positive if you have the disease.
That's the test accuracy for sick people.
So 0 .9.
Right.
Now Bayes' theorem combines that strong likelihood, euro 0 .9, with the very weak prior, 0 .001.
It also accounts for the probability of testing positive even if you don't have the disease.
The false positive rate of 10 % applied to the 999 out of the thousand healthy people.
When you crunch the number.
The actual probability is.
The posterior probability pH, the chance you actually have the disease, given the positive test, turns out to be only about 0 .00089.
Less than 1%.
Wow.
Less than 1 % chance even with a 90 % accurate test.
That's shocking.
It is shocking, but it shows the power of the prior probability.
Because the disease is so rare in the first place, a positive test result is actually more likely to be a false positive from the large pool of healthy people than a true positive from the tiny pool of sick people.
Okay.
That's a really powerful illustration.
The base rate, the prior, matters hugely.
So if Bayes handles that, how does it tackle Monte Hall mathematically?
Can it actually prove switching is the 23 strategy?
It absolutely can.
It formalizes the reasoning we discussed earlier.
Let's set it up.
You pick door one.
The host opened door three, showing a goat.
Evidence E.
We want to compare P car at door one E with P car at door two E.
Okay.
Posterior probabilities for door one versus door two.
Our priors are 13 for each door.
Right.
Let's look at door one first.
P car at door one E.
The prior P car at door one is 13.
What's the likelihood that P E car at door one?
That is, if the car was at door one, what's the probability the host opened door three?
Well, if the car's at one, the host knows not to open one.
They see goats behind two and three.
They have to open one of them to show a goat.
So they choose randomly between two and three.
A 12 chance they opened door three.
Exactly.
The likelihood P E car at door one is 12.
When you plug the prior 13 and this likelihood 12 into Bayes' theorem and calculate the normalizing constant P E, which turns out to be 12, you find that P car at door one E even after the host acts.
12 equals 13.
So the probability for my original door doesn't change.
It stays 13 even after the host acts.
Correct.
Now let's look at door two.
P car at door two E.
The prior P car at door two is also 13.
But what's the likelihood P E car at door two?
If the car is actually behind door two, what's the probability the host opens door three?
Well, if the car is at two, the host can't open door one.
I beg.
You can't open door two.
The car, they have to open door three.
Precisely.
In this specific scenario, the host has no choice.
So the likelihood P E car at door two is one.
Ah, that's the key difference.
The likelihood is one in this case.
That's the crucial piece of information encoded in the host's action.
When you plug this into Bayes' theorem, P car at door two E equals 113.
12 equals 23.
There it is.
The probability for door two jumps to 23.
So the math confirms it.
Switching doubles your chances.
It perfectly formalizes how the host's constrained action provides evidence that updates our beliefs about where the car is most likely to be.
And this whole idea, learning from data, updating probabilities, is really the heart of how many machine learning algorithms think about the world.
Right.
Because you said earlier in supervised learning, the data we get, like pictures labeled cat or dog or penguin measurements labeled a deli, is basically just a sample.
It's drawn from some true underlying probability distribution P X Y that describes the real world relationship between features X and labels Y.
But we don't actually know that true distribution.
Exactly.
We only see a limited sample.
The dream goal of many ML algorithms is to
learn or estimate this unknown P X Y as accurately as possible.
Or, very often, to estimate a related probability, like P X, the probability of a specific label Y given a new unseen data point X.
And if we somehow knew the true P X Y, like if we had the perfect model of the world.
Then for any new X, we could calculate P X for all possible labels Y and just pick the label with the highest probability.
That's called the Bayes optimal classifier.
It represents the theoretical best performance possible for that problem, given the inherent uncertainty in the data itself.
The absolute ceiling on accuracy.
Right.
But of course, we almost never know the true P Y.
So ML algorithms have to estimate it or estimate its parameters using the data we do have.
And that estimation process is where different algorithms take different approaches.
And it's also why they make errors.
And even the theoretical best, the Bayes optimal classifier, isn't always perfect, right?
You mentioned an error rate.
Correct.
There's something called the Bayes error rate, which is the minimum possible error rate for a given classification problem, even for the perfect Bayes optimal classifier.
Why would even the best possible classifier make errors?
Because the underlying probability distributions for different classes might simply overlap.
Imagine plotting heights for men and women.
The distributions overlap significantly.
Even if you knew the exact distributions, if someone has a height right in the middle of the overlap, any classifier will have some chance of getting their gender wrong.
The data itself is inherently ambiguous in that region.
OK, so overlap in the true distributions creates unavoidable errors.
Makes sense.
Since we have to estimate these distributions, or at least their parameters often called theta,
how do algorithms actually do that estimation from the data?
The sources highlight two main philosophical approaches.
The first is maximum likelihood estimation, or MLE.
Maximum likelihood.
Sounds like you want the explanation that makes the data look most likely.
That's exactly it.
MLE finds the parameter values for your assumed distribution type, like the mean and variance for a normal distribution, or P for a Bernoulli, that make the observed data D most probable.
It answers the question, which parameters maximize PV?
So you pick the parameters that give the highest probability to the data you actually saw.
Precisely.
It's often associated with the frequentist viewpoint and doesn't require you to have any prior beliefs about what the parameters might be, you just let the data speak.
OK, that's MLE.
What's the alternative?
The other major approach is maximum a posteriori estimation, or MAP.
This one is distinctly Bayesian.
O posteriori, meaning after the fact, like after seeing the data.
Yes.
Instead of maximizing the probability of the data given the parameters, PD,
MAP maximizes the probability of the parameters given the data, PD.
OK, subtle but important difference, maximizing the parameter's probability given the data.
How does that work?
It uses Bayes' theorem directly.
PD is proportional to PD times P.
Notice that P term.
That's the crucial difference.
MAP requires you to specify a prior probability distribution for the parameters themselves, P.
A prior belief about the parameters before you even look at the data.
Exactly.
You start with some belief about what values are likely to take.
For example, if estimating the bias P of a coin, your prior might say P is likely to be close to 0 .5.
MAP then combines this prior belief P with the likelihood of the data given the parameters PD to find the parameters that are most probable after considering both your prior and the evidence from the data.
So MLE is purely data -driven likelihood maximization, while MAP balances the data likelihood with a prior belief about the parameters themselves.
That's the core philosophical difference.
In practice, finding the E that maximizes either MLE or MAP often involves calculus -taking derivatives to find the peak or numerical optimization methods like gradient descent.
And it's worth noting, as the sources point out, that as you get more and more data, the influence of the prior and MAP diminishes, and the MLE and MAP estimates tend to converge.
The data eventually overwhelms the prior.
These estimation ideas aren't just theoretical, right?
They've been used to solve real problems for a long time.
That story about the Federalist Papers is fascinating.
Oh, it's a classic.
A really seminal moment in quantitative analysis.
So after the U .F.
Constitution was drafted, these essays were published pseudonymously as Publius, to argue for ratification, written by Alexander Hamilton, James Madison, and John Jay.
But the authorship of about 15 of these essays remained disputed for like 150 years, mostly between Hamilton and Madison.
And part of the reason was that they later became bitter political rivals, so neither was particularly keen on owning up to specific arguments from the past that might contradict their current stance.
Didn't want their old words haunting them.
Pretty much.
So early attempts tried to find stylistic fingerprints.
One idea was sentence length.
Researchers meticulously calculated average sentence lengths and standard deviations for papers known to be by Hamilton and papers known to be by Madison.
Yeah.
Did it work?
Nope.
Turns out their sentence length habits were remarkably similar.
The distributions overlapped way too much.
You couldn't reliably tell them apart based on that feature.
It was a dead end.
Ah.
So what was the breakthrough?
The key insight, suggested by historian Douglas Adair, was to look at the frequency of very common, almost unconsciously used words, function words.
Words like by, from, to, upon,
while, whilst.
Words you don't consciously choose for style, so they might be a more stable individual signature.
That was the hypothesis.
And statisticians Frederick Mosteller and David Wallace ran with it.
Their work, described in the sources, was incredibly laborious by today's standards.
We're talking manual counting, paper slips, early quirky computers.
I love the image of paper slips flying everywhere.
It paints a picture.
But the core idea was solid.
They gathered counts for dozens of these function words from the known writings of Hamilton and Madison.
They then modeled the rate at which each author used the specific word using probability distributions.
So like, Madison used upon at a certain average rate with some variants, and Hamilton used it at a different rate.
Exactly.
Some words, like upon, turned out to have very different usage rates between the two, making them good discriminators.
Others, like to, were used similarly by both and weren't very helpful.
They then applied Bayesian methods.
For each disputed paper, they calculated the probability of Madison's authorship, given the observed word frequencies in that paper, compared to the probability of Hamilton's authorship.
Using the word rates as the evidence E to update the prior probability of authorship H.
Precisely.
They calculated the posterior odds, and the results were overwhelming.
For almost all the disputed papers, the statistical evidence pointed incredibly strongly towards Madison.
The odds ratios were often hundreds or thousands to one in favor of Madison.
Wow.
So data and probability cracked a long -standing historical mystery.
It really did.
And Patrick Jola, an expert quoted in the source, calls it a seminal moment, not just for statistics, but for computational stylistics and even early machine learning, because it was an objective data -driven algorithmic approach to a problem previously tackled through subjective interpretation.
Okay.
Fast forward to modern machine learning.
How do these probability concepts play out in practice today?
The Penguin dataset seems like a good case study.
It's a great accessible example.
We have this dataset with measurements for penguins from the Palmer Archipelago.
Things like bell length, bill depth, flipper length, body mass along with their species, a daily, chin strap, or gen 2.
So features X, the measurements, and label Y, the species.
The goal is to build a classifier, given the measurements of a new penguin, predicted species.
Exactly.
And if you visualize the data, say, plotting bill length against bill depth, you can see that the different species tend to cluster.
Gen 2s are often quite distinct, but a deli and chin strap penguins, their measurements overlap quite a bit, especially if you only look at one feature like bill depth.
Right.
That overlap again,
which means...
Which means perfect classification is impossible, even in theory.
Even the Bayes optimal classifier would make some mistakes for penguins falling in that ambiguous overlap region.
There's an irreducible Bayes error rate here, too.
And this penguin dataset has, what, four or five features?
Real world problems can have vastly more.
Hundreds, thousands, even millions of features sometimes.
And that leads to a major challenge known as the curse of dimensionality.
The curse of dimensionality.
Sounds ominous.
It kind of is.
Trying to estimate the full joint probability distribution, px1 by xdy, the probability of observing a specific combination of all d features, given the class Y, becomes practically impossible when d is large.
You need an astronomical amount of data to reliably estimate probabilities in such a high -dimensional space.
The space is just too vast and empty relative to your data points.
You just can't get enough examples to cover all the possible combinations of feature values.
Exactly.
So you need to make simplifying assumptions.
And that's where a very popular and surprisingly effective algorithm called Naive Bayes comes in.
Naive Bayes.
What's the naive part?
What's the assumption?
The core naive assumption is that all the features are conditionally independent, given the class.
Conditionally independent.
It means that if you know the penguin species, say it's in a daily, then the value of its bill length tells you nothing new about the likely value of its bill depth or its flipper length, etc.
They're all treated as independent pieces of evidence once you know the class.
px1 by 2 xdy is assumed to be simply the product px1y pxtyy pxd.
But that's probably not true in reality, right?
Like, for penguins, bill length and bill depth are likely related somehow.
Longer bills might tend to be deeper, too.
Very likely true.
That's why the assumption is called naive.
It ignores potential correlations between features within a class.
But this seemingly unrealistic assumption is incredibly powerful computationally.
How so?
It breaks down the impossible task of estimating one super complex high -dimensional distribution Pguess into much, much simpler tasks.
Estimating one -dimensional distributions PA for each feature independently.
So instead of trying to model the joint probability of bill length and bill depth and flipper length for a dailies, you just model the distribution of bill lengths for dailies, the distribution of bill depths for alleys, and so on, separately.
Exactly.
And estimating a 1D distribution is way easier.
You can just look at all the a deli bill lengths, maybe fit a normal Gaussian curve to them, or build a simple histogram.
You do this for each feature, for each class.
Okay, so you get these simple 1D probability estimates for each feature in class.
How does Naive Bayes use them to classify a new penguin?
For a new penguin with features x, it uses Bayes' theorem.
To get the probability of a class given the features x, pfx, it combines the prior probability of that class py, like the overall proportion of a dailies in the data set, with the likelihood py.
And thanks to the naive assumption, it calculates that likelihood py by simply multiplying together the probabilities from those easy to estimate 1D distributions.
Ph1y, ps2y.
Okay, so it calculates padx, peach and strap x, pthf, using this simplified likelihood calculator.
And then it just predicts the class y that has the highest posterior probability pyx.
And even though that independence assumption is, well, naïve, this approach actually works well.
Surprisingly often, yes.
Especially for certain types of problems.
It's computationally very efficient, easy to implement, and works well even with high -dimensional data.
Text classification, like identifying spam emails, is a classic example where naive Bayes performs remarkably well, even though the assumption that words appear independently in spam versus non -spam emails, isn't strictly true.
Fascinating.
It's powerful despite its simplicity.
Okay, this has been a really thorough tour through probability as it relates to machine learning.
All guided by this chapter from Why Machines Learn.
Yeah, we really covered the ground.
We started with how counterintuitive probability can be, using Monty Hall, and how simulation or rigorous math like Bayes' theorem is needed.
We laid out the basic vocabulary experiments, random variables, distributions like Bernoulli and normal, described by PMOS and PDFs, and summarized by mean and standard deviation.
We saw Bayes' theorem in action, not just solving Monty Hall, but also explaining the surprising disease test result, highlighting the crucial role of the prior probability.
And we framed machine learning itself as often being about estimating these underlying probability distributions, px, y, from data samples, aiming for that theoretical Bayes optimal classifier, while recognizing the limits imposed by the Bayes error rate.
We looked at the two main philosophies for estimating the parameters of these distributions,
maximum likelihood estimation, MLE, which maximizes the data's probability, and maximum a posteriori, MAP, which maximizes the parameter's probability using a prior belief.
We saw a great historical application in the Federalist Papers, where Bayesian analysis of function word rates provided objective evidence to solve an authorship mystery.
And we used the Penguin data set to illustrate modern classification, the challenge of the curse of dimensionality in Heidi data, and how naive Bayes tackles it with its powerful, simplifying assumption of conditional feature independence.
Plus, we touched on how estimating the full px, y links to generative models that can create new data, whereas just focusing on the decision boundary, or px, x,
is discriminative learning.
So yes, I think we've hit all the key mathematical concepts, the algorithms like naive Bayes, the examples like Monty Hall and the Penguins, the historical context with the Federalist Papers and the real -world applications discussed in the chapter, defining those technical terms along the way.
Probability really is a cornerstone.
It definitely seems that way.
But you know, what's really interesting is that while this probabilistic view is clearly fundamental, the sources HINT and other areas of ML show that there are actually other ways algorithms can learn to classify things effectively, sometimes without explicitly estimating these probability distributions at all.
That's a great point.
It raises a fundamental question.
Do you actually need to model the probability of how the data was generated, px, y, or px, y, in order to learn how to effectively separate the classes or predict y from x?
Right.
And algorithms like, say, the nearest neighbor classifier seem to take a completely different approach, focusing more on similarity and distance in the feature space rather than probabilities.
That sounds like a whole other fascinating way to think about pattern recognition.
Perhaps a deep dive for another time.
ⓘ This audio and summary are simplified educational interpretations and are not a substitute for the original text.
Using this chapter to study? Last Minute Lecture is free and student-run. If it helped, consider supporting the project.
Support LML ♥Related Chapters
- Clinical Reasoning, Assessment, & PlanBates' Guide To Physical Examination and History Taking
- Cognitive Intelligence and ThinkingThe Matter with Things
- Cognitive Psychology: History, Methods & ParadigmsCognitive Psychology In and Out of the Laboratory
- Evidence-Based AssessmentPhysical Examination and Health Assessment
- Focal Attention & Figural Synthesis in Visual PerceptionCognitive Psychology (1967)
- Perception: How We Experience the WorldA Textbook of Human Psychology