Chapter 4: Random Variable

Chapter 4:  Random Variable

Definition: A function whose domain is the set of possible outcomes, and whose range is a subset of the set of reals. Such a function is called a random variable.

A real number X connected with the outcome of a random experiment E. For example, if E consisits of two tosses the random variable which is the number of heads (0, 1 or 2).

Outcome:

 HH     

      HT    

     TH    

     TT

Value of X

    2

        1

       1

      0

Ø     Let S be the sample space associate with a given random experiment. A real- valued function defined on S and taking values in R  is called a one – dimensional random variable.

Ø     If the function values are ordered pairs of real numbers (vectors in two- space), the function is said to be a two dimensional random variable.

Ø     More generally, an n-dimensional random variable is simply a function whose domain is S and whose range is a collection of n-tuples of real numbers (vectors in n-space).

 

Mathematical and rigorous definition of the random variable:  Let us consider the probability space, the triplet (S, B, P), where S is the sample space, B is the σ-field of subsets in S, and P is a probability function on B.

A random variable is a function X(ω) with domain S and range  such that for every real number a, the event .

Example 1: If a coin is tossed, then 

, where            

X(w) is a Bernoulli random variable. Here X(w) takes only two values.

Example 2:  An experiment consists of rolling a die and reading the number of points on the upturned face. The most natural r.v. X to consider is     

If we are interested in knowing whether the number of points is even or odd, we consider a random variable Y defined as follows:            

Example 3: If a pair of fair dice is tossed then  and n(S) = 36. Let X be a random variable with image set .

Remarks:

1. A function  from S to R  is a r.v.  if and only if for real a, .

2. If X1 and X2 are random variables and C is a constant then CX1  , X1+X2,  X1 .X2  are also random variables.      

3. If X is a random variable then

(i)                   , where  if ,

(ii)                   

(iii)                

(iv)            are random variables.

4. If X1 and X2 are random variables then  and  are also random variables.

5.If X is a r.v. and f(.) is a continuous function, then f(X) is a r.v.

6.If X is a r.v.  and f(.) is a increasing function, then f(X) is a r.v.

7. If f is a function of bounded variations on every finite interval [a, b] and X is a r.v.  then f(X) is a r.v.


Distribution Function :  Let X be a r.v. The function F defined for all real x by                                                            

 is called the distribution function (d.f) of the r.v. (X).

Remark: A distribution function is called the cumulative distribution function. The domain of the distribution function is and its range is [0, 1].         

           

Properties of Distribution Function:

1.         If F is the d.f. of the r.v. X and if a < b, then                     

(i)                         

(ii)            

(iii)        

2.         If F is d.f. of one-dimensional r.v. X, then

 (i)  (ii)     

3. If F is d.f. of one dimensional r.v. X , then

  and 

Discrete Random Variable:

A variable which can assume only a countable number of real values and for which the value which the variable takes depends on chance, is called a discrete random variable.

A real valued function defined on a discrete sample space is called a discrete random variable.

Example: marks obtained in a test,

number of accidents per month,

number of telephone calls per unit time,                          number of successes in n trials, and so on.

Probability Mass Function: If X is a one – dimensional discrete random variable taking at most a countably infinite number of values x1, x2, …… then its probabilistic behavior at each real point is described by a function called the probability mass function (or discrete density function).

Definition: If X is a discrete random variable with distinct values x1, x2, …… then the function p(x) defined as

is called the probability mass function of r.v. X.

Remarks: The number p(xi); I = 1, 2, … must satisfy the following conditions

(i)                      

(ii)                

1.         The set of values which X takes is called the spectrum of the random variable.

2.         For discrete r.v., a knowledge of the probability mass function enables us to compute probabilities of arbitrary events.

Example 1: A random variable X has the following probability function:

Values of X,x:

0

1

2

3

4

5

6

7

p(x)

0

k

2k

2k

3k

k2

2k2

7k2+k

(i)                  Find k

(ii)             Evaluate

(iii)         If , find the minimum value of a,

(iv)         Determine the distribution function of X.

 

Solution:

(i)                 Since       

       

Since p(x) cannot be negative, k=-1 is rejected. Hence            k = 1/10.

Values of X,x:

0

1

2

3

4

5

6

7

p(x)

0








 

(ii)            

(iii)        

 

(iv)         The distribution function FX(x) of X is given by in the adjoin Table.

