عنوان تحسين محركات البحث (52): حاسبة الاحتمالات - حدثان، باي & سلسلة الوصف الميتا (154): حساب التقاطع، الاتحاد، XOR، الاحتمال الشرطي ونتائج بايز لحدثين. يشمل تجارب متسلسلة ووضع منحنى طبيعي.
تعمل حاسبة الاحتمالات مع حدثين A و B: أدخل P(A) و P(B)، وحدد ما إذا كانا مستقلين أو يعطي P(A ∩ B)، واقرأ الاحتمالات المتمملة، والتقاطع، والاتحاد، والحصرية-أو والاحتمالات الشرطية. تشمل الأنماط المنفصلة نظرية بايز، وسلسلة من التجارب المتكررة، والمناطق تحت منحنى طبيعي.
الاحتمال هنا هو رقم بين 0 و 1 (أو 0٪ و 100٪). تظهر الحاسبة كلا الشكلين، لذا فإن نتيجة 0.2 و 20٪ لا تختلف أبدا.
حساب احتمال حدوث حدثين
أدخل P ل A و P ل B كأعداد عشرية أو نسب مئوية. للأحداث المستقلة، توفر الحاسبة التقاطع كحاصل ضرب. بالنسبة للأحداث التابعة، أدخل التقاطع أو شرطيا صراحة حتى تبقى الصيغ اللاحقة متسقة مع قصة البيانات.
الاحتمالات خارج 0 إلى 1، أو تقاطع أكبر من أي من الحدثين، تتوقف عند رسالة بدلا من اختراع رقم.
المدخلات غير الصالحة (الاحتمالات خارج 0-1، أو تقاطع أكبر من أي من الحدثين) تتوقف عند رسالة بدلا من اختراع رقم.
ابحث عن المتممة، والتقاطع، والاتحاد
متمم A يساوي واحد ناقص P ل A. التقاطع هو احتمال حدوث كلاهما؛ تحت الاستقلالية يساوي حاصل ضرب الاحتمالات المنفصلة. الاتحاد هو P ل A زائد P ل B ناقص التقاطع، مما يمنع عد التداخل مرتين.
هذه الكميات الثلاثة هي اللبنات الأساسية لمعظم مسائل الواجبات ذات الحدثين. P(A') = 1 − P(A) P(A ∩ B) = P(A) × P(B) (حالة مستقلة) P(A ∪ B) = P(A) + P(B) − P(A ∩ B) ```
The complement is "not A." The intersection is "both." The union is "either A or B or both." Subtracting the intersection in the union formula stops double-counting the overlap.
Calculate exclusive or and mutually exclusive events
Exclusive or is the probability that exactly one of the two events occurs: P of A plus P of B minus twice the intersection. Mutually exclusive events cannot both occur, so their intersection is zero and the union simplifies to a plain sum.
Mutual exclusivity is a strong claim about the data; do not set the intersection to zero unless that claim is true.
P(A XOR B) = P(A) + P(B) − 2P(A ∩ B)
Mutually exclusive events cannot both occur, so P(A ∩ B) = 0 and the union simplifies to P(A) + P(B). Mutually exclusive is stronger than "dependent"; check that claim against the story of the data before setting intersection to zero.
Calculate conditional probability
P of A given B equals the intersection divided by P of B. Read it as the updated probability of A after learning that B occurred. If A and B are independent, the conditional equals the original P of A.
Division by zero is blocked when P of B is zero, because conditioning on an impossible event is undefined in this framework. P(A | B) = P(A ∩ B) / P(B) ```
اقرأ P(A | B) كاحتمال ل A إذا كان B قد حدث. إذا كان A و B مستقلين، فإن P(A | B) = P(A). عندما يكونان تابعين، يغير التكييف الاحتمال، وهو الهدف الكامل للصيغة.
يتم حظر القسمة على الصفر عندما يكون P(B) = 0: الشرط على حدث مستحيل غير معرف.
تطبيق نظرية بايز
مبرهنة بايز تحدث احتمالية سابقة بعد أدلة جديدة باستخدام احتمالية تلك الدليل. الخلفية P ل A معطاة B تساوي احتمالية P ل B معطى A مضروبة في P السابق ل A، جميعها مقسومة على P على B.
تظهر أرقام الاختبارات الطبية أدناه لماذا يمكن للاختبار الدقيق للغاية أن يترك خلفية متواضعة عندما يكون معدل المرض السابق منخفضا.
P(A | B) = [P(B | A) × P(A)] / P(B) ```
Rewrite P of B with the law of total probability when only conditionals are known: P of plus equals P of plus given disease times P of disease plus P of plus given no disease times P of no disease. Skipping that expansion and dividing by the prior alone is a common Bayes arithmetic error.
Prior P(A), likelihood P(B | A), and the marginal P(B) combine into the posterior P(A | B).
Medical test sketch. Disease prior P(D) = 0.01. Test sensitivity P(+|D) = 0.99. False positive rate P(+|no D) = 0.05. P(+) = 0.99×0.01 + 0.05×0.99 = 0.0099 + 0.0495 = 0.0594. P(D|+) = (0.99×0.01) / 0.0594 ≈ 0.167.
A positive test raises the chance of disease from 1% to about 16.7%, not to 99%. That gap is why Bayes belongs on a probability page rather than as a footnote.
Calculate probability across a series of events
For n independent trials with success probability p, the chance all n succeed is p to the n, and the chance of at least one success is one minus one minus p to the n. The at-least-one form usually wins by hand because the complement of zero successes is a single power rather than a long binomial sum across k.
P(كل n ناجح) = pⁿ
P(على الأقل نجاح واحد) = 1 − (1 − p)ⁿ
At least one is usually easier through the complement: compute the chance of zero successes, then subtract from 1. For p = 0.1 and n = 10, P(at least one) = 1 − 0.9¹⁰ ≈ 1 − 0.3487 = 0.6513.
Calculate a probability of 0.5 and 0.4 for two events
Assume independence with P of A equal to 0.5 and P of B equal to 0.4. Intersection is 0.20, union is 0.70, exclusive or is 0.50, and P of A given B returns 0.50, matching P of A as independence requires. Every figure in the table can be reproduced from the formulas in the sections above without the interactive tool.
| Quantity | Working | Result | |
|---|---|---|---|
| Intersection | 0.5 × 0.4 | 0.20 | |
| Union | 0.5 + 0.4 − 0.2 | 0.70 | |
| XOR | 0.5 + 0.4 − 2×0.2 | 0.50 | |
| Complement of A | 1 − 0.5 | 0.50 | |
| P(A\ | B) | 0.2 / 0.4 | 0.50 |
Independence makes P(A|B) equal P(A), which matches 0.50 here.
Read the Venn diagram
Two circles show A and B; the overlap is the intersection. Shaded regions track the quantity you selected (union shade covers both lobes; XOR shade covers the lobes without the overlap). When probabilities are supplied, circle areas are drawn proportionally where the geometry allows, so a tiny intersection looks tiny.
Use the diagram to catch impossible inputs visually. If the overlap looks larger than either circle's story allows, the numeric intersection is inconsistent. The diagram does not replace algebra for dependent events with messy conditionals; it supports the algebra.
Venn diagrams do not replace the formulas. They make double-counting visible, which is why the union subtracts the overlap once.
Calculate probability from a normal distribution
Enter mean, standard deviation and one or two bounds; the calculator standardises to z and returns the area under the normal curve. For mean 100 and standard deviation 15, the probability of a value below 115 uses z equals 1 and area about 0.8413.
Use this mode for continuous below, above or between questions; use the two-event mode for logical combinations.
Example: μ = 100, σ = 15, P(X < 115) → z = (115−100)/15 = 1 → area ≈ 0.8413. Use this mode for continuous "below / above / between" questions; use the two-event mode for logical combinations of discrete events.
Independence is an assumption
Independence must come from the design or from evidence, not from convenience. Drawing cards without replacement makes successive hearts dependent; coin flips on a fair coin are the usual independence example. Multiplying probabilities that are actually dependent understates or overstates joint risk depending on the direction of dependence.
When only conditional information is available, rebuild the intersection as P of B times P of A given B before computing a union. The calculator accepts that path so the same identity holds for both independent and dependent stories.
Frequently asked questions
What is the difference between intersection and union?
Intersection is both events; union is either event (including both). Union adds the probabilities and subtracts the intersection so the overlap is not counted twice.
When can I multiply P(A) and P(B)?
When A and B are independent. If they are dependent, you need P(A ∩ B) or a conditional probability from data or a model.
What does mutually exclusive mean?
The events cannot occur together, so P(A ∩ B) = 0. A card cannot be both a heart and a spade. Mutually exclusive events are dependent except in trivial edge cases.
How does Bayes' theorem help?
It updates a prior probability after seeing new evidence, using the likelihood of that evidence. Medical testing and spam filtering are standard applications.
How do I find the probability of at least one success in n trials?
Compute 1 − (1 − p)ⁿ for independent trials with success probability p. Directly summing the binomial terms is equivalent but slower by hand.
Can probabilities exceed 1?
No. If a formula produces a value outside 0-1, an input assumption is wrong (often an intersection larger than one of the events).
Is odds the same as probability?
No. Odds compare successes to failures (for example 1:4); probability is successes over total possibilities (0.2). The Odds Calculator converts between them.
Does the normal mode assume a bell curve?
Yes. Area translation uses the normal model. For clearly skewed data, treat the result as approximate or use a different distribution.
Summary
The Probability Calculator returns complements, intersections, unions, XOR results and conditionals for two events, with Bayes, series-trials and normal-area modes for related questions. Independent events with P(A) = 0.5 and P(B) = 0.4 give intersection 0.2, union 0.7 and XOR 0.5.
Multiply only under independence; subtract the overlap in every union; and use Bayes when a prior must be updated after new evidence. Pair with the Odds Calculator when the inputs arrive as ratios rather than probabilities.