Enggmath 3 Random Variables Handouts
Enggmath 3 Random Variables Handouts
The
Engg Math 3: Random Variables & Probability probability distribution of a discrete random variable X lists the values xi and their
Discrete and Continuous probabilities pi:
Random Variables
Chapter 4
I.1. Random Variables
I. Discrete and Continuous Random A random variable, usually written X, is a variable whose
Variables possible values are numerical outcomes of a random
phenomenon. There are two types of random
II. Discrete and Continuous
variables, discrete and continuous. Suppose a random variable X may take k different values, with the probability that X =
Probability Distributions
xi defined to be P(X = xi) = pi. The probabilities pi must satisfy the following:
III. Joint Probability Distribution
Clearly a random variable is not a variable at all in the
usual sense, and it is a function.
Learning Outcome: At the end of the
chapter the student should be able to: A. DISCRETE RANDOM VARIABLES
TLO 3: Solve random variables and A discrete random variable is one which may take on Example 1. A shipment of 8 similar microcomputers to a retail outlet contains 3 that are defective.
their probability distributions, only a countable number of distinct values such as If a school makes a random purchase of 2 of these computers, find the probability distribution for
cumulative distribution 0,1,2,3,4,........ Discrete random variables are usually (but the number of defectives.
functions and expected values not necessarily) counts. If a random variable can take only
of random variables a finite number of distinct values, then it must be discrete. Example 2. In the experiment of tossing a fair coin three times. If X is the random variable giving
TLO 4: Solve two or random the number of heads obtained, find
variables (Joint Probability Examples of discrete random variables include: (a) 𝑃 (𝑋 = 2)
Distributions, marginal - number of children in a family, (b) 𝑃 (𝑋 < 2)
probability distributions, - Friday night attendance at a cinema,
conditional probability - number of patients in a hospital ward, Example 3. Suppose a variable X can take the values 1, 2, 3, or 4. The probabilities associated
distributions), linear functions
- number of defective light bulbs in a box of ten. with each outcome are described by the following table:
of random variables and
general functions of random
variables. DISCRETE PROBABILITY DISTRIBUTION
Reference: Probability and Statistics The probability distribution of a discrete random (a) Determine the probability that X is equal to 2 or 3
for Engineers by Walpole, Meyers and variable is a list of probabilities associated with each of its (b) Draw the Probability histogram
Ye possible values. It is also sometimes called the
(Definitions taken from Valerie J. Easton probability function or the probability mass CUMULATIVE DISTRIBUTION FUNCTION
and John H. McColl's Statistics Glossary function.
v1.1)
All random variables (discrete and continuous) have a cumulative distribution function. It is a
Illustration: Consider tossing a fair coin three times
function giving the probability that the random variable X is less than or equal to x, for every value x.
Reminders: Define X : the number of heads obtained
For a discrete random variable, the cumulative distribution function is found by summing up the
Midterm Quiz No. 1 after this Chapter probabilities.
X = 0 : TTT
X = 1 : HTT, THT, TTH
Example 4. The cumulative distribution function for the above probability distribution in example 3
X = 2 : HHT, HTH, THH
is calculated as follows:
X = 3 : HHH
The probability that X is less than or equal to 1 is 0.1,
the probability that X is less than or equal to 2 is 0.1+0.3 = 0.4,
the probability that X is less than or equal to 3 is 0.1+0.3+0.4 = 0.8, and
the probability that X is less than or equal to 4 is 0.1+0.3+0.4+0.2 = 1.
The probability histogram for the cumulative distribution of this random variable is shown on the
next page.
Example 7. The total number of hours, measured in units of 100 hours, that a family runs a vacuum
cleaner over a period of one year is a continuous random variable X that has the density function
𝑥, 0<𝑥<1
𝑓(𝑥) = {2 − 𝑥 , 1≤𝑥<2
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
DESCRIBING THE PROBABILITY DISTRIBUTIONS Find the probability that over a period of one year, a family runs the vacuum cleaner
- Describe the shape, center (mean), and spread (standard deviation), and identify (a) Less than 120 hours
outliers (b) Between 50 and 100 hours
Example 5. Babies’ Health at Birth. Given the data below of APGAR scores of newborn babies.
(a) Show that the probability distribution for X is legitimate Example 8. The proportion of people who respond to a certain mail-order solicitation is a continuous
(b) Make a histogram of the probability distribution. Describe what you see. random variable X that has the density function
(c) Apgar scores of 7 or higher indicate a healthy baby. What is 𝑃(𝑋 ≥ 7)?
Examples: height, weight, the amount of sugar in an orange, the time required to run a mile.
A continuous random variable is not defined at specific values. Instead, it is defined over an interval of
values, and is represented by the area under a curve (in advanced mathematics, this is known as
an integral). The probability of observing any single value is equal to 0, since the number of values
which may be assumed by the random variable is infinite.
Suppose a random variable X may take all values over an interval of real numbers. Then the
probability that X is in the set of outcomes A, P(A), is defined to be the area above A and under a
curve. The curve, which represents a function p(x), must satisfy the following:
2
(2𝑥 + 3𝑦), 0 < 𝑥 < 1 , 0 < 𝑦 < 1,
𝑓(𝑥, 𝑦) = {5
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒.
Example 10. Let X and Y be two jointly continuous random variable with Joint Probability Function
2
𝑓(𝑥, 𝑦) = {𝑥 + 𝑐𝑦 0≤𝑥 ≤1, 0≤𝑦 ≤1
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
a. Find the constant c Example 12. A candy company distributes boxes of chocolates with a mixture of creams, toffees,
1 1 and cordials. Suppose that the weight of each box is 1 kilogram, but the individual weights of the
b. Find 𝑃 (0 ≤ 𝑋 ≤ 2 , 0 ≤ 𝑌 ≤ )
2 creams, toffees, and cordials vary from box to box. For a randomly selected box, let X and Y represent
the weights of the creams and the toffees, respectively, and suppose that, the joint density function
MARGINAL PROBABILITY MASS FUNCTION of these variables is
Given the joint probability distribution f(x,y) of the discrete random variables X and Y, the probability 24𝑥𝑦, 0 ≤ 𝑥 ≤ 1 , 0 ≤ 𝑦 ≤ 1, 𝑥 + 𝑦 ≤ 1
distribution g(x) of X alone is obtained by summing f(x, y) over the values of Y. Similarly, the
𝑓 (𝑥, 𝑦) = {
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
probability distribution h(y) of Y alone is obtained by summing f(x,y) over the values of X. We define
g(x) and h(y) to be the marginal distributions of X and Y, respectively. When X and Y are continuous a. Find the probability that in a given box the cordials account for more than ½ of the weight.
random variables, summations are replaced by integrals. b. Find the marginal density for the weight of the creams.
c. Find the probability that the weight of the toffees in a box is less than 1/8 of a kilogram if
it is known that creams constitute ¾ of the weight.
1. Let X denote the reaction time, in seconds, to a certain stimulus and Y denote the
CONDITIONAL DISTRIBUTION temperature (°F) at which a certain reaction starts to take place. Suppose that two random
variables X and Y have the joint density
Let X and Y be two random variables, discrete or continuous. The conditional 4𝑥𝑦 , 0<𝑥 <1, 0<𝑦<1
𝑓(𝑥, 𝑦) = {
distribution of the random variable Y given that X = x is 0 , 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
𝑓(𝑥, 𝑦) Find
𝑓{𝑌 |𝑥} = , 𝑔(𝑥) > 0 a. 𝑃 (0 ≤ 𝑋 ≤
1
𝑎𝑛𝑑
1
≤𝑌≤ )
1
𝑔(𝑥) 2 4 2
Similarly, the conditional distribution of the random variable X given that Y=y is b. 𝑃(𝑋 < 𝑌)
𝑓(𝑥, 𝑦)
𝑓{𝑋|𝑦} = , ℎ(𝑦) > 0 2. Let X denote the number of times a certain numerical control machine will malfunction: 1,
ℎ(𝑦) 2, or 3 times on any given day. Let Y denote the number of times a technician is called on
an emergency call. Their joint probability distribution is given as
Example 14. In example 11, Find the conditional distribution of X, given that Y = 1, and use it to
determine 𝑷(𝑿 = 𝟎 | 𝒀 = 𝟏).
10𝑥𝑦 2 , 0 < 𝑥 < 𝑦 < 1, 3. Each rear tire on an experimental airplane is supposed to be filled to a pressure of 40
𝑓 (𝑥, 𝑦) = {
0 , 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒 pound per square inch (psi). Let X denote the actual air pressure for the right tire and Y
denote the actual air pressure for the left tire. Suppose that X and Y are random variables
a. Find the marginal densities 𝑔(𝑥), ℎ(𝑦) , and the conditional density 𝑓(𝑦|𝑥) with the joint density
b. Find the probability that the spectrum shifts more than half of the total observations, given
that the temperature is increased to 0.25 unit. 𝑘 (𝑥 2 + 𝑦 2 ), 30 ≤ 𝑥 < 50 ; 30 ≤ 𝑦 < 50
𝑓 (𝑥, 𝑦) = {
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Example 16. Given the joint density function a. Find k
b. Find 𝑃(30 ≤ 𝑋 ≤ 40 𝑎𝑛𝑑 40 ≤ 𝑌 < 50)
𝑥(1 + 3𝑦 2 c. Find the probability that both tires are underfilled.
𝑓 (𝑥, 𝑦) = { , 0 < 𝑥 < 2, 0 < 𝑦 < 1,
4
0 , 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
1 1 1
Find 𝑔(𝑥 ), ℎ(𝑦), 𝑓(𝑥|𝑦) and evaluate 𝑃 (4 < 𝑋 < 2 | 𝑌 = 3)
Reminders:
MIDTERM QUIZ NO. 1
Next Meeting