Lecture On Random Variables Statistics
Lecture On Random Variables Statistics
Example
Suppose one family is randomly selected from this population. The process of
randomly selecting a family is called a random experiment. Let x denote the
number of vehicles owned by the selected family. Then x can assume any of the
five possible values (0, 1, 2, 3, and 4) listed in the first column of Table 5.1. The
value assumed by x depends on which family is selected. Thus, this value
depends on the outcome of a random experiment. Consequently, x is called a
random variable.
Examples
2. The number of customers who visit a bank during any given hour
A random variable that can assume any value contained in one or more intervals
is called a continuous random variable.
Example
2. Age of a person
Probability distribution
Example
To begin our study of probability distribution, let’s go back to the idea of a fair
coin, suppose we toss a fair coin twice the possible outcomes are:
outcomes outcomes
H H 2 0.5*0.5 0.25
Total 1.0
2. ΣP (x) = 1.
Probability Distribution
The probability distribution of a discrete random variable lists all the possible
values that the random variable can assume and their corresponding
probabilities.
Example
The probability that you were born in a given month is also discrete because
there are 12 possible values.
Example
Example
Bernoulli distribution
Bernoulli trial
A random experiment whose outcomes have been classified into two categories
namely “success” and “failure” represented by letters S and F respectively is
called a Bernoulli trail.
Bernoulli distribution
Example
A coin is tossed in which the outcome “head” is a success and the probability of
head is p . Then q 1 p is the probability of failure or tail. If the number of
heads or success is a random variable X , the X can take values 0 or 1 according
to the outcome is tail (failure) or head (success). Then the probability function
of X is
p x q1 x for x 0,1
f x, p
0, otherwise
Binomial distribution
Introduction
Definition
n x n x
p q for x 0,1, 2,..., n
f x; n, p x
0; otherwise
where
n = total number of trials
p = probability of success
q = 1 – p = probability of failure
x = number of successes in n trials
n - x = number of failures in n trials
Conditions for Binomial distribution
Example 1:
Example 2:
2
In a community, the probability that a newly born child will be boy . Among
5
the 4 newly born children in that community, what is the probability that
(a) All the four boys
(b) No boys
(c) Exactly one boy.
Solution
Let us consider the event that a newly born child is a boy as success in Bernoulli
2
trial with probability of success . Let the number of boys be a random variable
5
X . Then X can take values 0, 1, 2, 3, and 4.
44
4 2
4
b) p no boys p x 0
3
0.1296 .
0 5 5
4 1
4 2
1
Let the number of heads be a random variable X which can take values 0, 1, 2,
1
3, 4 and 5. Then X is binomial variate with p and n 5 .
2
The probability function of X is
5 x
1 5 1 1
x
f x,5, for x 0,1, 2,3, 4,5
2 x 2 2
5 2
5 1
2
b) p no heads p x 0
1
0.03125 .
2 2 2
Example 4:
Solution
16 1 x 3 16 x
for x 0,1, 2,...,16.
f x; n, p x
4 4
0; otherwise
Example 5:
At the Express House Delivery Service, providing high-quality service to
customers is the top priority of the management. The company guarantees a
refund of all charges if a package it is delivering does not arrive at its
destination by the specified time. It is known from past data that despite all
efforts, 2% of the packages mailed through this company do not arrive at their
destinations within the specified time. Suppose a corporation mails 10 packages
through Express House Delivery Service on a certain day.
a) Find the probability that exactly one of these 10 packages will not arrive
at its destination within the specified time.
b) Find the probability that at most one of these 10 packages will not arrive
at its destination within the specified time.
Solution:
n=total number of packages mailed = 10
p = P (success) = 2% = 0.02
q = P (failure) = 1 – 0.02 = 0.98
a) We know that,
x = number of successes = 1
n – x = number of failures = 10 – 1 = 9
10!
𝑃(𝑥 = 1) = 10 𝐶1 (0.02)1 (0.98)9 = (0.02)1 (0.98)9
1! (10 − 1)!
= (10)(.02)(.83374776) = 0.1667
Thus, there is a 0.1667 probability that exactly one of the 10 packages mailed
will not arrive at its destination within the specified time
Thus, the probability that at most one of the 10 packages mailed will not arrive
at its destination within the specified time is 0.9838.
Example 6: The phone lines to an airline reservation system are occupied 40%
of the time. Assume that the events that the lines are occupied on successive
calls are independent. Assume that 10 calls are placed to the airline.
(a) What is the probability that for exactly three calls the lines are occupied?
(b) What is the probability that for at least one call the lines are not occupied?
(c) What is the expected number of calls in which the lines are all occupied?
Solution:
Let,
f x = nc x px q(n−x)
(a) x = 3
p[x = 3]= f 3 = 10c 3 (0.4)3 (0.6)(10−3) = 120 ∗ 0.064 ∗ 0.028 =
0.215
(b) p[x ≥ 1]= 1 −p[x < 1] = 1- p[x = 0]=1-10c 0 ( 0.4)0 (0.6) 10−0
Example 9: Warranty records show that the probability that a new car needs a
warranty repair in the first 90 days is 0.05. If a sample of three new cars is
selected, what is the probability that in the first 90 days
i. None needs a warranty repairs?
ii. More than one needs a warranty repairs?
iii. At least one needs a warranty repairs?
iv. What are the mean and standard deviation of number warranty
repair?
Poisson distribution
Introduction
Definition
e- x
for x 0,1, 2,..., .
f x; x !
0; otherwise
where, e 2.71828 and is the parameter of the distribution which is the mean
number of success and np .
Note:
Examples
Example 1:
a) 15 emergency patients.
b) At least 3 emergency patients.
c) More than 20 but less than 25 patients.
Solution
We know that,
e- x
f x; for x 0,1, 2,..., .
x!
e-20 20 x
Here, 20 , f x; 20 for x 0,1, 2,..., .
x !
e-20 20
15
1 p x 0 p x 1 p x 2
1 1.
0! 1! 2!
0.2841 .
21! 22! 23! 24!
Example 2:
If the probability that a car accident happens is a very busy road in on hour is
0.001. If 2000 cars passed in one hour by the road, what is the probability that?
a) exactly 3
b) More than 2 car accidents happened on that hour of the road.
Solution
We know that,
e- x
f x; for x 0,1, 2,..., .
x!
np 2000*0.001 2 .
e-2 2 x
f x; 2 for x 0,1, 2,..., .
x !
e-2 2
3
1 0.323 .
0! 1! 2!
Example 3:
Solution
We know that,
e- x
f x; for x 0,1, 2,..., .
x!
e-0.02 0.02
2
Example 4:
Solution
We know that,
e- x
f x; for x 0,1, 2,..., .
x!
1
We have, p 0.01 (because there is only one mistake on the average in a page) ,
100
n 100 . np 100 0.01 1 .
p at least 3 misprints p x 3 1 p x 3
1 p x 0 p x 1 p x 2
1 0.0803
0! 1! 2!
Example 5 (self-test)
On average, a household receives 9.5 telemarketing phone calls per week. Using
the Poisson distribution formula, find the probability that a randomly selected
household receives exactly 6 telemarketing phone calls during a given week.
Example 6:
An auto salesperson sells an average of 0.9 cars per day. Let x be the number of
cars sold by this salesperson on any given day. Find the mean, variance, and
standard deviation.
Normal Distribution
Definition
x 2
f x, , 2
1
e 2 2
; x 1
2
The variable X whose density function given in (1) is called normal variate
with parameters and 2 and is denoted by N , 2 . The parameters and 2
are actually the mean and variance of the normal variate X . The graph of the
normal curve is
2
1 z2
f z , 0,1 e ; z
2
Importance of Normal Distribution
p a x b F b F a
Example 1:
A company produces light bulbs whose life times follows a normal distribution
with mean 1200 hours and standard deviation 250 hours. If a light bulb is
chosen randomly from the company’s output, what is the probability that its life
time will be between 900 and 1300 hours?
Solution
900 X 1300
p 900 x 1300 p
p 1.2 z 0.4
p z 0.4 p z 1.2
0.65542 0.11507
(By using Normal table)
0.54035
Hence, the probability is approximately 0.54 that a light bulb will last between
900 and 1300 hours.
Example 2:
A very large group of students obtains test scores that are normally distributed
with mean 60 and standard deviation 15. What proportion of students obtained
scores?
X 85 85 60
a) p x 80 p
p z
15
p z 1.67 p z 1.67
X 90 90 60
b) p x 90 p
p z
15
p z 2 1 p z 2 1 p z 2
85 X 95
c) p 85 x 95 p
85 60 95 60
p z
15 15
p 1.67 z 2.33
p z 2.33 p z 1.67
0.9901 0.9525
(By using Normal table)
0.03756
Example 3:
The average daily sales of 500 branch office were Tk. 150 thousands and the
standard deviation Tk. 15 thousands. Assuming the distribution to be normal
indicate how many branches have sales between
120 X 145
a) p 120 x 145 p
p 2 z 0.33
p z 0.33 p z 2
Hence, the expected number of branches having sales between Tk. 120
thousands and Tk. 145 thousands are 0.3479 500 173.95 174
140 X 165
b) p 140 x 165 p
p 0.67 z 1
p z 1 p z 0.67
Hence, the expected number of branches having sales between Tk. 140
thousands and Tk. 165 thousands are
Example 4:
Solution: [Hints: For x = 36, P(x < 36) = P (z < -2.25) = .0122, Hence, 1.22%
of the calculators are expected to be replaced]
Example 5: