How can I solve any question on finding the probability of an event in a job interview / written test?

read 7 mts

Whenever you face probability questions, you find that the questions are very interesting but the answers are confusing. In many cases, you find that your intuition goes wrong and several times you find no clue how to get the correct answer. In this post, I will discuss how you can systematically arrive to the solution of any question related to probability calculation. To begin with, we will discuss some of the key terms related to probability. 

Random Experiment (E): An experiment or process whose all possible outcomes are known in advance but we do not know which outcome will appear in a particular performance of the experiment. 

Sample Space (S): Set of all outcomes related to a random experiment E. Each element of S is called a sample point.  

Example 1: Consider a random experiment E1= tossing of a coin. Here we know beforehand that in each performance of E1, either head (H) or tail (T) will appear. But we do not know which one will certainly appear.  Therefore, E1 is a random experiment and the corresponding sample space is S1 = {H,T}. H and T are called sample point of E1.

Example 2: Consider E2= Tossing of two coins or tossing a coin two times. Here E2 = E1 × E1, repeating E1 two times. The sample space of E2 will be S2 = S1×S1 = {H,T}×{H,T} = {HH, TH, HT, TT}. Note that each outcome (sample point) of E2, is a combination of two outcomes of tossing of a coin, the 1st one corresponding to 1st coin toss and the 2nd one corresponding to 2nd coin toss.  The sample points are HH, TH, HT and TT. 

Event (A): An event A of a random experiment E, is nothing but a subset of the sample space S.  When A = ɸ (nothing), it is called null event and when A = S (the whole sample space), it is called the certain event. 

Example 1 continue: In this example the sample space S1 = {H,T} contains two elements (sample points). So, there exist 4 possible subsets (events) of S1 and they are ɸ (null event), {H} (the head), {T} (the tail) and the certain event {H,T} (either head or tail). 

Example 2 continue: In this example the sample space S2 = {HH, TH, HT, TT} contains four elements (sample points). So, there exist 16 possible subsets (events) of S2 and some of them are like: 

A = ɸ; ‘nothing’, 
A = {HH}; ‘both head’,
A= {TH, HT}; ‘exactly one head’ or ‘exactly one tail’ or ‘both head and tail’
A = {HH, TH, HT}; ‘at least one head’ or ‘at most one tail’. 

Probability(P): The probability P corresponding to a random experiment E, is a rule that assigns a value between 0 to 1, to each event A.  

We will now discuss some useful properties of probability that are frequently used in probability calculations. 

Properties of probability

Image Source: DataQuest

i) 0 ≤ P(A) ≤ 1.

ii) P(ɸ) = 0, P(S) = 1.

iii) For any two events A and B, P(AUB) = P(A) + P(B) – P(A∩B), where AUB is read as ‘A union B’ or in common parlance ‘A or B’, and A∩B is read as ‘A intersection B’, or in common parlance ‘A and B’.

iv) P(Ac)  = 1 – P(A), where Ac denotes the complement of event A.

v) If A and B are mutually exclusive events, then P(A∩B) = 0. A ‘mutually exclusive event’ means that if event A occurs, then event B cannot occur. In other words, there is no common element between A and B, i.e., A∩B = ɸ, the null event, and hence P(A∩B) = 0 [property ii].  For example, consider the events A = head (H), and B = tail (T), in tossing of a coin. They are mutually exclusive because if you get the head, you cannot get the tail in any single toss of a coin, or, in other words, they cannot occur together. 

vi) If A and B are independent events, then P(A∩B) = P(A)*P(B). ‘Independent events’ are those where the outcome of one event does not affect the outcome of another event.  For example, if you are tossing two coins, the outcome of the first coin will not affect the outcome of the second coin. 

Any question regarding the probability of an event can be classified into two categories: 

Category 1:  Probability of each sample point is not given in the question.
Category 2:  Probability of each sample point is given in the question.

Category 1:  

All the questions under this category, you will be given the probability values of one or more events and you will be asked the probability value of a related event. You have to use the properties of probability to solve these questions. For example:

Q: If P(A) =0.3, P(B)= 0.4 and A and B are independent events, find P(AUB). 

Ans:  P(AUB) = P(A) + P(B) – P(A∩B) [property iii]
Or, P(AUB) = P(A) + P(B) – P(A)*P(B) [property vi]
Or, P(AUB) = 0.3 + 0.4 – (0.3)(0.4)
Or, P(AUB) = 0.7 – 0.12 = 0.58.

Q: If A and B are two events such that P(A) =0.3, P(B)= 0.4 and the probability that at least one of them occurs is 0.8, then what is the probability of both of them to occur?  

Ans: Given P(A) =0.3, P(B)= 0.4, and P(AUB) = 0.8. 
P(AUB) = P(A) + P(B) – P(A∩B) [property iii]
Or, P(A∩B) = P(AUB) – P(A) – P(B)
Or, P(A∩B) = 0.8 – 0.3 -0.4 =  0.1.

Category 2:  

Under this category, the probability of each sample point will be given. This case can be divided into two types, depending on the nature of the sample space. 

Type 1- Discrete type sample space: Under this type, probability of each sample point will be given to you and you will be asked to find probability of an event A. To solve this type of problem, you have to first identify all the sample points that consists A. Then P(A) is nothing but the sum of all individual probabilities of the corresponding sample points of A. If the probability of each sample point is not given to you, then assume that each sample point has equal probability. 

Q: Suppose two coins are tossed together. What is the probability of observing 

a)  both heads?
b) at least one head?

Ans: Note that the sample space S of this experiment is {HH, TH, HT, TT}. Since the probability of each sample point is not given in the question, we assume they are equally probable, i.e., 0.25 in this case. 

a) Here our favorable event A consists of only one sample point HH, where both heads occur. Hence, P(A) = P(HH) = 0.25. 

b) Here our favorable event A consists of three sample points HH, TH and HT, because these are the 3 out of 4 possible outcomes where at least one head occur. Therefore, P(A) = P(HH)+P(TH)+P(HT) = 0.75. 

Q: Suppose that the probability of occurring x accidents per year in a busy street of Mumbai is given by 

What is the probability that there is at least one accident in this year?

Ans: Note that the number of accidents in this year can be any number between 0 to infinity. Here the sample space S = {0,1, 2, 3,…} and the probability value for each sample point is given. The favorable event (or the event of interest as asked for in the question) is A = { 1, 2, 3,…}. So,

Type 2- Interval type sample space: Under this type, a probability function will be given for an interval. This probability function is known as probability density function (pdf). You will be asked to find the probability of an event A, which is also an interval. To find the probability P(A), you have to integrate the pdf under the interval A.

Q: Suppose the pdf of a process x is given by 

Find P(x>1).

Ans: Here the sample space S is the interval (0, 2) and the event A is the interval (1, 2). Hence,

Note: When you use R, Python, etc., the above calculations are done through the execution of simple commands, and you would not have to manually compute the above probabilities.    

Thus, any question regarding finding probability of an event fundamentally falls into any of these categories and can be solved accordingly. Some shortcuts may exist for certain problems. And in many problems, the fundamental information regarding the probability of each sample point is given under many jargons. Your job is to correctly identify it. Sometimes you may find it difficult to write the favorable event A in subset notation.  I will suggest you to first understand the process E and write down corresponding the sample space S. Identifying the event A and finding P(A) will be easy then.  

0

Leave a Reply

Your email address will not be published. Required fields are marked *