Random Variable

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

Random Variable

&
Probability Distributions
Flow of the presentation
• Random Variables
• Probability Distributions
• Probability Mass/Density Functions
• Expected Value
• Bernoulli’s trial Experiments
• Binomial Distribution
• Poisson Distribution
• Normal Distribution
Random Variable
• Definition: A random variable is a rule that assigns a number to each
outcome of an experiment.
e.g. If a coin is tossed twice, random variable X: number of heads that
appears
OUTCOME X
HH 2
HT 1
TH 1
TT 0
Types of Random Variable
1. Discrete: which can take finite or isolated values is the given
interval, it can be measured exactly
e.g. The number of heads in tossing coins

2. Continuous: which can take all possible values that are infinite, it
cannot be measured exactly
e.g. The number of blank calls during 11.00 a.m. to 1.00 p.m.
Types of Probability Distribution

1. Discrete Probability Distribution (random variable is discrete)


I. Binomial Distribution
II. Poisson Distribution

2. Continuous Probability Distribution (random variable is continuous)


I. Normal Distribution
Probability Distribution (Discrete)
• Definition: If a discrete random variable has the values x1, x2, …,xn
then a probability distribution P(x) is a rule that assigns a probability
P(xi) to each value xi.
a) 0  p ( xi )  1, for i

b) P ( x ) + P ( x ) + ... + P ( x ) = 1
1 2 n
Probability Functions
• A real valued function f(x) which gives the probability of occurrence
of event ‘x’ is called probability function defined as, P(X=x)=f(x).

x is discrete: P(X=x)=f(x) is called Probability Mass Function

x is continuous: P(x-dx/2 < =X <= x+dx/2)= f(x)dx is called Probability


Density Function and y=f(x) is called the Probability Curve.
e.g. An experiment randomly selected two people from group of five
men and four women. A random variable X is the number of women
selected. Find the probability distribution function of X.
Solution:

P(0)= 5C2/9C2=5/18 (Probability both are men)


P(1)=(5C1*4C1)/9C2=5/9 (Probability of 1 men and 1
women)
P(2)=4C2/9C2= 1/6 (Probability both are women)

X= 0 1 2
P(X)=5/18 5/9 1/6
Expected Value
• Definition: IF X is a random variable then the expected value of X,
denoted by E(X) is defined as,
n
E ( X ) =  xi f ( xi ), (discrete distriution)
i =1


E( X ) =  xf ( x)dx,
−
(continuous distriution)
e.g. A tray of electronics components contains nine good components
and three defective components. If two components are selected at
random, what is the expected number of defective components?
Solution:
P(0)= 12/22, P(1) = 9/22, P(2) = 1/22

E(X)= ½
(i.e. if a large number of selections are made, average ½ each time we
expect to get no defective a little less then half time and either one or
two the rest of the time, but the average will be one half)
Discrete Probability Distribution

• Bernoulli Experiment which leads to Binomial Distribution

• Poisson Distribution
Bernoulli Trial Experiments
Problems involved repeated trials of an experiment with only two
possible outcomes are called Bernoulli trial experiments.
• Properties:
1. The experiment is repeated a fixed number of times (n times)
2. Each trial has only two possible outcomes: success and failure
3. The probability of success remains the same for each trial
4. The trials are independent
5. We are interested only in the total number of success (in any order)
Probability of a Bernoulli Experiment
• Given a Bernoulli experiment and n independent repeated trials,
p: probability of success in single trial
q: probability of failure in single trial

Then the probability of x success in n trial is,

n− x
P( x) = nCx p q x
Binomial Distribution
• Consider, Bernoulli experiment with probability distribution function
n− x
P( x) = nCx p q x

for which the probabilities are the successive terms in the binomial
expansion
n −1 n− x
(q + p ) = q + nC1q
n n
p + ... + nC x q p + ... + p = 1
x n

hence it is called Binomial Distribution.


Mean, Variance and Standard Deviation
(Binomial Distribution)
• Mean  = np

• Variance  2 = npq

• Standard Deviation  = npq


Examples:
1. An expert claims that he can distinguish between a cup of instant coffee and a cup of
percolator coffee 75% of the time. It is agreed that his claim will be accepted if he
correctly identifies at least 5 of the 6 cups. Find his chances of having the claim
(i) accepted (ii) rejected, when he does have the ability he claims.
Solution:
p: the probability of a correct distinction between a cup of instant coffee and a cup of
percolator coffee

