斯坦福 · 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 是什么

PAI 的内容来自斯坦福面向计算机专业学生的概率课 CS109,改编成面向大众的版本。课程说,只要会代数就够了:能看懂 y = 2x + 1,就有足够的基础。

费用免费:没有学费、没有广告、没有付费版
时长六周,每周几个小时的专注学习
先修要求代数;不需要编程,也不需要微积分
成绩与学分都没有;留下的是一份由斯坦福托管的公开作品集
固定时间每周一次线上小组课,其余时间自己安排
PAI 首页:“一门由数百位老师一起教的斯坦福免费课程”,下方是 Apply to learn 和 Volunteer to teach
PAI 首页:“一门由数百位老师一起教的斯坦福免费课程”,下方是 Apply to learn 和 Volunteer to teach

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.

CostFree: no fees, no ads, no premium tier
LengthSix weeks, a few focused hours each week
PrerequisitesAlgebra; no programming or calculus needed
Grades and creditNone; you keep a public portfolio of your work, hosted by Stanford
Fixed timeOne live section a week; everything else on your own schedule
The PAI home page:
The PAI home page: "A free Stanford course, taught with hundreds of teachers", with Apply to learn and Volunteer to teach

看视频这一段 / Watch this part

背后的人

课程由斯坦福计算机系的两位教授 Chris Piech 和 Mehran Sahami 主讲,Kelly Cochran 担任课程主任。Chris 的研究是用机器学习理解人是怎样学习的;Mehran 还曾在 Google 担任研究科学家。

他们做过类似的事。2020 年,他们参与创办了 Code in Place,一门免费的编程入门课,第一期就迎来了一万多名学生。PAI 也用同样的方式来教。

Probability for AI 团队页面:主讲教授、创始团队和首席助教
Probability for AI 团队页面:主讲教授、创始团队和首席助教

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.

The Probability for AI team page: instructors, founding team and head teaching assistants
The Probability for AI team page: instructors, founding team and head teaching assistants

看视频这一段 / Watch this part

Code in Place 的教法

做法很简单:每十名学生配一位志愿老师。教学团队相信,想教的人其实很多,也许和想学的人差不多;而教,是最好的学习方式。很多小组老师(section leader)当年也上过类似的课,后来回来把它传下去。

公开页面上的 About the Class:适合谁、每周多少工作量,以及每十名学生一位老师的模式
公开页面上的 About the Class:适合谁、每周多少工作量,以及每十名学生一位老师的模式

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.

"About the Class" on the public page: who it is for, the workload, and the one-teacher-per-ten-students model

看视频这一段 / Watch this part

进入课堂之后

进入学生页面后,有几个部分,各有分工:

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

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 student home page: week 2 as a path from lessons to a project to the section
The student home page: week 2 as a path from lessons to a project to the section
Puzzles: today's puzzle for the whole course, the puzzle trainer and the week's streak
Puzzles: today's puzzle for the whole course, the puzzle trainer and the week's streak
My portfolio after week 1: Word Detective and Inference Time Calculator
My portfolio after week 1: Word Detective and Inference Time Calculator

看视频这一段 / Watch this part

每周的小组课

我觉得这门课设计里最有意思的是小组课(section)。每周我和一位志愿小组老师、大约十位同学线上见面 50 分钟。老师先梳理这一周的内容,再带大家一起做题。小组课从周三到周五全天都有,不同时区都能找到合适的时间。

第一次的主题是“同一个提示,为什么答案不一样?”。这周是“帕尔帕廷民调”:当没人愿意公开说出来时,怎样知道有多少人暗中支持某个人?

我的小组课页面和课表(为保护隐私,姓名和头像已打码)
我的小组课页面和课表(为保护隐私,姓名和头像已打码)

小组课也是课程确认“这是你自己在学”的方式:证书看的是每周的参与,而不是 AI 也能代做的线上作答。

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?

My section page with the schedule (names and faces blurred for privacy)
My section page with the schedule (names and faces blurred for privacy)

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.

看视频这一段 / Watch this part

六周怎么安排

每周把一个概率概念和一个要动手做的项目配在一起:

周学什么做什么
1概率基础一个为大型 AI 模型决定推理时投入多少算力的工具
2随机变量概率生成的艺术作品
3最大似然估计寻找金字塔里的隐藏墓室、手机定位等
4逻辑回归一套测试,看它在哪里有效、在哪里失灵
5神经网络把大模型的内部运作可视化
6概率评估评析 AI 模型的表现,包括公平性和校准

课程最后是一个自己设计的期末项目,它会成为公开作品集的核心。

学生页面 About 里的课程结构
学生页面 About 里的课程结构

How the six weeks are built

Each week pairs one idea from probability with something you build:

WeekYou learnYou build
1Core probabilityAn inference-time resource decision maker for large AI models
2Random variablesProbabilistic artwork
3Maximum likelihood estimationFind hidden chambers in the pyramids, a cell-phone tracker, and more
4Logistic regressionA test suite to see where it works and where it fails
5Neural networksVisualize how large models work under the hood
6Probabilistic evaluationCritique 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.

The course structure on the student About page
The course structure on the student About page

看视频这一段 / Watch this part

怎样参加

有两种方式:申请当学生,或者申请当志愿老师,带一个小组。申请每年开放一次。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.

看视频这一段 / Watch this part

我的第一点感受

我刚刚学完第一周,接下来会分享这一周的笔记。课程 FAQ 里有一句话让我印象很深:“不是学数学的料”,通常只是意味着“很久以前上过一堂糟糕的数学课”。它让我想到:如果我能早一点遇到这样的老师,也许会更喜欢数学和计算机科学。

FAQ 对“我不是学数学的料,这门课适合我吗?”的回答
FAQ 对“我不是学数学的料,这门课适合我吗?”的回答

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.

The FAQ answer to
The FAQ answer to "I'm not a math person. Is this for me?"

看视频这一段 / Watch this part

链接

Links

原图 / Original ↗