STAT 211 Joint Probability Distributions and Random Samples: Handout 5 (Chapter 5)
STAT 211 Joint Probability Distributions and Random Samples: Handout 5 (Chapter 5)
Handout 5 (Chapter 5)
Joint Probability Distributions and Random Samples
By using the following examples, the joint probability mass function for two discrete random
variables and their properties, their marginal probability mass functions, the case for independent
and dependent variables, their conditional distributions, expected value, variance, covariance,
and correlation will be demonstrated. Properties will be explained.
Example 1: Quality audit records are kept on numbers of major and minor failures of circuit
packs during-in of large electronic switching devices. They indicate that for a device of this
type, the random variables X (the number of major failures) and Y (the number of minor
failures) can be described at least approximately by the accompanying joint distribution.
0 1 2 Total
x
y
0 0.15 0.05 0.01 0.21
1 0.10 0.10 0.04 0.24
2 0.10 0.14 0.04 0.28
3 0.10 0.13 0.04 0.27
Total 0.45 0.42 0.13 1
y 0 1 2 3 otherwise
p(y) 0.21 0.24 0.28 0.27 0
f. Find the conditional probability function for Y given that X=0 that is there are no circuit
pack failures.
y 0 1 2 3 otherwise
P(Y=y | X=0) 0.3333 0.2222 0.2222 0.2222 0
g. What is the expected number of minor failures given that there were no major failures?
E(Y | X=0) =1.3333
h. Suppose that demerits are assigned to devices of this type according to the formula
D=2X+Y. Find the marginal probability mass function for D.
d 0 1 2 3 4 5 6 7 otherwise
P(D=d) 0.15 0.10 0.15 0.20 0.15 0.17 0.04 0.04 0
d=0 only when X=0,Y=0 then P(d=0)=P(X=0,Y=0)
d=3 only when X=0,Y=3 or X=1,Y=1 then P(d=3)=P(X=0,Y=3)+P(X=1,Y=1)
i. Suppose that demerits are assigned to devices of this type according to the formula
D=2X+Y. Find the expected value and the variance of D.
E(D)=2.97 E(D2)=12.55 Var(D)=3.7291
j. Suppose that demerits are assigned to devices of this type according to the formula
U=Min(X,Y). Find the mean value and the variance of U.
u 0 1 2 otherwise
P(U=u) 0.51 0.41 0.08 0
u=0 only when X=0,Y=0 or X=0,Y=1 or X=0,Y=2 or X=0,Y=3 or X=1,Y=0 or X=2,Y=0 then
P(U=0)=P(X=0,Y=0)+P(X=0,Y=1)+P(X=0,Y=2)+P(X=0,Y=3)+P(X=1,Y=0)+P(X=2,Y=0)
By using the following example, the joint probability density function for two continuous
random variables and their properties, their marginal probability density functions, the case for
independent and dependent variables, their conditional distributions, expected value, variance,
covariance, and correlation will be demonstrated. Properties will be explained.
Example 2: Suppose that a pair of random variables, X and Y have the same joint probability
density
x(1 y) if 0 x 2 and 0 y 1
f ( x, y)
0 otherwise
a. Find the marginal probability density functions for X and Y.
Random Sample:
The random variables X1, X2, ….,Xn are said to form a random sample of size n if
(i) The Xi's are independent random variables.
(ii) Every Xi's has the same probability distribution.
_
The sampling distribution of x and the distribution of a linear combination of variables:
Let X1,X2,….,Xn be a random sample of size n with the mean E(X)= and variance Var(X)= 2 .
_
_ _
_
The mean of X is _ E X and the variance of X is 2_ Var X 2 / n .
x x
E X i n
n n
The mean of Xi
i 1
is
Xi
and the variance of X
i 1
i is
2 Var X i n 2 .
Xi
If h(x) is a linear combination of Xi’s then the mean of h(x) is h( x) Eh( x) and the
variance of h(x) is h2( x) Varh( x) .
Example 3 (Exercise 5.42): A company maintains 3 offices in a certain region, each staffed by
two employees. Information concerning yearly salaries (1000’s of dollars) is as follows:
Office 1 1 2 2 3 3
Employee 1 2 3 4 5 6
Salary 19.7 23.6 20.2 23.6 15.8 19.7
(a) Suppose two of these employees are randomly selected from among the six (without
_
replacement). Determine the sampling distribution of the sample mean salary X .
S={(1,2),(1,3),(1,4),(1,5),(1,6),(2,1),(2,3),(2,4),(2,5),(2,6),(3,1),(3,2),(3,4),(3,5),(3,6),
(4,1),(4,2),(4,3),(4,5),(4,6),(5,1),(5,2),(5,3),(5,4),(5,6),(6,1),(6,2),(6,3),(6,4),(6,5)}. There are 30
outcomes.
_
x
21.65 when (1,2),(2,1),(1,4),(4,1),(2,6),(6,2),(4,6),(6,4) with 8 outcomes
19.95 when (1,3),(3,1),(3,6),(6,3) with 4 outcomes
17.75 when (1,5),(5,1),(5,6),(6,5) with 4 outcomes
19.70 when (1,6),(6,1),(4,5),(5,4),(2,5),(5,2) with 6 outcomes
21.90 when (2,3),(3,2),(3,4),(4,3) with 4 outcomes
23.60 when (2,4),(4,2) with 2 outcomes
18.0 when (3,5),(5,3) with 2 outcomes
_
x : 17.75 18 19.7 19.95 21.65 21.90 23.60 otherwise
_
P ( x ) : 4/30 2/30 6/30 4/30 8/30 4/30 2/30 0
_ _ _
E( x )= x p( x) =613/30=20.43
(b) Suppose one of the three offices is randomly selected. Determine the sampling distribution
_
of the sample mean salary X .
S={(1,2),(2,1),(3,4),(4,3),(5,6),(6,5)}. There are 6 outcomes
_
x
21.65 when (1,2),(2,1) with probability 1/3
21.90 when (3,4),(4,3) with probability 1/3
17.75 when (5,6),(6,5) with probability 1/3
_
E( x )=61.3/3=20.43
Population mean = (19.7+23.6+20.2+23.6+15.8+19.7)/6=20.43
If Xi's are normally distributed random sample of size n with the mean and variance 2 then
_
X is also normally distributed with the mean and the variance 2 / n .
x
Z has a standard normal distribution with the mean 0 and the variance 1.
/ n
If Xi's are normally distributed random sample of size n with the mean and variance 2 then
n
X
i 1
i is also normally distributed with the mean n and the variance n 2 .
Z
X i n
has a standard normal distribution with the mean 0 and the variance 1
n
If Xi's are normally distributed random sample of size n with the mean and variance 2 then
any linear combination of Xi's is also normally distributed with the mean E(h(x)) and the
variance Var(h(x)).
h( x) E(h( x))
Z has a standard normal distribution with the mean 0 and the variance 1
Var (h( x)
Example 4 (Exercise 5.60): Five automobiles of the same type are to be driven on a 300-mile
trip. Let Xi be the observed fuel efficiency (mpg) for the ith car.
First two cars are economy brand and Xi’s are distributed N(20,4), i=1,2
Last three cars are name brand and Xi’s are distributed N(21,3.5), i=3,4,5
All five are independent.
Y is a measure of the difference in efficiency between economy gas and name brand gas.
X X 2 X 3 X 4 X 5 20 20 21 21 21
E(Y)= E 1 = =20-21=-1
2 3 2 3
X X 2 X 3 X 4 X 5 4 4 3.5 3.5 3.5
Var(Y)= Var 1 = =2+1.1667=3.1667
2 3 4 9
P(Y0)=P(Z0.56)=0.2877
P(-1Y1)=P(Y1)-P(Y<-1)=P(Z1.12)-P(Z<0)=0.8665-0.5=0.3665
Example 5 (Exercise 5.66): If two loads are applied to a cantilever beam, the bending moment at
0 due to loads is a1X1+a2X2 where X1<X2 and a1<a2 for independent X1 and X2.
(c) Let independent A1 and A2 be random variables which are independent from Xi‘s.
E(A1X1+A2X2)= E(A1)E(X1)+ E(A2)E(X2)=5(2)+10(4)=50
Example 6 (Exercise 5.69): Three different roads feed into a particular freeway entrance.
Number of cars coming from each road onto the freeway is a random variable.
Road 1 Road 2 Road 3
Expected value 800 1000 600
Standard deviation 16 25 18
(a) What is the expected total number of cars entering the freeway at this point during the
period? E(R1+R2+R3)= E(R1)+E(R2)+E(R3)=2400
(b) What is the variance of the total number of cars entering the freeway at this point during the
period? with independence, Var(R1+R2+R3)= Var(R1)+Var(R2)+Var(R3)=1205
Central Limit Theorem: Let X1, X2,….,Xn be a random sample from a distribution with mean
_
and variance 2. Then if n is sufficiently large (n>30), X has approximately a normal
n
distribution with mean _ and variance 2_ 2 / n and
X X
X
i 1
i has approximately a normal
distribution with mean n and variance 2 x n 2 . The larger the value of n, the
xi i
better the approximation.
Example 7: Let X1,X2,…,X100 denote the actual net weights of randomly selected 50-lb bags of
fertilizer. If the expected weight of each bag is 50 and the variance is 1,
(a) What is the probability that the average weight of 100 bags will be between 49.75 and 50.25?
_
The average weight of 100 bags is X . 50 and 2 2 / n 1 / 100 0.01
_ _
X X
_
49.75 50 50.25 50
P 49.75 X 50.25 P z P(-2.5≤z≤2.5)
byCLT
0.01 0.01
=0.9938-0.0062=0.9876
(b) What is the probability that the total weight of 100 bags will be between 4950 and 5000?
n
The total weight of 100 bags is X
i 1
i .
xi
n =5000 and 2 x n 2 =100
i