概率的公理化方法
听到概率这个词会带来与不确定性或随机性相关的模糊概念。概率的概念很难正式描述,最接近的直觉是它可以帮助我们分析某个事件发生的可能性或可能性。这种分析有助于我们描述我们在现实生活中看到的许多现象。即使是最随机的过程或现象也可以使用概率模型来描述,并且可以在一定程度上进行预测。这就是为什么概率是我们在现实生活中遇到的人工智能算法的基础。在正式描述概率定律之前,让我们看一下基本术语。
活动和样品空间
假设一个涉及抛硬币的实验。现在,抛硬币只有两种结果——正面或反面。兴趣是研究和计算由于抛硬币而得到尾巴的机会。这称为随机实验,该实验的所有可能结果构成样本空间。例如,假设一枚硬币被抛了 2 次。可能的结果是什么?
TH、HH、HT、TT
所有这些结果构成了样本空间。
Random Experiment: A random experiment is an experiment in which outcomes are random and thus cannot be predicted with certainty.
Sample Space: Sample space is the set of all possible outcomes associated with a random experiment. It is denoted using the symbol S.
让我们测量在上述实验中出现两个正面的概率。那么这个结果的概率定义为,
P =
对于这种情况,有利的结果是 HH,可能结果的总数是四个。
所以,概率(得到两个正面)=
不同的概率方法
前面计算概率的公式假设所有结果的可能性相同。例如,投掷一枚公平的硬币。结果正面和反面的可能性相同。所以这不能推广到每个实验。最初,概率论基本上有两种思想流派:
- 经典概率
- 频率概率
经典概率
这种方法假设所有结果的可能性相同。如果我们的事件可以在总共“N”种方式中以“n”种方式发生。那么概率可以由下式给出,
频率概率
这是一种更通用的概率计算方法。它并没有假设所有结果都是同样可能的。当结果的可能性不同时,我们将实验重复多次,假设为 M。然后,观察该特定事件发生了多少次,假设为 m。然后,计算概率的经验估计。所以,使用关系,
这两种方法都不能很好地概括并经受住数学的严谨性。
概率公理化方法采用将概率视为与任何事件相关的函数的方法。
概率的公理化方法
执行一个随机实验,其样本空间为 S,P 是任何随机事件发生的概率。该模型假设 P 应该是一个范围在 0 和 1 之间的实值函数。该函数的域被定义为样本空间的幂集。如果满足所有这些条件,则该函数应满足以下公理:
Axiom 1: For any given event X, the probability of that event must be greater than or equal to 0. Thus,
0 ≤ P(X)
Axiom 2: We know that the sample space S of the experiment is the set of all the outcomes. This means that the probability of any one outcome happening is 100 percent i.e P(S) = 1. Intuitively this means that whenever this experiment is performed, the probability of getting some outcome is 100 percent.
P(S) = 1
Axiom 3: For the experiments where we have two outcomes A and B. If A and B are mutually exclusive,
P(A ∪ B) = P(A) + P(B)
这里,∪代表联合。这可以理解为“如果 A 和 B 是互斥的结果,那么其中任何一个事件发生的概率就是 A 发生的概率加上 B 发生的概率”。
这些公理也被称为柯尔莫哥洛夫三公理。鉴于所有结果都是互斥的,第三公理也可以扩展到许多结果。
Let’s say the experiment has A1, A2, A3, and … An. All these events are mutually exclusive. In this case, the three axioms become:
Axiom 1: 0 ≤ P(Ai) ≤ 1 for all i = 1,2,3,… n.
Axiom 2: P(A1) + P(A2) + P(A3) +…. = 1
Axiom 3: P(A1 ∪ A2∪ A3 ….) = P(A1) + P(A2) + P(A3) ….
让我们看一些基于这些概念的示例问题。
示例问题
问题 1:找出涉及掷三枚硬币的随机实验的样本空间“S”。
解决方案。
We know that tossing a coin gives us either Heads or Tails. Tossing three coins will give us either triplets of either heads or tails. So, the possible outcomes can be,
HHH, HHT, HTH, HTT, ….
All these outcomes will constitute the sample space.
S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}
问题 2:找出掷骰子时得到数字 3 的概率。
回答:
We know that possible outcomes when a die is tossed are,
{1, 2, 3, 4, 5 and 6}
We want to calculate the probability for getting a number 3.
Number of favorable outcomes = 1
Total Number of outcomes = 6.
So, the probability of getting a number 3, P(3) =
P(3) =
问题3:假设一个班级正在通过随机抽签选择他们的班级队长。该班有30%的印度学生、50%的美国学生和20%的中国学生。计算所选船长是印度人的概率。
回答:
Let’s define an event A: Chosen captain is Indian. We know that there are only 30% Indian students in class.
Measure of favorable outcome = 0.3
Total Number of outcomes = 1
So, P(A) =
P(A) =
P(A) = 0.3
So, there is a 30% probability that an Indian student will be chosen as class captain.
问题 4:找出掷骰子时得到偶数的概率。
回答:
We know that possible outcomes when a die is tossed are,
{1, 2, 3, 4, 5 and 6}
We want to calculate the probability for getting an even number. Even number are {2,4,6}
Number of favorable outcomes = 3
Total Number of outcomes = 6.
So, the probability of getting an even number, P(Even) =
P(Even) =
⇒ P(Even) =
问题 5:假设我们有一个装有 5 个红球和 3 个黑球的瓮。我们想从这个袋子里抽球。找出捡到红球的概率。
回答:
Let’s define the experiment as “Drawing a ball from the bag”. Now it is required to calculate the probability for getting a red ball.
Number of favorable outcomes = 5
Total Number of outcomes = 8.
So, P(red) =
问题 6:对于上述实验,验证得到红球的概率和得到黑球的概率遵循上述概率公理。
回答:
Let’s define two events,
R = Red ball is picked
B = Black Ball is picked
Calculate the probability for getting a red ball in the previous example,
P(R) =
Similarly,
P(B) =
Now notice that both P(R) and P(B) lie between 0 and 1. So they satisfy axiom 1. Let’s verify it for second axiom.
P(R) + P(B)
⇒P(R) + P(B) = +
⇒ P(R) + P(B) = 1
Thus second axiom is also satisfied.
We know that both of these events are mutually exclusive.
So, P(R ∪ B) = P(Getting either a Red Ball or Black Ball)
⇒ P(R ∪ B) = P(R) + P(B)
⇒ P(R ∪ B) = +
⇒ P(R ∪ B) = 1
Thus, all three of these axioms are satisfied. Thus, above experiment follows the axioms of the probability.