Probc
Probc
Probc
Then
(a) E (aX + b ) = a E ( x ) + b
Please note : whether we add X and Y or subtract Y from X, we always must add their
variances.
Th. If X,Y are indep, E(XY ) = E(X )E(Y ) and COV (X, Y ) = 0
100
Sample Mean
Let X 1 , X 2 .....X n be n indep rvs each having the same mean µ and same variance σ 2 .
We define
X 1 + X 2 + ... + X n
X=
n
X is called the mean of the rvs X 1 .....X n . Please note that X is also a rv.
Theorem
1. ()
E X =µ
2. ()
Var X =
σ2
n
.
Proof
(i) ()
EX =
1
n
[E(X 1 ) + E(X 2 ) + .... + E(X n )]
1 µ + µ + ..... + µ
= =µ
n n times
(2) ()
Var X =
1
n2
[Var (X 1 ) + Var(X 2 ) + .... + Var(X n )]
1 σ 2 + σ 2 + .. + σ 2 nσ 2 σ 2
= = =
n2 n times n2 n
101
Sample variance
Let X 1 ...X n be n indep rvs each having the same mean µ and same variance σ 2 . Let
X1 + X 2 + X n
X= be their sample mean. We define the sample variance as
n
1
(X )
n 2
S2 = i −X
n −1 i =1
( )
E S2 =σ 2
Simulation
To simulate the values taken by a continuous r.v. X, we have to use the following
theorem.
Theorem
Let X be a continuous r.v. with density f(x) and cumulative distribution function F(x). Let
U = F ( X ) . Then U is a r.v. having uniform distribution on (0,1).
In other words, U is a random number. Thus to simulate the value taken by X, we take a
random no U from the table 7 (Now you must put a decimal point before the no) And
solve for X, the equation
F (X ) = U
102
Example 24
Let X have uniform density on (α , β ) . Simulate the values of X using the 3-digit random
numbers.
Solution
1
α <n<β
f (x ) = β −α
0 elsewhere
0 x ≤α
F (x ) = x −α
β −α α <x≤β
1 x>β
X −α
F(X ) = means =
β−α
_ _
∴X = α + (β − α )
= .133, X = α + (β − α ).133
etc.
x
−
f (x ) =
1
β
e β
x>0
0 elsewhere
103
Hence the cumulative distribution function is
0 x≤0
F(x ) = − xp
1− e x>0
1
X = β ln
1− U
Since U is a random number implies 1-U is also a random number, we can as well use the
formula
1
X = β ln
U
= −β ln U.
Example 25
Solution
X = −2 ln
Taking 3 digit random numbers form table 7 page 595 row 21 col. 3, we get the random
numbers : 913, 516, 692, 007 etc.
104
Example 26
f (x ) = x − 1 < x < 1
= 0 elsewhere
Solution
x
1− x2
= − t dt =
−1
2
x
In this case F ( x ) = f (t )dt
−∞
−1 0 x
= 0 dt + − t dt + tdt
−∞ −1 0
1 x2 1+ x2
= 0+ + =
2 2 2
105
Case (iv) x>1. In this case F(x) =1
Thus
0 x ≤ −1
F(x ) =
2
1− x
2
−1 < x ≤ 0
1+ x 2
2
0 < x ≤1
1 x >1
1
Case (i) 0 ≤U <
2
1− x 2
F(x ) = = U(why ?)
2
∴ X = − 1 − 2 U (why ?)
1
Case (ii) ≤U <1
2
1+ X 2
F(X ) = =U
2
∴ X = + 2U − 1
Thus the defining conditions are :
1
If 0 ≤ U < , X = − 1 − 2U
2
and
1
If ≤ U < 1, x = + 2U − 1
2
106
Let us consider the 3 digit random numbers on page 594 Row 17 Col. 5
1
U = .726 ≥ Thus X = + 2 × .726 − 1 = 0.672
2
1
U = .281 < Thus X = − 21 − 2 × .281 = − 0.662
2
Note : Most of the computers have built in programs which generate random deviates
from important distributions. Especially, we can invoke the random deviates from a
standard normal distribution. You may also want to study how to simulate values from a
standard normal distribution by Box-Muller-Marsaglia method given on page 190 of the
text book.
Example 27
Suppose the no of hours it takes a person to learn how to operate a certain machine is a
random variable having normal distribution with µ = 5.8 and σ = 1.2. Suppose it takes
two person to operate the machine. Simulate the time it takes four pairs of persons to
learn how to operate the machine. That is, for each pair, calculate the maximum of the
two learning times.
Solution
x1 = µ + σz1
x 2 = µ + σz 2
Note
z 1 = − 2 ln (u 2 ) Cos (2πµ 1 )
z 2 = − 2 ln u 2 Sin (2πu 1 )
U1 U2 Z1 Z2 X1 X2
.729 .016 -0.378 -0.991 5.346 4.611
etc.
Review Exercises
f (x ) =
(
k 1− x 2 ) 0 < x <1
0 elsewhere
Solution
∞ 1
f ( x )dx = 1 gives w s ( )
k 1 − x 2 dx = 1
−∞ 0
1
or k 1 − =1
3
3
∴k =
2
108
The cumulative distribution function F(x) of X is:
Case (i) x ≤ 0 ∴ F (x ) = 0
x
Case (ii) 0 < x ≤ 1 , F(x ) = ( )
k 1 − t 2 dt
0
3 x3
= x− .
2 3
(0.5) − (0.5)
3
3
= 1 − F(0.5) = 1 −
2 3
5.113: The burning time X of an experimental rocket is a r.v. having the normal
distribution with µ = 4.76 sec and σ = 0.04 sec . What is the prob that this kind of rocket
will burn
(a) <4.66 Sec
(b) > 4.80 se
(c) anywhere from 4.70 to 4.82 sec?
Solution
X − µ 4.66 − 4.76
(a) P(X < 4.66 ) = P <
σ 0.04
= P(Z < −0.25) = 1 − P(Z < 0.25)
109
X − µ 4.80 − 4.76
(b) P(X > 4.80 ) = P >
σ 0.04
5.11 The prob density of the time (in milliseconds) between the emission of beta particles
is a r.v. X having the exponential density
(a) The time to observe a particle is more than 200 microseconds (=200x 10-3
milliseconds)
(b) The time to observe a particle is < 10 microseconds
Solution
(a) (
P(> 200 micro sec ) = P X > 200 × 10 −3 milli sec )
∞
= [
0.25e −0.25 x dx = − e − 0.25 x ]
∞
200×10 − 3
−3
200×10
−3
= e −50×10
110
(b) P(X < 10 micro sec onds ) = P X < 10 × 10 −3 ( )
10×10 −3
= [
0.25 e − 0.25 x dx = − e −0.25b ] 10×10 − 3
0
0
−3
= 1 − e − 2.5×10
5.120: If n sales people are employed in a door-to-door selling campaign, the gross sales
volume in thousands of dollars may be regarded as a r.v. having the Gamma distribution
1
with α = 100 n and β = . If the sales costs are $5,000 per salesperson, how many
2
sales persons should be employed to maximize the profit.
Solution
5.122: Let the times to breakdown for the processors of a parallel processing machine
have joint density
where X is the time for the first processor and Y is the time for the 2nd processor. Find
111
Solution
∞ ∞
= g (x ) = f (x , y )dy = 0.04e − 0.2 x − 0.2 y dy
y = −∞ y =0
∞
− 0.2 x
= 0 .2 e 0.2e − 0.2 y dy = 0.2e − 0.2 x , x > 0
y=0
(and = 0 if x ≤ 0 )
1
Since X (& Y) have exponential distributions (with parameters = 5 ) E(X)
0 .2
= E(Y) = 5.
∞ ∞
E(X + Y ) = (x + y ) f (x, y )dydx
−∞ −∞
∞ ∞
= (x + y )(0.04)e −0.2 x −0.2 y dydx
x =0 y = 0
∞ ∞
= x.0.04e − 0.2 x − 0.02 y dydx
x =0 y = 0
112
∞ +∞
+ y × 0.04e − 0.2 x − 0.2 y dydx
x =0 y =0
= 5 + 5 = 10 (verify!)
= E(X ) + E(Y )
5.123: Two random variable are independent and each has binomial distribution with
success prob 0.7 and 2 trials.
Solution
Let X,Y be independent and have Binomial distribution with parameters n = 2, and
p = 0.7 Thus
2
P(X = k ) = (0.7 )k (0.3)2− k k = 0,1,2
k
2
P(Y = r ) = (0.7 )r (0.3)2− r r = 0,1,2
r
2 2
= (0.7 )k + r (.3)4−(k + r )
k r
0 ≤ k, r ≤ 2
113
(b) P(Y > X )
2 2 2
= (0.7 )2 (.3)0 (0.7 )0 (0.3)2 + (0.7 )1 (0.3)1
2 0 1
2 2
+ (0.7 )1 (0.3)1 (0.7 )0 (0.3)2
1 0
5.124 If X1 has mean – 5, variance 3 while X2 has mean 1 and variance 4, and the two are
independent, find
(a) E(3X 1 + 5X 2 + 2)
Ans:
(a) 3 (− 5) + 5(1) + 2 = −8
(b) 9 × 3 + 25 × 4 = 127
114