Conditional probability is a basic concept in probability theory, which involves the probability of another event occurring given that one event has occurred.
Conditional probability is a basic concept in probability theory, which involves the probability of another event occurring given that one event has occurred.
Conditional probability involves two or more events that are related to each other and asks the question: "If we know that event A happened, what are the chances of event B happening?" Conditional probability is calculated by multiplying the probability of the previous event with the updated probability of the subsequent event (i.e., the conditional event).
Conditional probability measures the likelihood of a particular outcome (A) based on the occurrence of some prior event (B).
Two events are called independent events if their occurrence does not affect the probability of other events. However, two events are related if the occurrence (or non-occurrence) of one event affects the likelihood of the other event occurring.
An example of a related event is when a company's stock price rises after it reports earnings that beat expectations.
If events are independent, then the probability of event B occurring has nothing to do with whether event A occurs or not. For example, the rise in Apple stock has no correlation with the fall in wheat prices.
Conditional probability is usually expressed as "A occurs under the condition of B", denoted as P(A|B).
In general, while marginal probability and joint action probability measure the likelihood of individual and paired events, conditional probability measures the sequence and dependence between events.
Note: Conditional probability is widely used in insurance, economics, politics, and different fields of mathematics.
Or:
<!-- @@@ -->The letters represent the following meanings:
P = probability
A = event A
B = event B
Important: Unconditional probability, also called marginal probability, measures the chance of something happening without taking into account any knowledge of prior or external events. Since this probability also ignores new information, it remains unchanged.
Taking colored balls as an example to illustrate conditional probability, the steps are as follows:
Step 1: Understand the scenario
At the beginning, you have a bag with six red balls, three blue balls, and one green ball. Therefore, there are a total of 10 balls in the bag.
Step 2: Identify the event
Define two events:
Step 3: Calculate the probability of event B: P(B)
Event B is to draw a ball that is not a green ball. There are 10 balls in total, 9 of which are not green: 6 red and 3 blue.
<!-- @@@ -->Step 4: Identify the intersection of events A and B: P(A∩B)
The intersection of events A and B involves drawing a red ball that is not a green ball. Since all red balls are not green balls, the intersection is simple: the event of drawing a red ball.
Step 5: Calculate the probability of the intersection of events A and B: P(A∩B)
<!-- @@@ -->Step 6: Calculate conditional probability: P(A|B)
Use the conditional probability formula P(A|B), that is, the probability of drawing a red ball if the drawn ball is not a green ball, to calculate.
<!-- @@@ -->Result: Under the condition that the drawn ball is not a green ball, the conditional probability of drawing a red ball is 2/3.
Another example concerns using fair six-sided dice. The steps are as follows:
Step 1: Understand the scenario
You have a fair six-sided die. You want to determine the probability of rolling an even number, given that the number rolled is greater than 4.
Step 2: Identify the event
For a six-sided die, the possible outcomes (sample space) are the numbers 1 to 6. From this two events can be defined:
Step 3: Calculate the probability of each event
The probability of each event can be calculated by dividing the number of favorable outcomes (the outcome you are looking for) by the total number of outcomes in the sample space.
P(A) is the probability of throwing an even number. Of the six possible outcomes, there are three even numbers {2, 4, 6}. Therefore, P(A) = 3/6 = 1/2.
P(B) is the probability of rolling a number greater than 4. Of the six possible outcomes, only two numbers are greater than 4{5, 6}. Therefore, P(B) = 2/6 = 1/3.
Step 4: Identify the intersection of events A and B
The intersection of events A and B includes outcomes that satisfy both conditions. In this case, there is only one result that is both an even number and greater than 4, which is rolling a 6.
Step 5: Calculate the probability of the intersection of events A and B
Even though the previous content is simple, we still need to elaborate: P(A∩B) is the probability of rolling a 6, because 6 is the only result that is both an even number and greater than 4. Out of six possibilities, there is only one outcome. So P(A∩B) = 1/6.
Step 6: Calculate conditional probability: P(B|A)
The formula for conditional probability is as follows:
<!-- @@@ -->Substituting the values into the formula, the result is as follows:
<!-- @@@ -->Result: This means that, given an even number, the probability that the number is greater than 4 is 1/3.
Another scenario involves a student applying for university admission while hoping to receive subsidies for tuition fees and living expenses. The steps for determining the conditional probability of receiving subsidies and scholarships are as follows:
Step 1: Understand the scenario
Students want to know about the possibility of being admitted to college. If admitted, students expect to receive an academic scholarship. And, if possible, I hope to receive subsidies for books, meals, and housing along with the scholarship.
Step 2: Identify the event
There are three events:
Step 3: Calculate the probability of admission (event A)
The university admits 100 students for every 1,000 applications. Therefore, the probability of a student being admitted is P(A) = 100/1000 = 0.10 or 10%.
Step 4: Determine the probability of receiving a scholarship after being admitted: P(B|A)
It is known that among admitted students, 10 out of every 500 receive scholarships. Therefore, the probability of receiving a scholarship after admission is as follows:
<!-- @@@ -->Step 5: Calculate the probability of being admitted and receiving a scholarship
To calculate the probability of being admitted and receiving a scholarship, the likelihood of being admitted is multiplied by the conditional probability of receiving a scholarship if admitted.
<!-- @@@ -->Step 6: Determine the probability of receiving a subsidy given the scholarship: P(C|B)
It is known that 50% of students who receive scholarships will receive subsidies for books, meals and housing. Therefore, P(C|B) = 0.5 = 50%.
Step 7: Calculate the probability of admission, scholarship and subsidy
To calculate the probability of a student being admitted, receiving a scholarship, and further receiving a subsidy, the probabilities of these events need to be multiplied.
<!-- @@@ -->This step-by-step analysis shows how to calculate the probability of each scenario using basic probability formulas and conditional probabilities.
Let us now distinguish between the calculation of conditional probabilities and other types of probabilities.
This time, take a standard deck of playing cards. Define two events:
Standard playing cards have 52 cards divided into four suits (hearts, diamonds, clubs and spades). Hearts and diamonds are red, clubs and spades are black. There are 13 cards in each suit: from Ace to 10, to the face cards J, Q, and K.
This deck contains 26 red cards, including 13 hearts and 13 diamonds. Therefore, the probability of drawing a red card is P(B) = 26/52 = 1/2.
Among the red cards are a Four of Hearts and a Four of Diamonds. Therefore, if you need to draw a red card, you must consider a subset containing only these 26 red cards.
In the case where a red card has been drawn, the probability that the card is a four is calculated as follows:
<!-- @@@ -->Marginal probability P(A) refers to the probability of event A occurring alone. It does not take into account the occurrence of any other events.
Since event A is the drawing of a four, P(A) is calculated by dividing the number of fours by the total number of cards.
<!-- @@@ -->Joint action probability is the likelihood that two or more events will occur simultaneously. This is usually expressed as P(A∩B), which is the probability that events A and B occur simultaneously.
Assuming that the previous events remain unchanged, that is, event A is a four drawn, and event B is a red card drawn, we can find the joint probability of drawing a four and a red card at the same time.
There are two cards that meet the two conditions, the four of hearts and the four of diamonds. Therefore, the joint probability of drawing a four and a red card is calculated as follows:
<!-- @@@ -->Bayes' theorem is used to calculate conditional probabilities when dealing with uncertain events. This allows, when investing, to update probability estimates of market outcomes as new relevant data is obtained.
For example, let's say you want to know the probability that the S&P 500 will return a positive percentage this year, given initial gross domestic product (GDP) data. In this case, you would first use Bayes' theorem, taking into account the historical returns of the index, to get an initial estimate of economic expansion.
You would then revise this preliminary probability based on the latest GDP forecast. This will provide a more refined probability assessment, allowing all evidence to be integrated as the year progresses.
Although mathematically complex, Bayes' theorem is quite logical. If an investor discovers that new economic information correlates with potential market returns, it makes sense to integrate the data to obtain a more precise calculation.
This statistical technique, formulated by the 18th-century English clergyman Thomas Bayes, remains central to financial modeling and other fields that require predictions under uncertainty.
Note: Bayes' theorem is very applicable to machine learning and is widely used in this field.
The Conditional Probability Calculator is an online tool capable of calculating conditional probabilities. It provides the probabilities of the first and second events, saving the user the trouble of doing the math manually.
Probability focuses on the likelihood of an event occurring. Conditional probability focuses on the relationship between the occurrence of two events. More specifically, conditional probability is the probability of the second event occurring based on the occurrence of the first event.
A priori probability is the probability of an event occurring before any data is collected. It is determined by prior beliefs. In Bayesian statistical inference, prior probabilities are a component because you can revise these beliefs and mathematically get posterior probabilities.
Compound probability seeks to determine the likelihood of two independent events occurring. A compound probability multiplies the probability of the first event by the probability of the second event. The most common example is flipping a coin twice and finding out whether the second result is the same as the first.
Conditional probability examines the likelihood of an event occurring, based on the probability of previous events occurring. The second event depends on the occurrence of the first event.
For example, we might want to know the probability that a certain stock will rise if its industry index rises. The conditional probability calculation takes into account both the likelihood of the first event (a stock price increase) and the overlap between the two events.
TheQuantHackers is a cutting-edge community composed of a group of people from the world's top universities and quantitative finance practitioners, dedicated to exploring the infinite possibilities in the fields of artificial intelligence (AI) and quantification (Quant). Our team members come from world-renowned universities such as the University of Cambridge, Oxford University, Harvard University, ETH Zurich, Peking University, and the University of Science and Technology of China. Our external consultants come from first-class companies such as Microsoft, HSBC, Citadel, Man Group, Citi, Jump Trading, and top domestic private equity companies.
或者:
条件概率是概率论中的一个基本概念,它涉及到在已知一个事件已经发生的情况下,另一个事件发生的概率。
条件概率包含两个或多个彼此相关的事件,并提出了这样一个问题:“如果我们知道事件A发生了,事件B发生的机会有多大?”条件概率的计算方法是将先前事件的概率与后续事件(即条件事件)更新后的概率相乘。
条件概率衡量某一特定结果(A)基于某个先前事件(B)的发生的可能性。
如果事件的发生不影响其他事件的发生概率,则这两个事件被称为独立事件。然而,如果一个事件的发生(或不发生)会影响另一个事件发生的可能性,则这两个事件是相关的。
一个相关事件的例子是,一家公司在报告超出预期的盈利后,其股票价格随之上涨。
如果事件是独立的,那么事件B发生的概率与事件A的发生与否无关。例如,苹果公司股票的上涨与小麦价格的下跌没有关系。
条件概率通常表示为“在B的条件下A发生”,记作P(A|B)。
总体而言,虽然边际概率和联合作用概率测量单独和成对事件的可能性,条件概率则可以测量事件之间的先后关系和依赖关系。
注意: 条件概率在保险、经济、政治以及不同数学领域中应用广泛。
步骤4:识别事件A和B的交集:P(A∩B)
事件A和B的交集涉及抽到一个红色且不是绿球的球。由于所有红球都不是绿球,交集很简单:抽取一个红球的事件。
步骤5:计算事件A和B交集的概率:P(A∩B)
或者:
结果:在抽取的球不是绿球的条件下,抽取红球的条件概率为2/3。
另一个例子是关于使用公平的六面骰子。步骤如下:
步骤1:理解场景
你有一个公平的六面骰子。你想要确定在掷出的数字大于4的条件下,掷出一个偶数的概率。
步骤2:识别事件
对于六面骰,可能的结果(样本空间)是1到6的数字。从中可以定义两个事件:
步骤3:计算每个事件的概率
每个事件的概率可以通过将有利结果的数量(你所寻找的结果)除以样本空间中的总结果数来计算。
P(A)是掷出偶数的概率。在六个可能结果中,有三个偶数{2, 4, 6}。因此,P(A) = 3/6 = 1/2。
P(B)是掷出大于4的数字的概率。在六个可能结果中,只有两个数字大于4{5, 6}。因此,P(B) = 2/6 = 1/3。
步骤4:识别事件A和B的交集
事件A和B的交集包括同时满足两个条件的结果。在这种情况下,只有一个结果既是偶数又大于4,即掷出6。
步骤5:计算事件A和B交集的概率
即使前面内容简单,我们还是要详细说明:P(A∩B)是掷出6的概率,因为6是唯一一个既是偶数又大于4的结果。在六个可能性中,只有一个结果。所以P(A∩B) = 1/6。
步骤6:计算条件概率:P(B|A)
条件概率的公式如下:
其中字母代表以下含义:
P = 概率
A = 事件A
B = 事件B
重要: 无条件概率,也称为边际概率,度量某件事情发生的机率,而不考虑任何先前或外部事件的知识。由于此概率也忽略新信息,因此保持不变。
以彩球为例进行条件概率的说明,步骤如下:
步骤1:理解场景
一开始,你有一个袋子,里面有六个红球、三个蓝球和一个绿球。因此,袋子里总共有10个球。
步骤2:识别事件
定义两个事件:
步骤3:计算事件B的概率:P(B)
事件B是抽取一个不是绿球的球。总共有10个球,其中9个不是绿球:6个红球和3个蓝球。
结果:这意味着,在掷出的数字是偶数的情况下,这个数字大于4的概率为1/3。
另一个场景涉及一名学生申请大学入学,同时希望得到学费和生活费的补贴。确定获得补贴和奖学金的条件概率的步骤如下:
步骤1:理解场景
学生希望了解被大学录取的可能性。如果被录取,学生希望获得学术奖学金。而且,如果可能的话,希望在获得奖学金的情况下,再获得图书、餐食和住房的补贴。
步骤2:识别事件
有三个事件:
步骤3:计算被录取的概率(事件A)
大学在每1000份申请中录取100人。因此,学生被录取的概率是P(A) = 100/1000 = 0.10或10%。
步骤4:确定被录取后获得奖学金的概率:P(B|A)
已知在被录取的学生中,每500人中有10人获得奖学金。因此,被录取后获得奖学金的概率如下:
步骤4:识别事件A和B的交集:P(A∩B)
事件A和B的交集涉及抽到一个红色且不是绿球的球。由于所有红球都不是绿球,交集很简单:抽取一个红球的事件。
步骤5:计算事件A和B交集的概率:P(A∩B)
步骤6:确定在获得奖学金的情况下获得补贴的概率:P(C|B)
已知在获得奖学金的学生中,有50%会获得图书、餐食和住房的补贴。因此,P(C|B) = 0.5 = 50%。
步骤7:计算被录取、获得奖学金并获得补贴的概率
为了计算学生被录取、获得奖学金,并进一步获得补贴的概率,需要将这些事件的概率相乘。
步骤6:计算条件概率:P(A|B)
使用条件概率公式P(A|B),即在抽取的球不是绿球的情况下抽取红球的概率,进行计算。
边际概率P(A)是指事件A单独发生的概率。它不考虑任何其他事件的发生。
由于事件A是抽到一张四,则P(A)通过将四的数量除以总牌数来计算。
结果:在抽取的球不是绿球的条件下,抽取红球的条件概率为2/3。
另一个例子是关于使用公平的六面骰子。步骤如下:
步骤1:理解场景
你有一个公平的六面骰子。你想要确定在掷出的数字大于4的条件下,掷出一个偶数的概率。
步骤2:识别事件
对于六面骰,可能的结果(样本空间)是1到6的数字。从中可以定义两个事件:
步骤3:计算每个事件的概率
每个事件的概率可以通过将有利结果的数量(你所寻找的结果)除以样本空间中的总结果数来计算。
P(A)是掷出偶数的概率。在六个可能结果中,有三个偶数{2, 4, 6}。因此,P(A) = 3/6 = 1/2。
P(B)是掷出大于4的数字的概率。在六个可能结果中,只有两个数字大于4{5, 6}。因此,P(B) = 2/6 = 1/3。
步骤4:识别事件A和B的交集
事件A和B的交集包括同时满足两个条件的结果。在这种情况下,只有一个结果既是偶数又大于4,即掷出6。
步骤5:计算事件A和B交集的概率
即使前面内容简单,我们还是要详细说明:P(A∩B)是掷出6的概率,因为6是唯一一个既是偶数又大于4的结果。在六个可能性中,只有一个结果。所以P(A∩B) = 1/6。
步骤6:计算条件概率:P(B|A)
条件概率的公式如下:
贝叶斯定理用于在处理不确定事件时计算条件概率。这在投资时,可以在获取新相关数据后更新市场结果的概率估计。
例如,假设你想知道S&P 500在今年会返回正百分比的概率,前提是初始的国内生产总值(GDP)数据。在这种情况下,你会首先使用贝叶斯定理,考虑指数的历史回报率,以获得初步的经济扩张预期。
然后你会根据最新的GDP预测来修正这个初步概率。这将提供更精细的概率评估,使得所有证据在年度进展中得以整合。
尽管在数学上略显复杂,贝叶斯定理却是相当合乎逻辑的。如果投资者发现新的经济信息与潜在市场回报相关,那么整合这些数据以获得更精确的计算是合理的。
这一统计技术由18世纪的英国牧师托马斯·贝叶斯制定,至今在金融建模以及其他需要在不确定条件下预测的领域中占据中心地位。
注意: 贝叶斯定理非常适用于机器学习,并在该领域广泛应用。
条件概率计算器是一个在线工具,能够计算条件概率。它提供第一个和第二个事件发生的概率,从而省去用户手动进行数学计算的麻烦。
概率关注一个事件发生的可能性。条件概率关注两个事件发生之间的关系,更具体来说,条件概率是基于第一个事件发生的基础上,第二个事件发生的概率。
先验概率是在收集任何数据之前某事件发生的概率。它是由先前的信念决定的。在贝叶斯统计推断中,先验概率是一个部分,因为你可以修正这些信念,并在数学上得到后验概率。
复合概率旨在确定两个独立事件发生的可能性。复合概率将第一个事件的概率与第二个事件的概率相乘。最常见的例子是掷两次硬币并找出第二次的结果是否与第一次相同。
条件概率考察一个事件发生的可能性,基于先前事件发生的概率。第二个事件依赖于第一事件的发生。
例如,我们可能想知道某只股票在其行业指数上升的情况下会上涨的概率。条件概率计算同时考虑了第一个事件的可能性(股票价格上涨)以及这两个事件之间的重叠情况。
TheQuantHackers是由一群来自世界顶尖高校和量化金融从业人员组成的前沿社区,致力于探索人工智能(AI)与量化(Quant)领域的无限可能。我们的团队成员来自剑桥大学、牛津大学、哈佛大学、苏黎世联邦理工学院、北京大学、中科大等世界知名高校,外部顾问来自Microsoft、HSBC、Citadel、Man Group、Citi、Jump Trading、国内顶尖私募等一流企业。
Upgrade to unlock all institutional-grade algorithms, derivative pricing engines, factor backtesting frameworks, and live QuantLab execution.
Explore Membership Access
Pre-order · £490Quantitative analytics platform
Waitlist closed — signal locked. Pre-order TQH TERMINAL now at £490 with launch-day delivery.