A Concrete Introduction to Probability (2018)
github.com
github.com
Back in university and grad school I would write tutorials and post them online (and still get thanks from random people many many years later). I would explore random interesting subjects and dive deep. I would constantly publish code and demos, etc. As my career grew, one of one these started to fall off. I look at my peers and it's the same story: they were all vibrant hot-shots in their early-mid 20s, and now are just weighed down by the teams and projects they manage.
Peter is an inspiration. I will ponder this...
- Probability, Paradox, and the Reasonable Person Principle https://github.com/norvig/pytudes/blob/master/ipynb/Probabil...
- Estimating Probabilities with Simulations https://github.com/norvig/pytudes/blob/master/ipynb/Probabil...
There are dozens of other notebooks on a variety of topics in the 'ipynb' folder: https://github.com/norvig/pytudes/tree/master/ipynb
> I have two children. At least one of them is a boy born on Tuesday. What is the probability that both children are boys?
An interesting thing about this problem is the unspoken assumption of what happens in other counterfactual worlds. If the person always answers the question "is one of your kids a boy born on Tuesday?" then the problem is solvable. But if a different family history would've caused the person to answer a different question ("born on a Monday" instead of Tuesday), then the answer would depend on the person's algorithm. Eliezer gave a dramatized explanation here: https://www.lesswrong.com/posts/Ti3Z7eZtud32LhGZT/my-bayesia...
Further on this path, there are seemingly basic questions that cause disagreement among actual statisticians. For example, see the voltmeter story in https://en.wikipedia.org/wiki/Likelihood_principle:
> An engineer draws a random sample of electron tubes and measures their voltages. The measurements range from 75 to 99 Volts. A statistician computes the sample mean and a confidence interval for the true mean. Later the statistician discovers that the voltmeter reads only as far as 100 Volts, so technically, the population appears to be "censored". If the statistician is orthodox this necessitates a new analysis. However, the engineer says he has another meter reading to 1000 Volts, which he would have used if any voltage had been over 100. This is a relief to the statistician, because it means the population was effectively uncensored after all. But later, the statistician ascertains that the second meter was not working at the time of the measurements. The engineer informs the statistician that he would not have held up the original measurements until the second meter was fixed, and the statistician informs him that new measurements are required. The engineer is astounded: "Next you'll be asking about my oscilloscope!"
Do some people think that the possibility of not being able to take accurate measurements is the same as not having taken accurate measurements?
EDIT: Maybe the ambiguity is in what the engineer would have recorded if finding a voltage >100 volts while the other meter was broken? It's like undefined behavior in programming; if you know your software will have undefined behavior when encountering certain data then you can't trust whether the output is valid unless there's independent confirmation that the data won't cause undefined behavior. If the statistician doesn't have certainty that the engineer will have defined behavior (e.g. say "I couldn't complete the measurements" vs. undefined behavior like writing down "99" or exploding) then they of course want to re-measure.
I have a box with 1000 tubes, exactly 1% of which are beyond my capacity to measure.
I take a random sample of 20, and call that a roughly 80% chance of being able too measure all of them.
Let's say the average is 50V and the ones beyond my measurement average 150V. We can use this info to solve for the average of the tubes we can measure: 25V.
So, in 80% of the cases we'll get an average measurement of 25V.
In 20% of the cases we're going to realize our mistake, buy a better voltmeter, and redo everything. In this case we can measure everything so we get the correct number: 50V.
25V * 0.8 + 50 * 0.2 = 30V
This, of course, won't be statistically significant. But let's get a lot of researchers together to measure a lot of tubes. And let's say 100V limit meters are common so half make the same mistake.
Now we have a statistically significant 40V. Wrong, wrong wrong.
I don’t understand this reasoning. If at least one is a boy, the only configurations I can think of is 1 boy 1 girl or 2 boys. Where does the 1/3 come from?
0 boys - 1/4
1 boy - 1/2
2 boys - 1/4
There's a half chance of getting exactly one boy, and one way to calculate this is by noticing there are two different ways to get one boy if we take order in account. You are right that the orderings don't matter in this case, so we could also e.g. model this with a binomial distribution. Once you know there are >= 1 boys, the chance you have two is 0.25/(0.25+0.5) = 1/3.With the risk of being accused of binarism, there are four distinct possibilities with (close to) equal a priory probability of 25%: older boy/younger boy, older boy/younger girl, older girl/younger boy, and older girl/younger girl.
Discarding the girl/girl case leaves three equally probable cases.
"I have two children, Michael and Alex. Michael is a boy. What's the probability of both being boys?"
If you make a truth table with names as columns, you clearly have only two possibilities for Michael=1.
However if you pick older/younger again you're back to 3 possible states.
I think the answer is still 1/3, but it's a trickier one to reason about immediately.
It seems the question adds information by naming the children, but there's a hidden statement in the form "at least one of them is Michael", which invalidates a truth table with names as columns.
I can only conclude that birth order is an underlying property of the entity. A strict, real differentiator as much as sex is. Names aren't, so names don't add information in this case.
Is there a term for that? Or am I just wrong?
In your variant you need additional assumptions. Will the person always tell you the sex and name of the eldest? Or the names of the boys?
“Michael is a boy” is not really different from “the youngest is a boy”. The probability of both being boys depends on why are you being told that.
[1] Depending in the context the assumption may not be appropriate (a extreme example may be China).
And to count how many ways the universe can give rise to the unordered data sets, the usual technique is to expand the unordered data sets into all the equivalent ordered data sets, and count the latter.
My biggest problem with the teaching of math (and I can weigh in on this a bit because I spent over a decade as a private tutor of math) is that math is often not introduced in a concrete manner, as well as in a way such that its utility is obvious. These are two sides of the same coin.
You can see this problem in most Wikipedia math pages. I took more math than most physics majors and I find quite a lot of what I stumble across either baffling or of unknown utility. Set theory is a great instance of this. I rarely see multiple examples listed as it is explained, nor does anyone bother to tell me what it is for, other than to do more set theory.
Stats at least has the benefit of having to stick closer to applicability, I think.
It's easy to make trivial mistakes without a firm grasp of the theoretical side in my opinion. It's important to understand the implications of the choices being made and the theoretical limitations of the models being created.
Set theory for example (since you mentioned it) is introduced in many probability books in an applicable fashion since probability is concerned with events which can be modeled as sets of outcomes. So while you might not find a book directly on "set theory applicability in the real world" you can find many introductions to it in a particular domain which are applicable.
This cannot be emphasized enough. Most people won't be doing any higher order math in their lifetime -- we should be teaching math literacy and "real world" math for the masses rather then pretending that every student is going into physics.
https://www.usfinancialcapability.org
The survey is composed of five really-quite-basic questions about interest rates, inflation and risk assessment.
As of 2018, 66% of survey participants get 3 or fewer of the questions right.
I suppose I would tell a student that asks “why would I want to remember the stupid rule for multiplying matrices together in that way?” to try and figure out a rule for multiplying two matrices together such that you could represent functional composition by it, and they would self-discover the matrix multiplication rule and see why it would be useful to do it that way.
If one was already exposed to the need of solving the linear systems, then the matrix calc becomes of a direct utility.
I took exactly one class of 2nd year physics and couldn't see the point of it. I walked out, quit physics altogether and came back the following year to do CS.
Also, maybe it's only me, but mathematicians often forgot their own culture. Or maybe it's due to the iconic status of the field during early education, making people never explain why they do the things they do. When you read about history of mathematics you see that problems were 1) very practical ones 2) first tricks were very natural. It is not a thing from the gods.. at least it didn't start like this.. it condensed into a diamond over centuries of refinements. But if you don't show that to the crowd, you lose 90% of the audience. It's a pity.
Take statistics for example - most people that know something about statistics don't exactly know what a statistical space is (and it is a very precisely defined concept, embedded in the set theory). And that's fine, that's for the "pure" nerds. How to use it can be taught without defining the roots and proving theorems from the ground up. It is also how most of software development is done, few people out there that write code understand how CPUs fetch and execute instructions, talk to other perhipherials, how does malloc()_or sin() work, what is a page fault, or how to balance a red-black tree. Just use std::map or dict() or something, it just works :)
literally every single one of these things is taught in an undergrad class and understanding of which is deemed important by the community - curricula get lots of input from industry partners. so you're not making a great case for why people don't need to know what a sigma algebra is...
>Just use std::map or dict() or something, it just works :)
wouldn't it be swell if this is how we practiced medicine too? patient has early stages of atherosclerosis just do a triple-bypass or something, it just works.
I can assure you most people that do stats / data mining / big data / machine learning do not know or do not remember any more what a sigma algebra is.
> wouldn't it be swell if this is how we practiced medicine too? patient has early stages of atherosclerosis just do a triple-bypass or something, it just works.
C'mon writing websites is not surgery. There are some people with deep knowledge required in the industry as a whole, but you really don't know to know much to write an app or a website, especially an internal corporate tool. And this is where most working hours are spent.
It's the reality of things. I mean just look at the OP link. Do you think this is targeted at people that already know what a sigma algebra is?
1. fundamentals are important even if people forget them.
2. not everyone in tech does web dev.
these things are true and self-evident. the end.
It's a popular theory, but then one day you read every recent biology paper and notice that only 2% of them are able to do statistics in a way that isn't total nonsense.
The only way for "learn how to use it, but not how it works" to work is if you get feedback whenever you make a mistake. That is not true when you use statistics.
Set theory is the concrete starting point after that training, and the first step of concrete problems is to translate them into an abstract form of maps on sets. It's a decoupling. Instead of translating n techniques into m domains (n*m bits of work), you develop n techniques in terms of set theory, and translate m domains into set theory (n+m bits of work).
Physics majors largely use the same pieces of math on the same domains, so this decoupling doesn't make sense for them. Similarly, most domains carve off some piece of math and statistics and specialize it. But if you're writing a reference, whose specialty do you choose?
mathematical maturity is the same as "code sense". when i started writing code a couple of years ago i would get cross-eyed reading large blocks of code i.e. i would get lost in the syntax and the abstractions and the idioms. at the same time i had pretty decent "mathematical maturity" i.e. i could read papers and textbooks pretty handily. comparing it seems obvious that formal mathematics, with its idioms, abstractions, and syntax is basically the same thing (without pushing the curry-howard isomorphism too far).
Sometimes folks will be afraid of things, even though the odds are they'll be okay. Knowing the odds can give you courage where others find it difficult to go beyond fear.
I've been a fan of Peter's AI book(s) since my university coursework. Glad he's introduce so many of us to these helpful ideas. Basic ideas can go a long way if you learn where they apply to your life.
Which is funny because I totally recognize now how it can be applied, but moving from system of equations on paper to real world applications never really clicked in usefulness until it was explained in that video.
[1]: https://www.uni-muenster.de/Physik.TP/~munsteg/arnold.html
A lot of it comes from mathematics always being taught in conjunction with physics. Not sure what the roots of that are.
I know it’s a meme that edits to Wikipedia are fraught with editor politics and reversion of good faith changes made by users, but that hasn’t been the case for me lately. If you have something to add or improve, don’t let anything hold you back!
I believe that the issue you're outlining was the precursor to simple.wikipedia.org. Sorry... I couldn't come up with a math example on the spot but here's a good CompSci example:
Many of the courses on very abstract content I’ve taken (from other people, in person) has been very concretely introduced, or at least the course has been run with a 50/50 split on the abstract (general theory) and the concrete (solving problems).
This gets mentioned so often that I feel it hints at a deep misunderstanding at what Wikipedia is or is supposed to be.
Wikipedia is an encyclopedia. It's not a teaching resource, and it shouldn't be. (Nor, for that matter, is it a primary source, which makes it useless as a reference if you're writing a paper, unless you're specifically writing about Wikipedia.)
Mathematics is such a ubiquitous language. Different people will require different kinds of mathematics, for vastly different purposes and in various levels of depth and formality, there's no way this can be unified into a single-size-fits-all resource. If you want to learn mathematics, now more than ever there is such an amazing breadth of text books, blog posts, lecture videos, online communities and so on that you can use depending on your very specific needs. I don't know why people go and try reading up on mathematics from Wikipedia, out of all places.
Isn't an encyclopedia a teaching resource? Etymology isn't destiny, but the "pedia" part is from Greek παιδεύω, meaning "child rearing". I'd interpret that as meaning "instructional".
The "encyclo" part means "circle", which in this case alludes to "comprehensive". As in, it's not just one instructional resource, but a guide to everything.
The word will grow and change over time, but I think most encyclopedias are still used as teaching resources. That doesn't mean Wikipedia has to be, but if it really wants to be an encyclopedia, I think it means the opposite of "shouldn't be a teaching resource".
> Etymology isn't destiny [...]
exactly.
> [...] but I think most encyclopedias are still used as teaching resources.
Of course, learning how to use a reference properly and effectively can be a goal in didactics, especially when you're studying a particular subject. But the reference work is not, by itself, a teaching resource such as a textbook.
I don't understand what's so controversial about that. If I open a page about, say JIT compilation, I'm also immediately confronted with jargon. The fact that most people here would be familiar with that jargon doesn't mean that that page is of any use to someone who doesn't know what a compiler is. The same applies probably to hundreds of different subjects, be it biomedical, philosophical, etc.
If you want to define the probability measure you'll need to be pretty comfortable with set theory.
Utility was for physics, which I also majored in.
I did it as preparation for my Masters and it was genuinely helpful. Would recommend it to everyone looking to do a prob 201 before taking advanced-ish courses.
[0] https://youtube.com/playlist?list=PL2SOU6wwxB0uwwH80KTQ6ht66...
[1] https://drive.google.com/file/d/1VmkAAGOYCTORq1wxSQqy255qLJj...
Every year looking at his solutions for advent of code [0] brings just so much learnings. Strongly recommend.
[0] https://github.com/norvig/pytudes/blob/master/ipynb/Advent%2...
I feel his skill of dividing a problem into small pieces and expressing them in code in a natural way is unparalleled. Most books/blogs/articles I see often focus on one of two patterns.
The most frequent one is pulling in some dependencies and using a high level API, essentially skipping any real problem solving. Great when you just need a problem solved and are familiar with some framework/library but not that great for learning to program or problem solving
The other one is a deep dive into a data structure, algorithm or performance tuning. This is great when studying theory or optimizing. These articles are more interesting but I haven't encountered many people who are in a position where this is relevant to day to day work.
The missing pattern is one where Peters' work shines. The parts in between. All the libraries that are used in the first example I described are the result of someone taking the building blocks that result from the second example and applying them to a real world problem. Peter Norvig is my go to recommendation when someone is interested in becoming better at solving day to day problems because of this.
(Maybe those Advent of Code solutions are the first working draft, I don't know.)