Probability, Random Variables, and Probability Distributions
AP Statistics Topic 4 8:39 English narration · English + 中文 subtitles burned in
Chapters
Transcript
A basketball player makes five shots in a row. The crowd is sure she is hot tonight.
一名篮球运动员连续五次投篮命中,观众都确信她今晚手感火热。
But watch what chance alone can do.
但看看单靠运气能做出什么。
Flip a fair coin twenty times.
把一枚均匀的硬币抛二十次。
There — five heads in a row, right in the middle.
看——连续五次正面,就在中间。
So a pattern by itself is not proof that something special is going on.
所以,仅仅出现一个规律, 并不能证明背后有什么特别的事情。
What does a probability mean?
概率是什么意思?
It is the long-run relative frequency — the fraction of times an outcome happens over many repeats.
它是长期相对频率——把一件事重复很多次时,某个结果出现的比例。
Watch the fraction of heads as we flip.
看正面出现的比例,随着我们不断地抛。
In the first ten flips it swings wildly. After a hundred it is calmer; after a thousand it sits close to one half. That is the law of large numbers.
前十次抛掷时它上下剧烈摆动, 到一百次时平稳一些,到一千次时已经贴近二分之一。
When a probability is hard to work out, run a simulation instead — the resulting proportion estimates the probability.
这就是大数定律。 当一个概率很难算出来时,就改用模拟——得到的比例就是对概率的估计。
Here is the plan. What randomness and probability really mean. The rules for combining events. Conditional probability and independence. Random variables and their distributions. And two named distributions: the binomial and the geometric.
这是今天的计划:随机性和概率到底是什么意思;把事件组合起来的法则; 条件概率与独立性;随机变量和它们的分布; 还有两个有名字的分布:二项分布和几何分布。
A simulation is worth its own method, because the exam asks you to DESCRIBE one, and a vague answer earns nothing.
模拟值得单独讲一套方法,因为考试会要求你描述一次模拟,含糊的回答得不到分。
Four steps.
四个步骤。
First, state the model and say clearly what one trial is.
第一,说明模型,并且明确说出一次试验是什么。
Second, assign digits to the outcomes, in proportion to their probabilities.
第二,按照概率的比例,把数字分配给各个结果。
For a seventy percent free-throw shooter, let the digits zero through six count as a make and seven through nine as a miss, and let one trial be ten digits.
对一个罚球命中率百分之七十的球员,让数字零到六代表命中,七到九代表不中,并且让十个数字 算作一次试验。
Third, run it: read digits from the table or the generator, trial after trial, and skip any digit you did not assign.
第三,运行它:从随机数表或生成器中一个个读数字,一次试验接着一次试验, 并跳过任何你没有分配的数字。
Fourth, record the proportion of trials that met the condition you were asked about.
第四,记录满足题目条件的试验所占的比例。
That proportion is only an estimate of the probability, and more trials make it a better one.
这个比例只是概率的 一个估计值,试验次数越多,估计就越好。
This is how you answer a probability question without ever writing a probability formula.
这就是不写任何概率公式来回答概率问题的办法。
Every probability is a number from zero to one.
每一个概率都是零到一之间的数。
Zero means impossible, one means certain, one half is an even chance.
零表示不可能,一表示必然,二分之一表示机会均等。
So an answer of one point two is already wrong.
所以答案要是一点二,那已经错了。
And whatever is not the event fills the rest of the line: if the chance of rain is zero point three, the chance of no rain is zero point seven.
而不属于这个事件的部分,占满了线上剩下的长度: 如果下雨的概率是零点三,不下雨就是零点七。
That is the complement rule.
这就是补事件法则。
Where do those numbers come from?
这些数从哪里来?
The sample space lists every possible outcome once.
样本空间把每一个可能的结果都列出来,各列一次。
Roll two dice: thirty six equally likely outcomes.
掷两颗骰子:三十六个等可能的结果。
An event is a collection of them.
而事件就是其中一些结果的集合。
Take the event, the total is seven: six cells give seven, so the probability is one sixth.
看"两数之和为七"这个事件:有六个格子的和是七,所以概率是六分之一。
Equally likely outcomes turn probability into counting.
结果等可能时,求概率就是数数。
Now two events at once.
现在同时看两个事件。
The overlap, where both happen, is the intersection.
两者都发生的那块重叠部分,叫做交集。
If two events have no overlap, they are mutually exclusive: they cannot happen together.
如果两个事件完全没有重叠,它们就是互斥的:不可能同时发生。
For one event or the other, add the two probabilities and subtract the overlap, because it was counted twice.
要求"其中一个或另一个发生"的概率,就把两个概率相加,再减掉重叠部分, 因为它被数了两次。
If they are mutually exclusive, you just add — that is the addition rule.
如果它们互斥,直接相加就行——这就是加法法则。
Here is the idea that makes conditional probability click.
有一个想法能让条件概率一下子说得通。
You are told that B happened, so every outcome outside B is gone.
别人告诉你 B 发生了, 于是 B 以外的每一个结果都不复存在。
B is the whole world now, and you ask about A inside that smaller world.
现在 B 就是整个世界, 你在这个更小的世界里再问 A 的概率。
The top can stay the same while the bottom shrinks.
分子可以保持不变,分母却变小了。
The denominator changed — that is the whole idea.
分母变了——这就是全部的关键。
In the exam this is a two-way table.
在考试里,这就是一张双向表。
Sixty students play sport, and twenty four are girls.
有六十名学生参加运动,其中二十四名是女生。
So the chance a student is a girl, given that she plays sport, is twenty four out of sixty.
所以"已知一名学生参加运动,她是女生"的概率,就是六十分之二十四。
You did not divide by the whole class — you divided by the sport column, because that is the world you were given.
你没有除以全班人数,而是除以"参加运动"这一列,因为那才是题目给你的世界。
Turn it around and you get the multiplication rule.
把它反过来写,就得到乘法法则。
Now the confusion that costs marks.
现在说说丢分最多的那个混淆。
Mutually exclusive means the two events cannot happen together, so there is no overlap.
互斥的意思是两个事件不能同时发生,所以没有重叠。
Independent means knowing one tells you nothing about the other.
独立的意思是知道其中一个,对另一个一无所增。
For real events they cannot both be true: if two events cannot happen together, learning the first happened tells you the second is impossible — so they are dependent.
对真实的事件来说, 这两件事不可能同时成立:如果两个事件不能同时发生, 那么知道第一个发生了,就等于知道第二个不可能发生——所以它们是相关(dependent)的。
To check, multiply the two probabilities and compare.
要检验独立,就把两个概率相乘,再作比较。
Now from events to numbers.
现在从事件转到数字。
A random variable takes a number from a chance process.
随机变量把一个随机过程的结果变成一个数。
Flip a coin twice and let the variable count the heads: zero, one or two.
抛两次硬币,让这个变量数正面的次数:零、一或二。
Its distribution lists each value with its probability, and they must add to one.
它的分布把每个取值和对应的概率列出来,而这些概率相加必须等于一。
Discrete means a countable list; continuous means a whole range.
离散指取值是可数的一串,连续指取值是一整段范围。
The mean of a random variable is called the expected value.
随机变量的平均值有个专门的名字:期望值。
Work one right through.
我们把一道题从头做到尾。
A game pays five dollars with probability zero point two, and costs one dollar otherwise.
有个游戏以零点二的概率赔给你五美元, 其余时候让你损失一美元。
First write the two values with their probabilities; they add to one.
第一步,把两个取值和它们的概率写下来,它们之和是一。
Then multiply each value by its probability and add. Five times zero point two is one; minus one times zero point eight is minus zero point eight.
然后把每个取值乘以它的概率再相加:五乘以零点二等于一, 负一乘以零点八等于负零点八。
Together, twenty cents — a long-run average, never on a single play.
合起来是二十美分——这是长期平均值, 任何一次都不会正好赚这么多。
For the spread, square how far each value sits from the mean, weight by probability, and add: five point seven six.
至于离散程度,先算每个取值离平均值有多远, 把它平方,按概率加权求和,得到五点七六。
Its square root is two dollars forty.
它的平方根是二点四美元。
Real problems combine variables, and two rules do most of the work.
真实的问题会把随机变量组合起来,两条法则几乎能解决全部问题。
Means always add: the mean of a sum is the sum of the means.
平均值总是相加:和的平均值等于各自平均值之和。
And if the variables are independent, the variances add — the variances, not the standard deviations.
而如果两个变量相互独立,方差相加——是方差,不是标准差。
Here is the part students get wrong: for a difference the variances still add. They never subtract.
学生最常错的一点是:求差的时候方差仍然相加,绝不相减。
Two special distributions come up again and again.
有两个特殊的分布会反复出现。
The first is the binomial: it counts successes in a fixed number of tries.
第一个是二项分布:它在固定的试验次数中数成功的次数。
The check is four letters, BINS. Binary, so each trial is a success or a failure.
检验它的口诀是四个字母,BINS。
Independent trials. A fixed Number of them. And the Same chance of success every time.
Binary,每次试验只有成功或失败; Independent,各次试验相互独立;fixed Number,次数固定; Same,每次成功的概率都相同。
Watch the shape appear.
看这个形状是怎么出现的。
Ten trials, each with a one in two chance of success.
十次试验,每次成功的概率是二分之一。
Each bar is the chance of exactly that many successes.
每一根柱子表示恰好取得那么多次成功的概率。
The middle bars are tall and the ends nearly empty: five out of ten is common, zero or ten almost never.
中间的柱子很高,两端几乎是空的: 十次里成功五次很常见,零次或十次几乎不会发生。
One more, the one the exam loves.
再做一道,考试最爱考的那一类。
A player makes seventy percent of her free throws.
一名球员的罚球命中率是百分之七十。
In ten shots, what is the chance of exactly eight makes?
投十次,恰好命中八次的概率是多少?
First check the setting: ten fixed shots, each a make or a miss, same chance every time, independent.
先检查情境:固定的十次投篮, 每次不是中就是不中,每次概率相同,而且相互独立。
That is binomial.
这就是二项分布。
Now the formula.
接下来用公式。
Forty five is the number of ways to choose which eight shots went in.
四十五是"从十次中选出哪八次命中"的方法数。
Multiply that by zero point seven to the eighth power, times zero point three squared.
再乘以零点七的八次方,以及零点三的平方。
That is about zero point two three.
答案大约是零点二三。
And the mean is ten times zero point seven, seven makes, with a standard deviation near one point four five.
而平均值是十乘以零点七,也就是命中七次,标准差接近一点四五。
Change the chance of success and the picture moves.
把成功的概率改一改,整张图就变了。
Here each trial succeeds three times in ten, so the bars pile up on the left and trail off right.
这里每次试验成功的概率是十分之三, 所以柱子堆在左边,向右逐渐拖尾。
The dashed line marks the mean, at three: trials times the chance of success.
虚线标出平均值,在三的位置: 试验次数乘以成功的概率。
The standard deviation says how far a typical count sits from it.
标准差则告诉你,一个典型的次数离它有多远。
Say it in context — three makes out of ten shots.
要结合情境来说——十次投篮里命中三次。
The second distribution changes one thing: there is no fixed number of trials.
第二个分布只改了一件事:试验次数不再固定。
You keep going until the first success, and the variable is the trial where it happens.
你一直做下去,直到第一次成功,而这个变量就是成功的那一次是第几次。
The bars always fall from left to right, because the first trial is the most likely place to succeed.
柱子总是从左往右下降,因为第一次试验是最可能成功的地方。
The mean is one divided by the chance of success, so if a six comes up one time in six, you wait six rolls.
平均值等于一除以成功的概率,所以掷出六点的概率是六分之一时,你平均要掷六次。
Three marks students lose.
说三个学生常丢的分。
First, mutually exclusive is not the same as independent — check independence by multiplying, not by looking at the overlap.
第一,互斥和独立不是一回事—— 检验独立要用相乘,不能看有没有重叠。
Second, the variances always add, even when you subtract the variables.
第二,方差总是相加, 即使你把变量相减也一样。
Third, read the setting before you pick a formula: a fixed number of trials is binomial, waiting for the first success is geometric.
第三,先看清情境再挑公式: 试验次数固定的是二项分布,一直等到第一次成功的是几何分布。