Skip to main content

Discrete Mathematics - Probability


Closely related to the concepts of counting is Probability. We often try to guess the results of games of chance, like card games, slot machines, and lotteries; i.e. we try to find the likelihood or probability that a particular result with be obtained.
Probability can be conceptualized as finding the chance of occurrence of an event. Mathematically, it is the study of random processes and their outcomes. The laws of probability have a wide applicability in a variety of fields like genetics, weather forecasting, opinion polls, stock markets etc.

Basic Concepts

Probability theory was invented in the 17th century by two French mathematicians, Blaise Pascal and Pierre de Fermat, who were dealing with mathematical problems regarding of chance.
Before proceeding to details of probability, let us get the concept of some definitions.
Random Experiment − An experiment in which all possible outcomes are known and the exact output cannot be predicted in advance is called a random experiment. Tossing a fair coin is an example of random experiment.
Sample Space − When we perform an experiment, then the set S of all possible outcomes is called the sample space. If we toss a coin, the sample space S={H,T}
Event − Any subset of a sample space is called an event. After tossing a coin, getting Head on the top is an event.
The word "probability" means the chance of occurrence of a particular event. The best we can say is how likely they are to happen, using the idea of probability.
Probabilityofoccurenceofanevent=TotalnumberoffavourableoutcomeTotalnumberofOutcomes
As the occurrence of any event varies between 0% and 100%, the probability varies between 0 and 1.

Steps to find the probability

Step 1 − Calculate all possible outcomes of the experiment.
Step 2 − Calculate the number of favorable outcomes of the experiment.
Step 3 − Apply the corresponding probability formula.

Tossing a Coin

If a coin is tossed, there are two possible outcomes − Heads (H) or Tails (T)
So, Total number of outcomes = 2
Hence, the probability of getting a Head (H) on top is 1/2 and the probability of getting a Tails (T) on top is 1/2

Throwing a Dice

When a dice is thrown, six possible outcomes can be on the top − 1,2,3,4,5,6.
The probability of any one of the numbers is 1/6
The probability of getting even numbers is 3/6 = 1/2
The probability of getting odd numbers is 3/6 = 1/2

Taking Cards From a Deck

From a deck of 52 cards, if one card is picked find the probability of an ace being drawn and also find the probability of a diamond being drawn.
Total number of possible outcomes − 52
Outcomes of being an ace − 4
Probability of being an ace = 4/52 = 1/13
Probability of being a diamond = 13/52 = 1/4

Probability Axioms

  • The probability of an event always varies from 0 to 1. [0P(x)1]
  • For an impossible event the probability is 0 and for a certain event the probability is 1.
  • If the occurrence of one event is not influenced by another event, they are called mutually exclusive or disjoint.
    If A1,A2....An are mutually exclusive/disjoint events, thenP(AiAj)= for ij and P(A1A2....An)=P(A1)+P(A2)+.....P(An)

Properties of Probability

  • If there are two events x and x¯which are complementary, then the probability of the complementary event is −
    p(x¯)=1p(x)
  • For two non-disjoint events A and B, the probability of the union of two events −
    P(AB)=P(A)+P(B)
  • If an event A is a subset of another event B (i.e. AB), then the probability of A is less than or equal to the probability of B. Hence, AB implies P(A)p(B)

Conditional Probability

The conditional probability of an event B is the probability that the event will occur given an event A has already occurred. This is written as P(B|A).
Mathematically − P(B|A)=P(AB)/P(A)
If event A and B are mutually exclusive, then the conditional probability of event B after the event A will be the probability of event B that is P(B).
Problem 1
In a country 50% of all teenagers own a cycle and 30% of all teenagers own a bike and cycle. What is the probability that a teenager owns bike given that the teenager owns a cycle?
Solution
Let us assume A is the event of teenagers owning only a cycle and B is the event of teenagers owning only a bike.
So, P(A)=50/100=0.5 and P(AB)=30/100=0.3 from the given problem.
P(B|A)=P(AB)/P(A)=0.3/0.5=0.6
Hence, the probability that a teenager owns bike given that the teenager owns a cycle is 60%.
Problem 2
In a class, 50% of all students play cricket and 25% of all students play cricket and volleyball. What is the probability that a student plays volleyball given that the student plays cricket?
Solution
Let us assume A is the event of students playing only cricket and B is the event of students playing only volleyball.
So, P(A)=50/100=0.5 and P(AB)=25/100=0.25 from the given problem.
PB|A=PAB/PA=0.25/0.5=0.5
Hence, the probability that a student plays volleyball given that the student plays cricket is 50%.
Problem 3
Six good laptops and three defective laptops are mixed up. To find the defective laptops all of them are tested one-by-one at random. What is the probability to find both of the defective laptops in the first two pick?
Solution
Let A be the event that we find a defective laptop in the first test and B be the event that we find a defective laptop in the second test.
Hence, P(AB)=P(A)P(B|A)=3/9×2/8=1/12