p = 75/100=3/4, q = ¼
X: random variable defined as number of tomes correct distinctions

P ( X = x) = 6Cx(3 / 4) x (1/ 4) 6− x , x = 0,1, 2,3, 4,5, 6

(i) P(X>=5)= 0.534, (ii) P(X<=4)=1-P(X>=5)=0.466


2.
A multiple choice test consists of 8 questions with 3 answers to each question. A
student answers each questions by rolling a balanced die and checking the first
answer if he gets 1 or 2, the second answer if he gets 3 or 4 and the third answer if
he gets 5 or 6. To get a distinction, the student must secure at least 75% correct
answers. If there is no negative marking, what is the probability that the student
secures a distinction?
Solution:
p: the probability of getting an answer to a question correctly=1/3
X: random variable, getting x correct answers:
P ( X = x) = 8Cx(1/ 3) x (2 / 3)8− x , x = 0,1, 2,3, 4,5, 6, 7,8
For getting distinction (6 out of 8 must be correct answer),
P(X>=6)= 0.0197
3. An irregular six-faced die is thrown and the probability that in 10
throws it will give five even numbers is twice the probabilitty that it will
give four even numbers. How many times in 10,000 sets of 10 throws
each, would you expect it to give no even number?
Solution:
p: probability of getting an even number in a throw of a die
X: getting even number in 10 throws of a die

P ( X = x) = 10Cx( p ) x (1 − p )10− x , x = 0,1,...,10

We have P(5)=2P(4),
P(5)=2*P(4)
=>10C5*p^5*(1-p)^5 = 2* 10C4*p^4*(1-p)^6
=>(3/5)p = 1-p
=>(8/5)p=1
=>P=5/8
=>p= 5/8 and q=1-p=3/8
Required number of times that in10,000 sets of 10 throws each, we get
no even number =10,000*P(0)=0.55
4. A department in a works has 10 machines which may need adjustment
from time to time during the day. Three of these machines are old, each
having a probability of 1/11 of needing adjustment during the day and 7 are
new having corresponding probabilities of 1/21. Assuming that no machine
needs adjustment twice on the same day, determine the probability that on
a particular day just 2 old and no new machines need adjustment.
Solution:
p1: an old machine needs adjustment = 1/11=> q1=10/11
p2 : a new machine needs adjustment = 1/21=> q2=20/21
X1: ‘x’ old machine needs adjustment= P1(x)=(3Cx)(p1^x)(q1^(3-x))
X2: ‘x’ new machine needs adjustment= P2(x)=(7Cx)(p2^x)(q2^(7-x))
Required probability, P1(2)*P2(0)=0.016
Poisson Distribution
Poisson Distribution was discovered by French Mathematician Simeon
Denis Poisson in 1873. It is limiting case of the binomial distribution
under the following conditions:
i) n, the number of trials is indefinitely large
ii) p, the probability of success for each trial is indefinitely small
iii) n*p = λ (mean)
Definition
A random variable X is said to follow a Poisson distribution if it assumes
only non-negative values and its probability mass function is given by:

 e−  x
 ; x = 0,1,...;   0
P( X = x) =  x !
0; otherwise

Examples:
1. A manufacturer of cotter pins knows that 5% of his products is
defective. If the sells cotter pins in boxes of 100 and guarantees that
not more than 10 pins will be defective, what is the approximate
probability that a box will fail to meet the guaranteed quality ?
Solution:
n: 100, p: probability of a defective pin= 0.05, λ = n*p=5
X: random variable denote the number of defective pins in a box of
100
e−   x e−5 5x
P( X = x) = = , x = 1, 2,...
x! x!
10
e−5 5x
P( X  10) = 1 − P( X  10) = 1 − 
x =0 x !
2. A car hire has two cars, which it hires out day by day. The number of
demand for a car on each day is distributed as a Poisson distribution
with mean 1.5. Calculate the proportion of days on which (i) neither car
is used, and (ii) the proportion of days on which some demand is
refused.
Solution:
X: random variable denotes the number of demands for a car on
any day
λ: 1.5 (mean)
e−1.5 (1.5) x
P( X = x) = , x = 1,2,...
x!
(i) P(X=0)= 0.2231 (ii) P(X>2)=1-P(X<=2)=0.19126
3. A manufacturer, who produces medicine bottles, find that 0.1% of
the bottle are defective. The bottles are packed in boxes containing 500
bottles. A drug manufacturer buys 100 boxes from the producer of
bottles. Find how many boxes contain:
(i) no defective and (ii) at least two defective
Solution:
n=500, p: probability of defective bottle = 0.001, λ = n p = 0.5
X: random variable denotes the number of defective bottles in a box
e −0.5 0.5 x
P( X = x) = , x = 1, 2,...
x!
(i) 100*P(X=0) = 60.65≈61,
(ii) 100*P(X>=2)=100*[1-{P(0)+P(1)}]=9.025≈10
Continuous Distribution: Normal Distribution
• First discovered in 1753 by Abraham De Moivre

