Random Variables and PDF
Random Variables and PDF
DEFINITION:
A function whose value is a real number determined by each element in the sample space is called a
RANDOM VARIABLE.
We use the term random variable to describe the value that corresponds to the outcome from
a given experiment.
We use a capital letter, say X, to denote a random variable.
A random variable may be a continuous random variable or a discrete random variable.
EXAMPLE:
1. A coin is tossed three times. List down the elements of the sample space. List down the
possible values of a random variable Y, the number of heads that fall.
2. Let W be a random variable giving the number of heads minus the number of tails in three
tosses of a coin. List the elements of a sample space for the three tosses of the coin and to
each sample point assign a value for the random variable W.
3. Two balls are drawn in succession without replacement from an urn containing 4 red balls
and 3 black balls. List down the elements of the sample space and possible values of a
random variable X, the number of red balls.
Definition.
If a sample space contains a finite number of possibilities or an unending sequence with as many
elements as there are whole numbers, it is called a discrete sample space.
Definition.
A random variable defined over a discrete sample space is called a discrete random variable.
Definition.
If a sample space contains an infinite number of possibilities equal to the number of points on a line
segment, it is called continuous sample space.
Definition.
A random variable defined over a continuous sample space is called a continuous random variable.
Definition.
A table or formula listing all possible values that a discrete random variable can take on, along with the
associated probabilities, is called a discrete probability distribution.
Note:
For any discrete probability distribution it must be true that
1. f(x) for every value of x.
Examples:
1. Let W be a random variable giving the number of heads minus the number of tails in three
tosses of a coin. Find the probability distribution of the random variable W.
Definition.
The cumulative distribution F(x) of a discrete random variable X with probability distribution f(x) is
F ( x) P( X x) f (t ) for x .
t x
Example:
Show the cumulative distribution of the random variable A, sum of the numbers when a pair of dice is
tossed.
Definition: The function with values f(x) is called a probability density function for the continuous
random variable X, if
f(x) 0 , for all x R;
f ( x)dx 1 The total area under its curve and above the horizontal axis is equal to 1; and
P(a X b) f ( x)dx The area under the curve between any two ordinates x = a and x
a
Definition.
The cumulative distribution F(x) of a continuous random variable X with probability density function f(x)
is .
x
F ( x) P( X x) f (t )dt
for x .
Example:
A continuous random variable X that can assume values between x = 2 and x = 4 has a density
x 1
function given by f ( x) .
8
a. Show that P(2 < X < 4) = 1. b. Find P(X < 3.5). c. Find P (2.4 < X < 3.5).
Exercises
1. Find the probability distribution of the sum of the numbers when a pair of dice is tossed. Express
the results graphically as a probability histogram.
2. Does f(x) = x/5 ,where x can take on values 0,1,2,3, determine a probability distribution?
3. Does f(x) = x/10 ,where x can take on values 0,1,2,3,4, determine a probability distribution?
4. A continuous random variable X that can assume values between x = 1 and x = 4 has a density
1
function given by f ( x) .
3
a. Show that the area under the curve is equal to 1.
b. Find P (1 < X < 2.5).
c. Find P ( X 2.5).
5. A continuous random variable X that can assume values between x = 2 and x = 5 has a density
2( x 1)
function given by f ( x) .
27
a. Find P(X 4).
b. Find P ( 3 X < 4).
6. A continuous random variable X has a density function given by
x for 0 < x < 1
f (x) 2–x for 1 x < 2
0 elsewhere
7. The shelf life in days, for bottles of a certain prescribed medicine is a random variable having the
density function
20,000
f ( x) ( x 100)3 , x0
0, elsewhere
Find the probability that a bottle of this medicine will have a shelf life of
(a) at least 200 days;
(b) anywhere from 80 to 120 days.
8. The waiting time, in hours, between successive speeders spotted by a radar unit is a continuous
random variable with cumulative distribution
0, x0
F ( x) 8 x
1 e , x 0
Find the probability of waiting less than 12 minutes between successive speeders
(a) using the cumulative distribution of X;
(b) using the probability density function of X.
find
a. P( T = 5);
b. P (T > 3);
c. P (1.4 < T < 6)
10. Three cards are drawn in succession from a standard deck without replacement. Find the
probability distribution for the number of spades.
MATHEMATICAL EXPECTATION
Example:
Let X be a random variable that denotes the life in hours of a certain electronic device. The probability
density function is
20,000
, x 100
f ( x) x 3
0 , elsewhere
Find the expected life of this type of device.
This is an illustration of a time to failure problem that often occurs in practice. The expected value of the life of
the device is an important parameter for its evaluation.
E[( X ) ] ( x ) 2 f ( x)dx
2 2
if X is continuous. The positive square root of the variance ,
2( x 1) ,1 x 2
f ( x)
0 , elsewhere
Find the mean and variance of X.
Exercises:
1. A lot containing 7 components is sampled by a quality inspector; the lot contains 4 good
components and 3 defective components. A sample of 3 is taken by the inspector. Find the
expected value of the number of good components in the sample.
2. In a gambling game, a man is paid $5 if he gets all heads or all tails when three coins are
tossed, and he will pay out $3 if either one or two heads show. What is his expected gain?
th
(Reference: Probability and Statistics for Engineers and Scientists, 6 Ed. By Walpole, et. al.)
pages 90 – 91 : numbers 2, 4, 5, 10, 13, and 16.
th
page 100 #2, 4: (Reference: Probability and Statistics for Engineers and Scientists, 6 Ed. By
Walpole, et. al.)
Assume the length X in minutes of a particular type of telephone conversation is a random variable
with probability density function
1 5x
,x 0
f ( x) 5 e
0 , elsewhere
a. Determine the mean length of this type of telephone conversation.
b. Find the variance and standard deviation of X.
(reference : Statistics: A Handbook for Managers 1st Edition by Levine et al)
pages 191 – 192: 5.1, 5,5 and 5.6
1. Given the following probability distributions:
Distribution A Distribution B
X PX) X P(X)
0 0.50 0 0.05
1 0.20 1 0.10
2 0.15 2 0.15
3 0.10 3 0.20
4 0.05 4 0.50
a. Compute the expected value for each distribution.
b. Compute the standard deviation for each distribution.
c. Compare and contrast the results of distributions A and B.
2. In the carnival game Under-or-Over-Seven, a pair of fair dice is rolled once, and the resulting
sum determines whether player wins or loses his or her bet. For example, the player can bet
$1.00 that the sum will be under 7-- that is, 2, 3, 4, 5, or 6. For such a bet the player will lose
$1.00 if the outcome equals or exceeds 7 or will win $1.00 if the result is under 7. Similarly,
the player can bet $1.00 that the sum will be over 7—that is 8, 9, 10, 11, 0r 12. Here the
player wins $1.00 if the result is over 7 but loses $1.00 if the result is 7 or under. A third
method of play is to bet $1.00 on the outcome 7. For this bet, the player will win $4.00 if the
result of the rollis 7 and lose $1.00 otherwise.
a. Form the probability distribution function representing the different outcomes that are
possible for a $1.00 bet on being under 7.
b. Form the probability distribution function representing the different outcomes that are
possible for a $1.00 bet on being over 7.
c. Form the probability distribution function representing the different outcomes that are
possible for a $1.00 bet on 7.
d. Show that the expected long-run profit (or loss) to the player is the same, no matter which
method of play is used.
3. The manager of a large computer network has developed the following probability distribution
of the number of interruptions per day:
a. Compute the mean or expected number of interruptions per day.
b. Compute the standard deviation.
Interruptions(X) P(X)
0 0.32
1 0.35
2 0.18
3 0.08
4 0.04
5 0.02
6 0.01
Definition: The discrete probability distribution of the binomial random variable is given by
n!
P X x p x q n x , x 0,1,2,...n
(n x)! x!
Note:
1. If X follows a binomial distribution, then we write X~Bi (n,p).
2. P (X x) is called a cumulative probability of a random variable less than or equal to a particular
value.
Example: Given a binomial random variable X with n = 10 and p = 0.30, find the following probabilities:
a. X is exactly 3 d. X is at most 8
b. X is at least 1 e. X is between 6 to 8
c. X is from 6 to 8
Exercises
1. A coin is tossed three times. If X is a random variable representing the number of heads that
appeared, find the probability distribution of X. Determine the probability that
a. 1 head appeared
b. at least two heads appeared
c. 3 tails appeared
2. The probability that a certain production process will produce a defective part is 0.20. Find the
probability that a lot of 12 parts will contain
a. exactly 6 defectives b. 6 or 7 defectives.
3. The probability that a patient recovers from a rare blood disease is 0.40. If 15 people are known to
have contracted this disease, what is the probability that
a. at least 12 survive b. at most 13 survive
4. According to the Labor Department, 40% of adult workers have a high school diploma but did not
attend college. If 15 adult workers are randomly selected, find the probability that at least 10 of them
have high school diploma but did not attend college.
5. Incompatibility is given as the legal reason for 55% of all divorce cases filed in a given county. Find
the probability that incompatibility will be given as the reason in four of the next 6 divorce cases filed in
that country.
6. A study shows that 50% of the families in a certain large metropolitan area have at least two cars.
Find the probabilities that among 16 families randomly selected in this metropolitan area
a. exactly 9 have at least 2 cars; b. at most 6 have at least 2 cars;
7. In a certain city district, the need for money to buy drugs is given as the reason for 75% of all thefts.
What is the probability that exactly 2 of the next 4 theft cases reported in this district resulted from the
need for money to buy drugs?
8. Find the probability of getting exactly 5 girls in 10 births. Assume that the male and female births
are equally likely and that the birth of any child does not affect the probability of the gender of any
other children.
THE POISSON DISTRIBUTION
The selection of samples usually is performed and related to a given time interval or to a specified
region. These types of experiments yielding to numerical values of a random variable X during a
specified interval or region are called Poisson experiments.
For events that occur randomly and independently with a Poisson random variable (number of
success) X, with a constant rate ( ) per unit time or region, the probability distribution is called
Poisson distribution and described by the equation
e x
P( X x) p ( x; ) for x = 0,1,2, …
x!
where is the average number of successes occurring in a given time frame or a specified region,
and e = 2.71828.
Poisson assumptions:
1. The probability that an event will occur in a short interval of time (or space) is proportional to
the size of the interval.
2. In a very small interval, the probability that two events will occur is close to zero.
3. The probability that any number of events will occur in a given interval is independent of where
the interval begins.
4. The probability of any number of events occurring over a given interval is independent of the
number of events that occurred prior to the interval.
Examples:
1. If a bank receives on the average 6 bad checks per day, what is the probability that it will receive 4
bad checks on any given day?
2. If 5.6 imperfections can be expected per roll of a certain kind of cloth, what is the probability that a
roll will have three imperfections?
EXERCISES:
1. The average number of monthly breakdowns of a computer is 1.8. find the probabilities that this
computer will function for a month
a. without a breakdown
b. with only one breakdown
2. On the average, 8 people per hour use an express teller machine situated inside a commercial
complex. What is the probability that, during a selected Friday afternoon,
a. exactly 6 people will use the teller machine?
b. at most 4 people will use the machine?
3.The secretary of Obias, Ramos and Associates, a law firm, finds that there are on the average 5
calls from clients per day. Find the probability that the firm will receive exactly 3 calls on a particular
weekday.
4. A store owner complains that, on the average, 2 bottles per case of a certain brand of softdrink are
underfilled. Assuming this is correct, find the probability that a randomly chosen case of this drink will
contain
a. at least 3 underfilled bottles
b. at most 4 underfilled bottles.
5. Assume that the number of network errors experienced in a day on a local area network (LAN) is
distributed as a Poisson random variable. The average number of network errors experienced in a day
is two. What is the probability that in any given day:
In cases when "n" is large (say 50 or greater) and "p" is small (less than 0.1) the Poisson distribution
can be used to approximate a binomial distribution.
Examples:
1. It is known that 2% of the books bound at a certain bindery have defective bindings. Use the
Poisson approximation to the binomial distribution to find the probability that 5 out of 400 books bound
by this bindery will have defective bindings.
2. Find the probability of exactly one car with paintwork damage in a batch of 50 cars if the process
produces 3% damaged cars.
Exercises:
1. Records show that the probability is 0.00006 that a car tire will go flat while being driven through a
certain tunnel. Use the Poisson approximation to the binomial distribution to find the probability that at
least 2 of 10,000 cars passing through that tunnel will get flat tires.
2. Suppose that on the average 1 person in every 1,000 is an alcoholic. Find the probability that a
random sample of 8,000 people will yield fewer that 7 alcoholics.
3. In an effort to reach “zero defects” in its production process, a manufacturing firm managed to
achieve 0.1% defective items produced. To check this rate, random samples are selected from time to
time. Assuming this rate of defectives, what is the probability that out of a random sample of 100 items
none will be found defective? One? Two? Three?
4. On the average, 1 person in 1000 makes a numerical error in preparing his income tax return. If
10,000 forms are selected at random and examined, find the probability that 6, 7, or 8 of the forms will
be in error.
5. The probability that a student fails the screening test for scoliosis (curvature of the spine) at a
certain school is known to be 0.004. Of the next 1875 students who are screened for scoliosis, find the
probability that
The hypergeometric distribution is being considered as a 'relative' of binomial distribution. In the case
of binomial distribution, it is assumed that p, the probability of 'success' remains constant from
experiment to experiment. In other words, sampling with replacement was performed.
The probability distribution of the hypergeometric random variable X, the number of successes in a
random sample of size n selected from the total population N items of which k are labelled success
and (N - k) labelled failure is:
k N k
x n x
P( X x) h( x; n, k , N )
N
n
a
where x = 0,1,2,3,…, n and 0 whenever b>a.
b
Examples:
1. A carton contains 24 light bulbs, three of which are defective. What is the probability that, if a
sample of six is chosen at random from the carton of bulbs, 4 will be defective?
2. Find the probability of getting 4 face cards if a hand of 10 cards is drawn from a standard deck of
cards.
EXERCISES:
1. Among the 16 used cars on Harry’s lot, 5 have 4-wheel drive. If 3 cars are randomly chosen for a
newspaper ad, what is the probability that all 3 will have 4-wheel drive?
2. A customs inspector decides to inspect 3 of 16 shipments that arrive from Madrid by plane. If the
selection is random and 5 of the shipments contain contraband, find the probabilities that the customs
inspector will catch
a. none of the shipments with contraband;
b. one of the shipments with contraband;
c. two of the shipments with contraband;
d. three of the shipments with contraband.
3. A shipment of 7 TV sets contains 2 defectives. A hotel purchases 3 of the TV sets. If X is the
number of defective sets purchased by the hotel, find the probability distribution of X.
4. If 7 cards are dealt from a standard deck of cards, what is the probability that
a. exactly 2 of them will be hearts?
b. At least 1 of them will be a queen?
5. A gardener plants 5 seeds selected at random from a box containing 5 ampalaya and 4 squash
seeds. What is the probability that he planted 2 ampalaya and 3 squash seeds?
Consider the binomial experiment with its usual assumptions. Instead of counting the number of
successes in n trials, let the random variable X count the number of trials until the first success.
If repeated independent trials can result in a success with probability p and a failure with probability q
= 1-p, then the probability distribution of the random variable X, the number of trial on which the first
success occurs, is given by
P( X x) g ( x; p) pq x 1 where x = 1,2,3,…
Example:
1. Find the probability that a person flipping a balanced coin requires 4 tosses to get a head.
2. When taping a TV commercial, the probability that a certain actor will get his lines straight on any
one take is 0.40. What is the probability that this actor will get his lines straight for the first time on the
fourth take?
EXERCISES:
1. A recent study indicates that Pepsi-Cola has a market share of 33.2% (versus 40.9% of Coca-Cola).
A marketing research firm wants to conduct a new taste test for which it needs Pepsi drinkers.
Potential participants for the test are selected by random screening of soft drink users to find Pepsi
drinkers. What is the probability that the first randomly selected drinker qualifies? What is the
probability that two soft drink users will have to be interviewed to find the first Pepsi drinker? Three?
Four?
2. The probability that any given person will believe a rumor about the private life of a certain politician
is 0.25. What is the probability that the fifth person to hear the rumor will be the first one to believe it?
3. The probability is 0.70 that a child exposed to a certain contagious disease will catch it. What is the
probability that the third child exposed to the disease will be the first one to catch it?
4. Find the probability that a person drawing a single card from a standard deck requires 6 draws to
get a face card.
5. Sixty percent of a population of consumers is reputed to prefer a particular brand, A, of toothpaste.
If a group of consumers are interviewed, what is the probability that exactly 5 people have to be
interviewed before encountering a consumer who prefers brand A?