什么是生日问题?
概率也称为可能性。这意味着机会的数学,即可能发生的事件的交易。该值从零到一。在数学中,概率或机会数学已被证明可以猜测事情发生的可能性。基本上,概率是预期某事发生的范围。
可能性
为了更深入地认识概率,以掷骰子为例,可能的结果是1、2、3、4、5和6。发生任何可能的事情的可能性是1/6。由于发生任何事件的概率是相同的,因此得到任何可能数字的概率相似,在这种情况下,它是 1/6 或 50/3。
概率公式
Probability of an event = {Number of favourable affairs} ⁄ {total number of affairs}
活动类型
基于不同的基础,有不同类型的结果。一种类型的事件是同等可能事件和互补事件。另一种类型的事件是不可能的和确定的事件。然后是简单和复合事件。有独立事件和依赖事件、互斥事件、穷举事件等,我们来详细了解一下这些事件。
- 同等可能的事件:掷骰子后,得到任何同等可能结果的概率为 1/6。由于结果的发生是同样可能的结果,因此在这种情况下,任何数字都有相同或相似的可能性获胜,它要么是公平掷骰子的 1/6。
- 补充事件:有机会或可能只有两个结果,即一个事件是否会发生。就像一个人会读书或不读书,打扫厨房或不打扫厨房等都是互补事件的例子。
- 不可能事件和肯定事件:如果发生同样可能事件的可能性为 0,则此类事件称为不可能事件;如果可能事件发生的概率为 1,则此类事件称为肯定事件。换句话说,样本空间 S 是肯定事件,空集 φ 是不可能事件。
- 简单事件:任何带有样本空间一个点的事件在概率上称为简单事件。例如,如果 S = {34, 28, 89, 47, 88} 和 E = {69} 这意味着 E 是一个简单事件。
- 复合事件:与简单事件相反,如果任何事件承载多个样本空间的单个空间,则此类事件称为复合事件。再次检查相同的例子,如果 S = {34, 28, 89, 47, 88}, E 1 = {34, 47}, E 2 = {28, 34, 88} 那么,E 1和 E 2显示两个化合物事件。
- 独立事件和从属事件:如果任何事件的发生完全不受任何其他结果的发生的影响,则此类事件在概率上称为独立事件,而被其他事件自命不凡的事件称为从属事件。
- 互斥事件:如果一个事件的发生阻止了另一个事件的发生,则此类事件是互斥事件,即两个事件没有任何共同的编号。例如,如果 S = {11, 12, 13, 14, 15, 16, 17} 和 E 1 ,则 E 2是两个事件,使得 E 1由小于 14 的数字组成,E 2由大于 17 的数字组成。所以,E 1 = {11, 12, 13} 和 E 2 = {14, 15, 16, 17}。那么,E 1和E 2是互斥的。
- 穷举事件:一组事件称为穷举事件,即其中一个必须发生。
- 与“OR”关联的事件:如果两个事件 A 1和 A 2与 OR 关联,则表示 A 1或 A 2或两者。合并符号 (∪) 用于表示概率中的 OR。因此,事件A 1 UA 2表示A 1 OR A 2 。如果一个具有相互穷举的事件 A 1 , A 2 , A 3 ... an 与样本空间 S 相关联,则 A1 U A2 U A3 U ... An = S
- 与“AND”相关的事件:如果两个事件 E 1和 E 2与 AND 相关,则说明组件的连接与这两个事件相似。交点符号 (∩) 用于表示概率中的 AND。因此,事件 E 1 ∩ E 2表示 E 1和 E 2 。
什么是生日问题?
解决方案:
Let’s understand this example to recognize birthday problem,
There are total 30 people in the room. What is the possibility that at least two people allowance the same birthday or what is the possibility that someone in the room share His / Her birthday with at least someone else,
p(s) + p(d) = 1 or 100%
p(s) = 100% – p(d)
If there are two person,
Let’s consider, person one, their birthday could be any of 365 days out of 365 days. Now second person could be born on any day that first person was not born on,
So, 365⁄365 (first person birthday) 364⁄365 (second person birthday)
= 365 × 364 ⁄ 3652 = (365! ⁄ (365 – 2)!) ⁄ 3652 = (365! ⁄ 363!) ⁄ 365²
If there are three person,
So, 365⁄365 (first person birthday) 364⁄365 (second person birthday) 363⁄365 (third person)
= 365 × 364 × 363 ⁄ 3653 = (365! ⁄ (365 – 3)!) ⁄ 3653 = (365! ⁄ 362!) ⁄ 3653
Similarly, if there are 30 people in the room, the possibility that no one shares his/her birthday,
= 365 × 364 × 363 × …… × 336 ⁄ 36530 = (365! ⁄ (365 – 30)!) ⁄ 36530
= (365! ⁄ 335!) ⁄ 36530 = .2936 or 29.36%
p(d) = .2936 or 29.36%
p(s) = 100% – p(d)
= 100% – 29.36% or 1 – .2936
= .7063 ≈ 70.6%
类似问题
问题 1:投掷 5 次硬币。恰好得到 4 个正面的概率是多少?
回答:
Formula: b(x; n, P) – nCx × Px × (1 – P)n – x
The number of trials (n) is 5
There are two possibility either head or tail, A coin (“tossing a heads”) is 0.5 (So, 1 – p = 0.5)
x = 4
P(x = 4) = 5C4 × 0.54 × 0.51 = 5 × 0.0625 × 0.5 = 0.15625
问题2:买车的人80%是女性。如果随机选择 9 位车主,求正好 6 位是女性的概率。
解决方案:
Here, n = 9, x = 6.
Formula: b(x; n, P) – nCx × Px × (1 – P)n – x
Now apply nCx (First, part of the formula)
nCx = n! / (n – X)! X!
Substitute the variables,
9! / ((9 – 6)! × 6!)
Which equals 84. Now keep this integer to one side. Find p and q. p is the chance of favourable outcome and q is the probability of unfavourable outcome. Given p = 80%, or .8. So the probability of unfavourable outcome is 1 – .8 = .2 (20%).
Now, work on second part of the formula i.e., px
= .86
= .262144
Now keep this integer to one side
Work on third part of the formula.
= q(n – x)
= .2(9 – 6)
= .23
= .008
Multiply the answer from all the three parts i.e., 1, 2, 3.
84 × .262144 × .008 = 0.176.
问题 3:一个公平的骰子被掷了 7 次,找到正好 5 次得到“6 个点”的概率。
解决方案:
The die is thrown 7 times, hence the number of case is n = 7.
In a single case, the result of a “6” has chances p = 1/6 and an result of “no 6” has a chances 1 – p = 1 – 1/6 = 5/6. The chances of having 5 “6” in 7 trials is given by the formula for binomial probabilities above with n = 7, k = 5 and p = 1/6
P(5 heads in 7 trials) = (7C5)(1/6)5(1 – 5/6)7 – 5 = (7C5)(1/6)5(5/6)2
Use formula to calculate,
(7C5) = 7!/5!(7 – 5)! = 21
P(5″6″ in 7 trials) = 21(1/6)5(5/6)2 = 0.00187
问题 4:当你掷硬币 10 次时,得到 6 个正面的概率是多少?
解决方案:
In a coin-toss trial, there are two results: heads and tails. Suppose the coin is fair , the chances of getting a head is 1/2 or 0.5
The number of replicated cases: n = 10
The number of success cases: x = 6
The possibility of success on individual case: p = 0.5
Use the formula for binomial probability,
10C6 (0.5)6 (1 – 0.5)10 – 6
≈ 0.205
问题 5:一个公平的硬币被抛 5 次。恰好获得 3 个正面的概率是多少?
解决方案:
The coin is thrown 5 times, hence the number of chances is n = 5.
The coin being a fair one, the result of a head in one toss has a chance p = 0.5 and an result of a tail in one toss has a chance 1 – p = 0.5.
The chances of getting 3 heads in 5 cases is given by the formula for binomial probabilities above with n = 5, k = 3 and p = 0.5
P (3 heads in 5 trials) = 5C3(0.5)3(1 – 0.5)5 – 3 = (5C3)(0.5)3(0.5)2
Use formula to calculate,
(5C3) = 5!/3!(5 – 3)! = 1 × 2 × 3 × 4 × 5/(1 × 2 × 3)(1 × 2) = 10
P (3 heads in 5 trials) = 10(0.5)3(0.5)2 = 0.3125