Understanding Probability: Example-1
Understanding Probability: Example-1
Understanding Probability: Example-1
OVERVIEW
There are many situations when one needs to know the likelihood of something happening. Consider
Weather forecasting. One typically likes to know whether it is likely to rain today or over the next few days.
This helps in planning and scheduling outdoor events and activities. A life Insurance agent needs to know
likely or average life expectancy of various groups based on their occupation in order to arrive at an estimate
of premium rates. Quality control in manufacturing requires analysis of expected or likely defect rates in a
production process.
This means, often, one needs a measure for dealing with uncertainty – in other words, we use probability
to describe the likelihood of something happening. In the simplest sense,
ℎ =
Examples:
EXAMPLE-1
Consider tossing a coin. There are two outcomes in this case – Head (H) or Tail (T). Therefore, probability
of getting a Head or Tail is 0.5 (1/2)
Probability predicts the likelihood of outcomes. If we were to toss the coin 100 times, we can expect 50
heads to turn up. The actual number will be close to 50. It can be 48, 53 etc.
In this example, the experiment, which is repeatable, is tossing of the coin. A trial is a single performance
of the experiment – 100 tosses of the coin will be 100 trials.
Sample Space is defined as set of all possible outcomes. Therefore, the sample space is {H,T}
It is assumed we are tossing a fair coin, and the outcomes, i.e., H, T are equally likely. This will not be the
case if the coin is biased – in this case, more heads or more tails will turn up over a series of experiments.
Probability Range
Consider tossing four coins at the same time. What is the probability of getting three or more heads?
Solution
Sample Space = {HHHH, HHHT, HHTH, HHTT, HTHH, HTHT, HTTH, HTTT, THHH, THHT, THTH,
THTT, TTHH, TTHT, TTTH, TTTT }
The number of favorable outcomes corresponding to the event, i.e., getting three or more heads is 5.
If we re-define Event 2 as getting three heads or less, the two Events will not be mutually exclusive. This
is because for outcomes having exactly three heads, the Event is classified as Event-1 as well as Event-2.
Complementation of Events
In example 2, if Event 1 was getting three or more heads and Event 2 was getting two heads or less, they
are mutually exclusive as well as complementary. It means, together, they account for all outcomes in the
sample space in a series of experiments. Therefore, it follows:
2= 1′ ( 2) = 1′ =1− ( 1)
Venn Diagrams
Venn diagrams facilitate the analysis of probabilities. They pictorially depict various Events and how they
overlap within the sample space
SAMPLE SPACE
Event A Event B
( ∩ )= ( )
( ∪ ) = ( )+ ( )+ ( )
( ) = ( ) + ( ); ( ) = ( ) + ( )
Therefore, it follows:
( ∪ ) = ( )+ ( )− ( )= ( )+ ( )− ( ∩ )
In tossing a fair die, what is the probability of getting an even number or a number less than 4?
Solution
Let Event A be getting an even number. The sample space = {1, 2, 3, 4, 5, 6}, favourable outcomes for
Event A = {2, 4, 6}. If Event B is getting a number less than 4, favourable outcomes for Event B = {1, 2,
3}. The favourable outcomes for the event ∩ = {2}. It then follows
To solve this problem, consider the sample space. Sample Space = Number of ways of selecting 5 items
from 100 items. This will be 100 x 99 x 98 x 97 x 96 = 9.034,502,400 ways. A very large number indeed!
The desired event is none of the five items picked are defective. The number of selections = 90 x 89 x 88 x
87 x 86 = 5,273,912,160 ways, an equally large number!
Permutations and Combinations provide a more systematic way of counting number of points in a sample
space and evaluating probabilities for such cases with considerable simplification of the arithmetic
involved.
Permutations
Different elements
Consider the word “cat”. It has three different letters. ‘c’. ‘a’, ‘t’. There are six different ways (3 x2x1) to
arrange the letters in various orders, i.e, cat, cta, act, atc, tac, tca. This is referred to as permutations of
three different items.
Permutations of n different elements can be done in n factorial ways where n! = n x (n-1) x (n-2) x ….3 x
2x1
Groups of identical elements
Consider three red and two blue balls. There are 10 different ways to arrange the balls, i.e. BRBRR,
BRRBR, BRRRB, RBRBR, RBRRB, RRBRB, BBRRR, RBBRR, RRBBR, RRRBB. This in fact, is, 5!/
(3! X 2!)
In general, number of permutations of n elements with k groups of n1, n2 …… nk identical elements, where
n = n1,+ n2 + ……+ nk is given by n! /( n1! x n2! x …x nk!)
Combinations
Unlike permutations, combinations refers to selection of elements without reference to order.
In general, number of combinations of n elements taken k at a time with no repetitions is n! / {(n-k)! k!}
In general, number of combinations of n elements taken k at a time with repetitions is (n+k-1)! / {(n-1)! k!}
Joint Probability of Independent Events
If events A and B are such that ( ∩ ) = ( ) ( ), they are called independent events. This means
the probability of A does not depend on the occurrence or non-occurrence of B and vice-versa.
EXAMPLE-4
A box contains hundred screws out of which five are defective. What is the probability of drawing two
defective screws with replacement?
Solution
P(A) = Probability of picking defective screw during first draw (Event A) = 0.05.
P(B) = Probability of picking defective screw during second draw (Event B) = 0.05.
Conditional Probability
Often it is required to find the probability of Event B after Event A has occurred in a reduced Sample Space.
This is called conditional probability and defined as ( | ) = ( ∩ )/ ( ). Note events A and B are
no longer independent.
EXAMPLE-5
In box contains hundred screws out of which five are defective. What is the probability of drawing two
defective screws without replacement?
Solution
P(A) = Probability of picking defective screw during first draw (Event A) = 0.05.
P(B) = Probability of picking defective screw during second draw (Event B) = 4/99 = 0.04
( ∩ )= ( ) ( | )= ( ) ( | )
EXAMPLE-6
In a box containing hundred screws, 10 are too short, 5 are too slim and 2 of these 15, are both slim and
short. What are the conditional probabilities of picking a short screw that is also slim as well as picking a
slim screw that is also short.
Solution
2 screws in the lot are both slim and short. Therefore, ( ∩ ) = 2/100 = 0.02
Let event A represent drawing a short screw from the lot. P(A) = 10/100 = 0.1
Let event B represent drawing a slim screw from the lot. P(B) = 5/100 = 0.05
P(A|B) = Conditional Probability that a short screw that is also slim = ( ∩ ) / P(B) = 0.02/0.05 = 0.4
P(B|A) = Conditional Probability that a slim screw that is also short = ( ∩ ) /P(A) = 0.02/0.1 = 0.2
Outcomes to random Variables (RV)
Experimental outcomes depending on chance are quantified by converting them to random/ stochastic
variables. For example, in a production process, we can define the number of defective screws as a discrete
random variable. Discrete random variables take a range of integer values. On the other hand, if the
hardness of steel is measured from a production process, it will be a continuous random variable taking a
range of real values.
RV and probabilities
In the simplest example of a coin toss, there are only two outcomes in the sample space - Head or Tail. A
discrete random variable can be defined for this case that will take on the value of 1 for Head and 0 for
tail. The corresponding probabilities are:
P (X=0) = 0.5
P (X= 1) = 0.5
Consider a discrete random variable X = Number a fair die throws up. Plot the PDF and CDF for this
random variable.
Solution
X 1 2 3 4 5 6
PDF(X) 1/6 1/6 1/6 1/6 1/6 1/6
CDF(X) 1/6 1/3 1/2 2/3 5/6 1
4/5
3/5
2/5
1/5
0
1 2 3 4 5 6
PDF(X) CDF(X)
EXAMPLE-8
Consider a discrete random variable X = Sum of two numbers thrown up by tossing two fair dies. Plot the
PDF and CDF for this random variable.
Solution
The sample space has 6 x 6 = 36 equally likely outcomes. The values of various probabilities are:
X 2 3 4 5 6 7 8 9 10 11 12
PDF(X) 1/36 1/18 1/12 1/9 5/36 1/6 5/36 1/9 1/12 1/18 1/36
CDF(X) 1/36 1/12 1/6 5/18 5/12 7/12 13/18 5/6 11/12 35/36 1
4/5
3/5
2/5
1/5
0
1 2 3 4 5 6 7 8 9 10 11
PDF(X) CDF(X)
Geometric probability distribution function
−1
Consider a geometric PDF (1 − ) . For probabilities between 0 and 1 and integer x, the distribution
function is always positive
EXAMPLE-9
Consider the problem of tossing a fair coin where the Random Variable X = number of trials, until the first
head occurs. Show that the PDF is a geometric progression.
Solution
The probabilities are calculated using independence of events as follows (H= Head, T=Tail)
P (X = 1) = P (H) = 1/2
P (X = 2) = P (TH) = 1/2 x 1/2 = 1/4
P (X = 3) = P (TTH) = 1/2 x 1/2 x 1/2 = 1/8 etc.,
P (X = n) = (1/2)n , n = 1, 2, ….
Consider event A with a probability P(A) = p. The Random Variable X for the binomial distribution is the
number of times event A occurs in n trails. If X = x, the event occurs x times and does not occur n-x times.
Because of independence of events, the probability that the event occurs x times in n trials therefore, is
px (1-p)n-x.
However, the event can occur in several combinations during the n trails.
Consider the probability of obtaining two “four” in rolling a fair die 5 times.
Solution
5 1 2 5 3
The required probability = ( ) ( ) ( ) = (10) x 1/36 x 125/216 = 16 %
2 6 6
Continuous RV
Discrete random variables appear in experiments involving counting such as number of defects in a
production process. Continuous random variables appear in measurements such as length of screws,
hardness of steel etc. The equivalent of the PDF becomes a continuous function in the case of a continuous
RV.
EXAMPLE-11
Let X have the probability density function f(x) = 0.75 (1-x2) if −1 ≤ ≤ 1 and zero otherwise. Find
(− 1⁄2 ≤ ≤ 1⁄2)
Solution
1/2
Required Probability = 0.75 ∫−1/2(1 − 2
) = 68.75%