斯坦福 · Probability for AI / PAI00
斯坦福 Probability for AI:课程介绍
我接下来学的是斯坦福的免费在线课程 Probability for AI(PAI,读作 "pie"),讲的是现代人工智能背后的概率。在每周笔记开始之前,这一篇先介绍这门课:谁在教、怎么教、学生页面是什么样,以及六周的内容怎样安排。
Stanford's Probability for AI: an Introduction to the Course
The next course I am taking is Probability for AI (PAI, pronounced "pie"), a free online course from Stanford that teaches the probability modern AI is built on. This page introduces the course before my weekly notes begin: who runs it, how it is taught, what the student site looks like, and how the six weeks are planned.
- 章节 / section
- 关键概念 / key term
- 阅读提示 / reading note
PAI 是什么
What PAI is
PAI is based on material from CS109, Stanford's probability course for computer scientists, rebuilt for the general public. The course says comfort with algebra is all you need: if you can make sense of y = 2x + 1, you have the background.
| Cost | Free: no fees, no ads, no premium tier |
| Length | Six weeks, a few focused hours each week |
| Prerequisites | Algebra; no programming or calculus needed |
| Grades and credit | None; you keep a public portfolio of your work, hosted by Stanford |
| Fixed time | One live section a week; everything else on your own schedule |

背后的人
The people behind it
The course is led by two Stanford computer science professors, Chris Piech and Mehran Sahami, with Kelly Cochran as the course director. Chris's research uses machine learning to understand how people learn. Mehran also worked as a research scientist at Google.
They have done this before. In 2020 they helped start Code in Place, a free introduction to coding that welcomed more than ten thousand students in its first offering. PAI is taught the same way.

Code in Place 的教法
The Code in Place way
The model is simple: one volunteer teacher for every ten students. The teaching team's bet is that the number of people who want to teach is large, perhaps close to the number who want to learn, and that teaching is the best way to learn. Many section leaders took a course like this once and came back to pass it on.

进入课堂之后
进入学生页面后,有几个部分,各有分工:
- Home:把本周安排画成一条路线:要看的课、要做的项目,以及小组课。
- Lessons:课程视频,还有一个汇总了所有定义和规则的工具箱(Toolbox),以及课程教材。
- Puzzles:每天给全班一道新的概率题,另有一个可以把已发布题目全部练一遍的练习器。
- Portfolio:存放你做的所有项目。我的第一批作品是 Word Detective 和 Inference Time Calculator。
- Events:每周一和 Chris 的半小时线上活动,都会录像。
- Forums:全班和各小组交流的地方。



Inside the class
Once you are in, the student site has a few parts, each with a clear job:
- Home: the week's plan as a path: lessons to watch, something to build, and your section.
- Lessons: the lecture videos, plus a toolbox with every definition and rule in one place, and the course book.
- Puzzles: a new probability puzzle for everyone each day, and a trainer with every puzzle released so far.
- Portfolio: everything you build. My first projects are a Word Detective and an Inference Time Calculator.
- Events: a half-hour session with Chris every Monday, and it is recorded.
- Forums: where the whole class, and each section, talks.



每周的小组课
The weekly section
For me the most interesting part of the design is the section. Each week I meet live for 50 minutes with a volunteer section leader and about ten other students. Our leader goes over that week's ideas, and we work through problems together. Sections run at all hours from Wednesday to Friday, so there is a time for every time zone.
Our first topic was "Same prompt, different answers?". This week it is the Palpatine poll: how do you find out how many people secretly support someone, when nobody wants to say so out loud?

Section is also how the course knows you are doing your own work: the certificate depends on taking part each week, not on online answers that an AI could produce.
六周怎么安排
How the six weeks are built
Each week pairs one idea from probability with something you build:
| Week | You learn | You build |
|---|---|---|
| 1 | Core probability | An inference-time resource decision maker for large AI models |
| 2 | Random variables | Probabilistic artwork |
| 3 | Maximum likelihood estimation | Find hidden chambers in the pyramids, a cell-phone tracker, and more |
| 4 | Logistic regression | A test suite to see where it works and where it fails |
| 5 | Neural networks | Visualize how large models work under the hood |
| 6 | Probabilistic evaluation | Critique how AI models perform, including fairness and calibration |
The course ends with a final project of your own design, which becomes the centrepiece of the public portfolio.

怎样参加
有两种方式:申请当学生,或者申请当志愿老师,带一个小组。申请每年开放一次。2026 年的申请已在九月底截止,课程于 10 月 9 日开始,所以下一次机会是明年在 pai.stanford.edu 的申请。
How to join
There are two ways in: apply to learn, or volunteer to teach a small group of learners. Applications open once a year. For 2026 they closed at the end of September, and class started on 9 October, so the next chance is next year's round on pai.stanford.edu.
我的第一点感受
My first thought
I have just finished week one, and my notes from it come next. One line from the course FAQ has stayed with me: "not a math person" usually means "had one bad math class a while ago"
. It made me wonder whether I would have loved math and computer science even more if I had met teachers like these earlier.

链接
- Probability for AI:课程首页、FAQ 和申请。
- Probability for AI 团队。
- Code in Place:以同样方式教学的斯坦福免费编程课。
- Chris Piech 与 Mehran Sahami 的斯坦福主页。
Links
- Probability for AI: the course home page, FAQ and applications.
- The Probability for AI team.
- Code in Place: the earlier free Stanford course taught the same way.
- Chris Piech and Mehran Sahami: Stanford profiles.
