Once the events are listed, a number between 0 and 1 is attached to each to show how likely it is. The classical definition, a set of axioms and a few rules make this assignment consistent.

Definition of Probability

In the classical definition, if all n outcomes of a sample space are equally likely and m of them favour an event A, then P(A) = m / n. In the relative frequency view, P(A) is the value that the proportion of times A occurs settles to when the experiment is repeated a very large number of times. Both views agree that 0 ≤ P(A) ≤ 1, with P(S) = 1 and P(impossible event) = 0.

Definition: Probability of an event. A number between 0 and 1 that measures how likely the event is to occur; classically, P(A) = number of outcomes favourable to A divided by the total number of equally likely outcomes.

Basic Rules

The complement rule says P(A') = 1 - P(A). The addition rule says P(A or B) = P(A) + P(B) - P(A and B). When A and B are mutually exclusive, the last term is zero and P(A or B) = P(A) + P(B). The multiplication rule for independent events says P(A and B) = P(A) × P(B). Two events are independent when the occurrence of one does not change the probability of the other.

Applications

These rules are used in many practical situations. In quality control, the chance that at least one of several parts is defective is found with the complement rule. In networks, the probability that two independent servers both fail is the product of their individual failure probabilities. In card problems the addition rule gives, for example, the chance of drawing a heart or a king.

Table 3.2: Basic rules of probability

Rule Formula Condition
Complement P(A') = 1 - P(A) Always
Addition P(A) + P(B) - P(A and B) Always
Addition, simple P(A) + P(B) Mutually exclusive
Multiplication P(A) × P(B) Independent

Example 3.2: Heart or king

Problem: A card is drawn from a pack of 52. Find the probability that it is a heart or a king.

Solution:

  1. P(heart) = 13/52, P(king) = 4/52 and P(heart and king) = 1/52.
  2. P(heart or king) = 13/52 + 4/52 - 1/52 = 16/52.

Result: The probability is 16/52 = 4/13, or about 0.308.

Example 3.3: At least one failure

Problem: Two independent servers fail with probabilities 0.1 and 0.2. Find the probability that at least one fails.

Solution:

  1. The probability that neither fails is 0.9 × 0.8 = 0.72.
  2. By the complement rule, P(at least one fails) = 1 - 0.72.

Result: The probability that at least one server fails is 0.28.

print(13 / 52 + 4 / 52 - 1 / 52, round(16 / 52, 3))
print(round(1 - (1 - 0.1) * (1 - 0.2), 2))

Output

0.3076923076923077 0.308
0.28

Common mistakes

  • Adding probabilities of events that overlap without subtracting the common part.
  • Multiplying probabilities of events that are not independent.
  • Reporting a probability greater than 1, which signals a counting error.

Key takeaways

  • 0 ≤ P(A) ≤ 1, P(S) = 1.
  • P(A') = 1 - P(A).
  • P(A or B) = P(A) + P(B) - P(A and B).
  • P(A and B) = P(A) × P(B) for independent events.

Practice questions

  1. State the addition rule.
  2. What is P(A and B) for independent events?
  3. What is the probability of a sure event?

Answers to the practice questions

  1. P(A or B) = P(A) + P(B) - P(A and B).
  2. P(A) × P(B).

Sources

  • Official BCA syllabus Probability and Statistics, course code 26BCA403DS01, Unit III