Bayes' Theorem

Theorem − If A and B are two mutually exclusive events, where P(A) is the probability of A and P(B) is the probability of B, P(A|B) is the probability of A given that B is true. P(B|A) is the probability of B given that A is true, then Bayes’ Theorem states −
P(A|B)=P(B|A)P(A)i=1nP(B|Ai)P(Ai)

Application of Bayes' Theorem

  • In situations where all the events of sample space are mutually exclusive events.
  • In situations where either P(AiB) for each Ai or P(Ai) and P(B|Ai) for each Ai is known.
Problem
Consider three pen-stands. The first pen-stand contains 2 red pens and 3 blue pens; the second one has 3 red pens and 2 blue pens; and the third one has 4 red pens and 1 blue pen. There is equal probability of each pen-stand to be selected. If one pen is drawn at random, what is the probability that it is a red pen?
Solution
Let Ai be the event that ith pen-stand is selected.
Here, i = 1,2,3.
Since probability for choosing a pen-stand is equal, P(Ai)=1/3
Let B be the event that a red pen is drawn.
The probability that a red pen is chosen among the five pens of the first pen-stand,
P(B|A1)=2/5
The probability that a red pen is chosen among the five pens of the second pen-stand,
P(B|A2)=3/5
The probability that a red pen is chosen among the five pens of the third pen-stand,
P(B|A3)=4/5
According to Bayes' Theorem,
P(B)=P(A1).P(B|A1)+P(A2).P(B|A2)+P(A3).P(B|A3)
=1/3.2/5+1/3.3/5+1/3.4/5

Comments

Popular posts from this blog

Discrete Mathematics - Rules of Inference

To deduce new statements from the statements whose truth that we already know,  Rules of Inference  are used. What are Rules of Inference for? Mathematical logic is often used for logical proofs. Proofs are valid arguments that determine the truth values of mathematical statements. An argument is a sequence of statements. The last statement is the conclusion and all its preceding statements are called premises (or hypothesis). The symbol “ ∴ ∴ ”, (read therefore) is placed before the conclusion. A valid argument is one where the conclusion follows from the truth values of the premises. Rules of Inference provide the templates or guidelines for constructing valid arguments from the statements that we already have. Table of Rules of Inference Rule of Inference Name Rule of Inference Name P ∴ P ∨ Q P ∴ P ∨ Q Addition P ∨ Q ¬ P ∴ Q P ∨ Q ¬ P ∴ Q Disjunctive Syllogism P Q ∴ P ∧ Q P Q ∴ P ∧ Q Conjunction P → Q Q → R ∴ P → R P → Q Q → R ∴ P → R ...

Digital Circuits - Shift Registers

We know that one flip-flop can store one-bit of information. In order to store multiple bits of information, we require multiple flip-flops. The group of flip-flops, which are used to hold (store) the binary data is known as  register . If the register is capable of shifting bits either towards right hand side or towards left hand side is known as  shift register . An ‘N’ bit shift register contains ‘N’ flip-flops. Following are the four types of shift registers based on applying inputs and accessing of outputs. Serial In − Serial Out shift register Serial In − Parallel Out shift register Parallel In − Serial Out shift register Parallel In − Parallel Out shift register Serial In − Serial Out (SISO) Shift Register The shift register, which allows serial input and produces serial output is known as Serial In – Serial Out  (SISO)  shift register. The  block diagram  of 3-bit SISO shift register is shown in the following figure. This block d...

discrete mathematics: Venn Diagrams

Venn Diagrams Venn diagram, invented in 1880 by John Venn, is a schematic diagram that shows all possible logical relations between different mathematical sets. Examples Set Operations Set Operations include Set Union, Set Intersection, Set Difference, Complement of Set, and Cartesian Product. Set Union The union of sets A and B (denoted by  A ∪ B A ∪ B ) is the set of elements which are in A, in B, or in both A and B. Hence,  A ∪ B = { x | x ∈ A   O R   x ∈ B } A ∪ B = { x | x ∈ A   O R   x ∈ B } . Example  − If  A = { 10 , 11 , 12 , 13 } A = { 10 , 11 , 12 , 13 }  and B =  { 13 , 14 , 15 } { 13 , 14 , 15 } , then  A ∪ B = { 10 , 11 , 12 , 13 , 14 , 15 } A ∪ B = { 10 , 11 , 12 , 13 , 14 , 15 } . (The common element occurs only once) Set Intersection The intersection of sets A and B (denoted by  A ∩ B A ∩ B ) is the set of elements which are in both A and B. Hence,  A ∩ B = { x | x ∈ A   A N D...