Values of X,x:

0

1

2

3

4

5

6

7

p(x)

0

K

3k

5k

8k

8k+k2

8k+3k2

10k2+9k

FX(x)

0








 

 

Example 2: If,   find (i) , and (ii)

Solution:

(i)                      

(ii)                      

Example 3: Two dice are rolled. Let X denote the random variable which counts the total number of points on the upturned faces, Construct a table giving the non-zero values of the probability mass function and draw the probability chart. Also find the distribution function of X.

 Solution: If both dice are unbiased and the two rolls are independent, then each sample point of sample space S has probability 1/36. Then

         

     

These values are summarized in the following probability table:

X:

p(x)

X

p(x)

2

1/36

8

5/36

3

2/36

9

4/36

4

3/36

10

3/36

5

4/36

11

2/36

6

5/36

12

1/36

7

6/36

 

 

L7-Continuous Random Variable

 A random variable X is said to be continuous if it can take all possible values (integral as well as fractional) between certain limits.

A random variable is said to be continuous when its different values cannot be put in 1-1 correspondence with a set of positive integers.

A continuous random variable is a random variable that can be measured to any desired degree of accuracy.

Example : age, height, weight, etc.

Probability Density Function: Consider the small interval (x, x+dx) of length dx round the point x. let f(x) be any continuous function of x so that f(x)dx represents the probability that X falls in the infinitesimal interval (x, x+dx).

Symbolically,

p.d.f. fX(x) of the r.v. is defined as


The probability for a variate value to lie in the interval dx is f(x)dx and hence the probability for a variate value to fall in the finite interval  is :

            

Which represents area between the curve  , x-axis and the ordinates at  and   .

The total probability is unity:   , where [a, b] is the range of the random variable X.

The range of the variable may be finite or infinite.

Important Remark: (Difference between Discrete and Continuous Random Variable):


Various Measures of Central Tendency, Dispersion, Skewness and Kurtosis for Continuous Probability Distribution: Let fX(x) or f(x) be the p.d.f. of a r.v. X, where X is defined from a to b. then

(i)                

(ii)                  

(iii)             

(iv)        

(v)                   

 

 

 

 

 

 

 

Example 1: The diameter of an electric cable, say X, is assumed to be a continuous random variable with p.d.f.:

(i)                 Check that f(x) is p.d.f. and

(ii)             Determine a number b such that

Example 2: A continuous random variable X has a p.d.f.

Find a and b such that

(i)                  (ii)         

Continuous Distribution Function:

If X is a continuous random variable with the p. d. f. f(x), then the function

 

is called the distribution function (d. f.) or sometimes the cumulative distribution function (c. f. d.) of the random variable X.

 

 

Properties of Distribution Function:

1.               

2.         F(x) is non-decreasing function of x.

3.         F(x) is a continuous function of x on the right.

4.         The discontinuities of F(x) are at the most countable.

5.          It is denoted as    

6.         Similarly   

Example: verify that following is a distribution function:

      

Example: The diameter, say X, of an electric cable, is assumed to be continuous random variable with p.d.f.

      

(i)                 Check that the above is a p.d.f.

(ii)             Obtain an expression for the c. d. f. of X.,

(iii)         Compute    

(iv)         Determine the number k such that  .

Chapter 3: Baye's Theorem

Bayes’ Theorem Explained with Detailed Solved Examples

Bayes’ Theorem is one of the most important concepts in probability theory. It helps us determine the probability of an event based on prior information. In this article, we explain the theorem and solve 4 detailed examples of Bayes’ Theorem step by step.

Bayes’ Theorem Formula

If \(A_1,A_2,\dots,A_n\) are mutually exclusive and exhaustive events, then:

\[ P(A_i|B)=\frac{P(A_i)P(B|A_i)}{\sum P(A_i)P(B|A_i)} \]

For two events \(A\) and \(B\):

\[ P(A|B)=\frac{P(A)P(B|A)}{P(B)} \]

Solved Examples of Bayes’ Theorem

Example 1: Probability of Selecting the First Bag

A bag contains 3 red and 2 blue balls. Another bag contains 4 red and 6 blue balls. One bag is chosen at random, and a red ball is drawn. Find the probability that it came from the first bag.