• Rediscovered in 18th century by Gauss in theory of error- Gaussian


distribution

• Derived from Binomial Distribution when n is very large, neither p


nor q is very small
Probability Density Function
• The general equation of the normal curve or probability density
function is
1  x− 
2

1 −  
2  
y = f ( x) = e
 2

 : mean

 : s.d .
Standard form of the Normal Distribution
X −
• Standard normal variable: Z =

=> Mean = 0, standard deviation = 1


• Probability density function for the normal distribution in standard
form is given by

1 − 12 Z 2
f (Z ) = e , −   Z  .
2
Normal Curve
Properties of PDF
1. If f(z) is the probability density function for the normal distribution,
then z z
2

P ( z1  Z  z2 ) =  f ( z )dz = F ( z ) − F ( z ), F ( z ) =  f ( z )dz
z1
2 1
0

= P ( Z  z ), disribution function

2. F(-z)=1-F(z)
Probability Calculations Using Normal Variable Table

• To find the different probabilities, the standard normal distribution is


used.
X −
1. Standard normal variable: Z =

2. The values of the probabilities corresponding to Z are tabulated and


can be found using “table for area under standard normal curve”
3. P (−  Z  ) = 1
P ( −  Z  0) = P (0  Z  ) = 0.5
P ( − Z1  Z  0) = P (0  Z  Z1 )
Examples:
1. In a production process the diameter of items is distributed
normally with mean 4.3 and variance 0.09. 200 items are having
less than 4 cms. diameter. Estimate the total number of items in the
production.
Solution: X −
 = 4.3,  = 0.09, Z =
2


P ( X  4) = P ( Z  −1) = P ( Z  1) = 0.5 − P(0  Z  1) = 0.5 − 0.3414 = 0.1586

Ans. = N *0.1586 = 200  N = 1261


2. In a test on 2000 electric bulbs, it was found that the life of a
particular make was normally distributed with an average life of 2040
hours and standard deviation of 60 hours. Estimate the number of
bulbs likely to burn for (i) more than 2150 hours, (ii) less than 1950
hours and (ii) more than 1920 hours but less than 2160 hours.
Solution:
X −
 = 2040,  = 60, Z =

1) P ( X  2150)
= P ( Z  1.83)
= 0.5 − P (0  Z  1.83)
= 0.5 − 0.4664 = 0.0336
No of bulbs = 2000 * 0.0336 = 67.2  68
2) P ( X  1950)
= P ( Z  −1.5)
= P ( Z  1.5)
= 0.5 − P (0  Z  1.5)
= 0.5 − 0.4332 = 0.0668
No of bulbs = 2000 * 0.0668 = 133.6  134
3) P(1920  X  2160)
= P (−2  Z  2)
= 2* P(0  Z  2)
= 2*0.4772 = 0.9544
No of bulbs = 2000*0.9544 = 1908.9  1909
3. In a government office 5000 employees are working. The distribution
of their monthly salary is normal with mean Rs. 7000 and standard
deviation Rs. 20. Find (i) the range of monthly salaries of 25%
employees, who are getting minimum salary and (ii) the minimum
monthly salary of 1% employees, who are getting highest salary.
Solution:
 = 7000,  = 20
i ) P (0  X  x1 ) = 0.25, ( x1 : upper lim . of the lowest salary )
x1 − 
P (0  Z  z1 = ) = 0.25

z1 = −0.67
x1 = 6986
Ans : [0, 6986]
 = 7000,  = 20
ii ) P ( X  x2 ) = 0.01, ( x2 : lower lim. of the highest salary )
P (0  x  x2 ) = 0.49
x2 − 
P (0  Z  z2 = ) = 0.49

z2 = 2.33
x2 = 7046
Ans :[7046, 7060]
Thank You

You might also like