Union

\cup

The union of two sets is the set consisting of elements from any of the sets.

  • in other words, the union set is composed of elements that exist in at least one of its constituent sets.
  • ex. if A={1,3,5,7}A = \{1, 3, 5, 7\} and B={1,2,4,6,7}B = \{1, 2, 4, 6, 7\}, then AB={1,2,3,4,5,6,7}A \cup B = \{1, 2, 3, 4, 5, 6, 7\}

Example: Yelp

  • A=A = The set of Yelp users who like Biz1
  • B=B = The set of Yelp users who like Biz2

The set ABA \cup B is the set of users that liked either Biz1 or Biz2 (or both)

Probability of Union sets

The general probability addition rule for the union of two events states that

  • P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) − P(A \cap B), where ABA \cap B is the intersection of the two sets.

The addition rule can be shortened if the sets are disjoint (ie. have no members in common):

  • P(AB)=P(A)+P(B)P(A \cup B) = P (A) + P (B)

can even be extended to more sets if they are all disjoint:

  • P(ABC)=P(A)+P(B)+P(C)P( A \cup B \cup C) = P(A) + P(B) + P(C)