\[ P(A_1)=P(A_2)=\frac12 \] \[ P(B|A_1)=\frac35,\quad P(B|A_2)=\frac25 \] Using Bayes’ theorem: \[ P(A_1|B)=\frac{\frac12\cdot\frac35}{\frac12\cdot\frac35+\frac12\cdot\frac25} \] \[ =\frac{3/10}{5/10}=\frac35 \]

Final Answer: \(\boxed{\frac35}\)

Example 2: Probability a Defective Bulb Came from Machine B

Machine A produces 60% of bulbs and Machine B produces 40%. Their defect rates are 2% and 5% respectively. Find the probability that a defective bulb came from Machine B.

\[ P(A)=0.6,\quad P(B)=0.4 \] \[ P(D|A)=0.02,\quad P(D|B)=0.05 \] \[ P(B|D)=\frac{0.4\times0.05}{0.6\times0.02+0.4\times0.05} \] \[ =\frac{0.02}{0.032}=0.625 \]

Final Answer: \(\boxed{0.625}\)

Example 3: Probability of Having a Disease After Testing Positive

A disease affects 1% of the population. A test is 99% accurate. If a person tests positive, what is the probability they actually have the disease?

\[ P(D)=0.01,\quad P(D^c)=0.99 \] \[ P(T|D)=0.99,\quad P(T|D^c)=0.01 \] \[ P(D|T)=\frac{0.01\times0.99}{0.01\times0.99+0.99\times0.01} \] \[ =\frac{0.0099}{0.0198}=0.5 \]

Final Answer: \(\boxed{0.5}\)

Example 4: Probability of Selecting Urn II

Urn I contains 2 white and 3 black balls, and Urn II contains 4 white and 1 black ball. A white ball is drawn. Find the probability that Urn II was selected.

\[ P(U_1)=P(U_2)=\frac12 \] \[ P(W|U_1)=\frac25,\quad P(W|U_2)=\frac45 \] \[ P(U_2|W)=\frac{\frac12\cdot\frac45}{\frac12\cdot\frac25+\frac12\cdot\frac45} \] \[ =\frac{4/10}{6/10}=\frac23 \]

Final Answer: \(\boxed{\frac23}\)

More Solved Examples of Bayes’ Theorem

Example 5: Choosing a Coin

Box I contains 2 gold coins and 3 silver coins. Box II contains 4 gold coins and 1 silver coin. One box is chosen at random, and a gold coin is drawn. Find the probability that the coin came from Box II.

Solution:

Let:
  • \(B_1\): Box I is chosen
  • \(B_2\): Box II is chosen
  • \(G\): Gold coin is drawn
\[ P(B_1)=P(B_2)=\frac12 \] \[ P(G|B_1)=\frac25,\quad P(G|B_2)=\frac45 \] Using Bayes’ theorem: \[ P(B_2|G)=\frac{P(B_2)P(G|B_2)}{P(B_1)P(G|B_1)+P(B_2)P(G|B_2)} \] \[ =\frac{\frac12\times\frac45}{\frac12\times\frac25+\frac12\times\frac45} \] \[ =\frac{4/10}{2/10+4/10} \] \[ =\frac{4/10}{6/10}=\frac23 \]

Final Answer: \(\boxed{\frac23}\)

Example 6: Student Passing Probability

In a college, 70% of students are undergraduates and 30% are postgraduates. The probability of passing an exam is 0.8 for undergraduates and 0.9 for postgraduates. If a student passes, what is the probability that the student is a postgraduate?

Solution:

Let:
  • \(U\): student is undergraduate
  • \(P\): student is postgraduate
  • \(E\): student passes exam
\[ P(U)=0.7,\quad P(P)=0.3 \] \[ P(E|U)=0.8,\quad P(E|P)=0.9 \] By Bayes’ theorem: \[ P(P|E)=\frac{P(P)P(E|P)}{P(U)P(E|U)+P(P)P(E|P)} \] \[ =\frac{0.3\times0.9}{0.7\times0.8+0.3\times0.9} \] \[ =\frac{0.27}{0.56+0.27} \] \[ =\frac{0.27}{0.83}=0.3253 \]

Final Answer: \(\boxed{0.3253}\)

Example 7: Factory Defect Analysis

A factory has three machines producing bulbs:

  • Machine A produces 30% with 1% defect
  • Machine B produces 45% with 2% defect
  • Machine C produces 25% with 3% defect

If a bulb selected is defective, find the probability it was made by Machine C.

Solution:

Let \(D\) be the event that the bulb is defective. \[ P(A)=0.30,\quad P(B)=0.45,\quad P(C)=0.25 \] \[ P(D|A)=0.01,\quad P(D|B)=0.02,\quad P(D|C)=0.03 \] Using Bayes’ theorem: \[ P(C|D)=\frac{P(C)P(D|C)}{P(A)P(D|A)+P(B)P(D|B)+P(C)P(D|C)} \] \[ =\frac{0.25\times0.03}{0.30\times0.01+0.45\times0.02+0.25\times0.03} \] \[ =\frac{0.0075}{0.003+0.009+0.0075} \] \[ =\frac{0.0075}{0.0195}=0.3846 \]

Final Answer: \(\boxed{0.3846}\)

Example 8: Insurance Claim Probability

An insurance company has 60% male policyholders and 40% female policyholders. The probability of making a claim is 0.1 for males and 0.05 for females. If a policyholder makes a claim, what is the probability that the policyholder is female?

Solution:

Let:
  • \(M\): policyholder is male
  • \(F\): policyholder is female
  • \(C\): policyholder makes a claim
\[ P(M)=0.6,\quad P(F)=0.4 \] \[ P(C|M)=0.1,\quad P(C|F)=0.05 \] By Bayes’ theorem: \[ P(F|C)=\frac{P(F)P(C|F)}{P(M)P(C|M)+P(F)P(C|F)} \] \[ =\frac{0.4\times0.05}{0.6\times0.1+0.4\times0.05} \] \[ =\frac{0.02}{0.06+0.02} \] \[ =\frac{0.02}{0.08}=0.25 \]

Final Answer: \(\boxed{0.25}\)

Conclusion

These Bayes’ theorem solved examples demonstrate how prior probabilities and conditional probabilities combine to determine posterior probabilities. This theorem is widely used in statistics, machine learning, medical diagnosis, and decision-making.

Chapter 2: Conditional Probability

Return to Table of Content  

Chapter 2: Conditional Probability

Conditional Probability

Let A and B be two events of finite sample space U. The probability that B occurred given that A has occurred is denoted by P(B/A) and is called conditional probability.

Theorem 1 If A and B are any two events of a finite sample space U, then show that

          

Theorem 2 Multiplication Theorem of Probability or Theorem of Compound Probability:

If the probability of an event A happening as a result of trial is P(A) and after A has happened that probability of an event B happening as a P(B/A), then the probability of both the events A and B happening as a result of two trial is P(AB) or

OR

Independent Events: If neither of two events A and B affects the probability of happening of the other, we say that they are independent.   

Remarks: 1. The event A and B are independent if             

             

Otherwise A and B are dependent.

2. If A and B are independent, then

                                          

Example 1 Suppose a packet of 10 razor blades has 2 defective blades in it. Two blades are drawn from the packet one after another without replacement. Find the probability that both blades drawn are defective.

Solution: Let E1 be the event that first blade drawn is defective and E2 the event that second blade drawn is defective. Here E1 and E2 are independent events and                        

Hence                 

Example 2 Two cards are drawn from a bridge deck, without replacement. What is the probability that the first is an ace and the second is a king?

Solution:

Example 3: An urn contains 10 black and 10 white balls. Find the probability of drawing two balls of the same colour.

Ans: 9/19

Example 4: A bag contains four white and two black balls and a second bag contains three of each colour. A bag is selected at random, and a ball is then drawn at random from the bag chosen. What is the probability that the ball drawn is white?

Ans 7/12

Example 5:  Three machines I,II and III manufacture respectively 0.4,0.5 and 0.1, of the total production. The percentage of defective items produced by I, II and III is 2, 4 and 1 percent respectively. For an item chosen at random, what is the probability it is defective ?

Ans : 0.029

Example 6 Five salesmen A, B, C, D and E of a company are considered for a three member trade delegation to represent the company in an international trade conference. Construct the sample space and find the probability that:

(i)                 A is selected.

(ii)             A is not selected, and

(iii)         Either A or B (not both) is selected.

(Assume the natural assignment of probability)

 Solution: The sample space for selecting three salesmen out of 5 salesmen A, B, C, D and E for the trade delegation is given by:

S= {ABC, ABD, ABE,}

 

Assignment: Probability and Statistics Basic

Sticky Ad Probability Problems with Detailed Solutions Click each question to expand the detailed interpretation and solution. ...