review midtermii summer09
TRANSCRIPT
-
7/28/2019 Review MidtermII Summer09
1/51
Introduction to Probability and Statistics
Probability & Statistics for Engineers & Scientists, 8th Ed.
2007
Review II
Instructor: Kuo-Jung Lee
TA: Brian Shea
The pdf file for this class is available on the class web page.
http://www.stat.umn.edu/~kjlee/STAT3021_Summer2009.html
1
-
7/28/2019 Review MidtermII Summer09
2/51
Marginal Distribution
The marginal distributions of X alone and of Y alone are
Discrete case:
g(x) =
yf(x, y) and h(y) =
x
f(x, y),
Continuous case:
g(x) =
f(x, y)dy and h(y) =
f(x, y)dx,
2
-
7/28/2019 Review MidtermII Summer09
3/51
Conditional Distribution
Let X and Y be two random variables, discrete or continuous.
The conditional distribution of the random variable Y given
that X = x is
f(y|x) = f(x, y)g(x)
, g(x) > 0,
Similarly the conditional distribution of the random variable X
given that Y = y is
f(x|y) = f(x, y)h(y)
, h(y) > 0.
3
-
7/28/2019 Review MidtermII Summer09
4/51
Statistical Independent
Let X and Y be two random variables with joint probability dis-
tribution f(x, y) and marginal distributions g(x) and h(y), respec-tively. The random variables X and Y are said to be statistically
independent if and only if
f(x, y) = g(x)h(y)
for all (x, y) within their range.
4
-
7/28/2019 Review MidtermII Summer09
5/51
Example 1
Consider the following joint probability density function of the
random variables X and Y
f(x, y) =
12ye
x, 0 < x, 0 < y < 2;0, elsewhere.
1. Find the marginal density functions of X and Y.
2. Are X and Y are independent?
3. Find P(X > 2).
5
-
7/28/2019 Review MidtermII Summer09
6/51
Solution:
1.
g(x) =
yf(x, y)dy = ex, x > 0;
h(y) =
xf(x, y)dy =
y
2, 0 < y < 2.
2. Since f(x, y) = g(x)h(y), they are independent.
3.
P(X > 2) = e2.
-
7/28/2019 Review MidtermII Summer09
7/51
Definition: Expectation
Let X be a random variable with probability distribution f(x).
The mean or expected value of X is:
if X is discrete = E(X) =
x
xf(x)
if X is continuous
= E(X) =
xf(x)dx
6
-
7/28/2019 Review MidtermII Summer09
8/51
Theorem
Let X be a random variable with probability function f(x). The
expected value of the random variable g(X) is
Discrete: if X is discreteg(X) = E[g(X)] =
x
g(x) f(x)
Continuous: if X is continuous
g(X) = E[g(X)] =
g(x) f(x)dx
7
-
7/28/2019 Review MidtermII Summer09
9/51
Definition
Let X and Y be random variables with joint probability distribu-
tion f(x, y). The mean or expected value of g(X, Y) is:
if X and Y are discreteg(X,Y) = E[g(X, Y)] =
x
y
g(x, y)f(x, y)
if X and Y are continuousg(X,Y) = E[g(X, Y)] =
g(x, y)f(x, y)dxdy
8
-
7/28/2019 Review MidtermII Summer09
10/51
Definition: Variance
Let X be a random variable with probability function f(x) and
mean . The variance of the random variable X is
Discrete: if X is discrete2 = Var(X) = E[(X )2] =
x(x )2 f(x)
Continuous: if X is continuous
2
= Var(X) = E[(X )2
] =(x )
2
f(x)dx
The positive square root of the variance, , is called the stan-
dard deviation of X.9
-
7/28/2019 Review MidtermII Summer09
11/51
Theorem
The variance of a random variable X is
2 = Var(X) = E(X2) 2
10
-
7/28/2019 Review MidtermII Summer09
12/51
Theorem
Let X be a random variable with probability function f(x). The
variance of the random variable g(X) is
Discrete: if X is discrete2g(X) = E[g(X) g(X)]2 =
x
[g(x) g(X)]2 f(x)
Continuous: if X is continuous
2g(X) = E[g(X) g(X))]2 =
[g(x) g(X))]2 f(x)dx
11
-
7/28/2019 Review MidtermII Summer09
13/51
Definition: Covariance
Let X and Y be random variables with joint probability distribu-
tion f(x, y). The covariance of the random variables X and Y
is
Discrete: if X and Y are discrete is discreteCov(X, Y) = E(XX)(yY) =
x
y
(xx)(yy)f(x, y)
Continuous: if X and Y are continuousCov(X, Y) = E(XX)(yY) =
(xx)(yy)f(x, y)dxdy
12
-
7/28/2019 Review MidtermII Summer09
14/51
Theorem
The covariance of two random variables X and Y with means
X and Y, respectively, is given by
XY = Cov(X, Y) = E(XY) XY.
13
-
7/28/2019 Review MidtermII Summer09
15/51
Theorem
If a and b are constants, then
E(aX + b) = aE(X) + b E(aX + bY) = aE(X) + bE(Y).
Theorem
The expected value of the sum or difference of two or morefunctions of two random variable X and Y is the sum or difference
of the expected values of the functions. That is,
E[g(X) h(Y)] = E[g(X)] E[h(Y)].Theorem
Let X and Y be two independent random variables. Then
E(XY) = E(X)E(Y).
14
-
7/28/2019 Review MidtermII Summer09
16/51
Theorem
If a and b are constants, then
2aX+b = Var(aX + b) = a2Var(X).
Theorem
If X and Y are random variables with joint probability distribution
f(x, y) and a and b are constants, then
2aX+bY = Var(aX+bY) = a2Var(X)+2abCov(X, Y)+b2Var(Y)
Cov(aX + b,cY + d) = acCov(X, Y)
15
-
7/28/2019 Review MidtermII Summer09
17/51
Example 2
Consider the following joint probability density function of the
random variables X and Y
f(x, y) = 1
2yex
, 0 < x, 0 < y < 2;0, elsewhere.
1. Find means and variance X and Y.
2. Find covariance of X and Y.
16
-
7/28/2019 Review MidtermII Summer09
18/51
Solution:
1.
E(X) =
0xg(x)dx = 1;
Var(X) = 1.
E(Y) =2
0yh(y)dy =
1
6;
Var(Y) = E(Y2) (16
)2 =7
72.
2. Since f(x, y) = g(x)h(y), they are independent. Cov(X, Y) =
0.
17
-
7/28/2019 Review MidtermII Summer09
19/51
Example 3
Let X and Y have joint probability density function (p.d.f.)
f(x, y) = 3x2y
32 , if 0 < x < 2 and 1 < y < 3;
0, otherwise.
1. Find the marginal probability density functions of X and Y,
respectively, and determine if X and Y are independent ?
2. Calculate Cov(0.652X,
17Y).
18
-
7/28/2019 Review MidtermII Summer09
20/51
Solution:
1.
g(x) = 3
1
3x2y
32
dy =3x2
8
, 0 < x < 2;
h(y) =2
0
3x2y
32dy =
y
4, 1 < y < 3.
Since f(x, y) = g(x)h(y), they are independent.
2. Since X and Y are independent from (a), Cov(X, Y) = 0.
Cov(0.652X,
17Y) = 0.652
17 Cov(X, Y) = 0.
19
-
7/28/2019 Review MidtermII Summer09
21/51
Example 4
Let X and Y be jointly distributed with (X, Y) = 1/2, X = 2,
andY
= 3. Find Var(2X
4Y
+ 3).
Solution:
Var(2X 4Y + 3) = Var(2X 4Y)= 22Var(X) + 2 2 (4)Cov(X, Y) + 42Var(Y)= 132.
20
-
7/28/2019 Review MidtermII Summer09
22/51
Markovs Inequality
Let X be a nonnegative random variable; then for any t > 0,
P(X t) E(X)t
.
Theorem (Chebyshevs Inequality)
The probability that any random variable X will assume a value
within k standard deviations of the mean is at least 1 1k2
. That
is,
P( k < X < + k) 1 1k2
21
-
7/28/2019 Review MidtermII Summer09
23/51
Discrete Probability Distributions
Name Notation P.D.F. f(x) = P(X = x)Uniform 1k , x = x1, . . . , xk.
Bernoulli Ber(p) px(1 p)1x, x = 0, 1.Binomial Bin(n, p) px(1 p)nx, x = 0, 1, . . . , n
Multinomial nx1, x2, . . . , xk
px11 px22 p
xk
kGeometric Geo(p) pqx1, x = 1, 2, 3, . . . .
Negative Binomial NB(k, p)
x 1k 1
pkqxk, x = k, k + 1, . . . .
Hypergeometric Hyp(N , n , k)
k
x
N kn x
Nn
Poisson Poi(t) et(t)x
x! , x = 0, 1, 2, . . . .
22
-
7/28/2019 Review MidtermII Summer09
24/51
Discrete Probability Distributions
Name Mean Variance M.G.F.
Bernoulli p p(1
p) pet + qBinomial np np(1 p) (pet + q)n
Geometric 1p1pp2
pet
1qet
Negative Binomial kpk(1p)
p2
pet
1
qet
k
Poisson t t e(es1)
23
-
7/28/2019 Review MidtermII Summer09
25/51
Example 5: Binomial Distribution
The probability that a student is accepted to a prestigious college
is 0.3. If 5 students from the same school apply, what is the
probability that at most 2 are accepted?
Solution:
To solve this problem, we compute 3 individual probabilities,
using the binomial formula. The sum of all these probabilities
is the answer we seek. Let X be the number of students are
accepted, X
Bin(5, 0.4). Thus,
P(X 2) =2
x=0
b(x; 5, 2) = 0.8369.
24
-
7/28/2019 Review MidtermII Summer09
26/51
Example 6: Multinomial Distribution
Suppose a card is drawn randomly from an ordinary deck ofplaying cards, and then put back in the deck. This exercise is
repeated five times. What is the probability of drawing 1 spade,
1 heart, 1 diamond, and 2 clubs?
Solution:
The experiment consists of 5 trials, so n = 5.
The 5 trials produce 1 spade, 1 heart, 1 diamond, and 2clubs; so n1 = 1, n2 = 1, n3 = 1, and n4 = 2.
On any particular trial, the probability of drawing a spade,heart, diamond, or club is 0.25, 0.25, 0.25, and 0.25, respec-
tively. Thus, p1 = 0.25, p2 = 0.25, p3 = 0.25, and p4 = 0.25.
25
-
7/28/2019 Review MidtermII Summer09
27/51
5
1, 1, 1, 3
(0.25)1(0.25)1(0.25)1(0.25)3 = 0.05859.
Thus, if we draw five cards with replacement from an ordinary
deck of playing cards, the probability of drawing 1 spade, 1 heart,
1 diamond, and 2 clubs is 0.05859.
-
7/28/2019 Review MidtermII Summer09
28/51
Example 7: Hypergeometric Distribution
Suppose we randomly select 5 cards without replacement from
an ordinary deck of playing cards. What is the probability of
getting exactly 2 red cards (i.e., hearts or diamonds)?
Solution:
This is a hypergeometric experiment in which we know the fol-
lowing:
N = 52; since there are 52 cards in a deck.
k = 26; since there are 26 red cards in a deck.
n = 5; since we randomly select 5 cards from the deck.26
-
7/28/2019 Review MidtermII Summer09
29/51
x = 2; since 2 of the cards we select are red.
We plug these values into the hypergeometric formula as follows:
h(X = x; N , n , k) =
kx
N kn
x
Nn
h(X = 2; 52, 5, 26) =
262
52 26
5
2
525
= 0.32513.
-
7/28/2019 Review MidtermII Summer09
30/51
Example 8: Negative Binomial & Geometric Distributions
Bob is a high school basketball player. He is a 70% free throw
shooter. That means his probability of making a free throw is
0.70. During the season, what is the probability that Bob makes
his third free throw on his fifth shot?Solution:
This is an example of a negative binomial experiment. The
probability of success p is 0.70, the number of trials x is 5, and
the number of successes k is 3.
nb(5;3, 0.7) =
42
(0.7)3(0.3)2 = 0.18522.
27
-
7/28/2019 Review MidtermII Summer09
31/51
Example 9: Poisson Distribution
The average number of homes sold by the Acme Realty companyis 2 homes per day. What is the probability that exactly 3 homes
will be sold tomorrow?
Solution:
This is a Poisson experiment in which we know the following:
= = 2; since 2 homes are sold per day, on average.
t = 1; since unit time is one day.
x = 3; since we want to find the likelihood that 3 homes willbe sold tomorrow.
p(x = 3; t = 2) = 0.180
28
-
7/28/2019 Review MidtermII Summer09
32/51
Continuous Probability Distributions
Name Notation P.D.F. f(x)
Uniform U[a, b] 1ba, a x b.
Normal N(, 2)1
2 exp{(x
)2
22 }, < x < .Exponential Exp() 1e
x/, x > 0.Gamma (, ) 1
()x1ex/, x > 0.
Chi-Squared 2 =
2, 2
1
2/2(/2)x/21ex/2, x > 0.
Lognormal LogN(, 2) 1x
2e 122 [ln(x)]2, x > 0
29
-
7/28/2019 Review MidtermII Summer09
33/51
Continuous Probability Distributions
Name Mean Variance M.G.F.
Uniform a+b2 (ba)2
12
Normal 2 exp{t + 2t22 }Exponentail 2
Gamma 2
Chi-Squared 2
30
-
7/28/2019 Review MidtermII Summer09
34/51
Normal Approximation to the Binomial-I
Let X be a binomial random variable with parameters n and p.
Then X has approximately a normal distribution with = np and
2 = npq = np(1 p) and
P(X x) = xk=0
b(k; n, p) (1)
area under normal curve to the left of x + 0.5 (2) P
Z x + 0.5 np
npq
(3)
where Z N(0, 1), and the approximation will be good if np andn(1 p) are greater than or equal to 5.
31
-
7/28/2019 Review MidtermII Summer09
35/51
Normal Approximation to the Binomial-II
Let X be a binomial random variable with parameters n and p.
Then X has approximately a normal distribution with = np and
2 = npq = np(1 p) and
P(x1 X x2) =x2
k=x1b(k; n, p)
area under normal curve tothe right ofx1 0.5 and left ofx2 + 0.5.
Px1 0.5 npnpq Z
x2 + 0.5 npnpq
where Z N(0, 1), and the approximation will be good if np andn(1 p) are greater than or equal to 5.
32
-
7/28/2019 Review MidtermII Summer09
36/51
Memorylessness for Geometric & Exponential Distribution
A nonnegative random variable X is called memoryless if for all
s, t 0,P(X t) = P(X t + s|X s)
33
-
7/28/2019 Review MidtermII Summer09
37/51
Example 10
The position X of the first defect on a digital tape (in cm)
has the exponential distribution with mean = 50. Find the
probability that X < 200 given X > 150.Solution:
P(X < 200|X > 150) = 1 P(X > 200|X > 150)= 1 P(X > 50)
= 1 e1
.
34
-
7/28/2019 Review MidtermII Summer09
38/51
Example 11
The lifetime of a TV tube (in years) is an exponential random
variable with mean 10. If Jim bought his TV set 10 years ago,what is the probability that its tube will last another 10 years?
Solution:
Let X be the lifetime of a TV tube. X Exp( = 10).P(X > 20
|X > 10) = P(X > 10) = e1.
35
-
7/28/2019 Review MidtermII Summer09
39/51
Example 12
Let the probability density function of a random variable X be
f(x) =1
2
2e(x2)2
222 , if < x < .
Show that
P(|X 2| < 4) 34
.
Solution:
Since
X N(2, 22),by Chebyshevs inequality, we have
P(|X 2| < 4) = P(|X 2| < 2 2) 1 122
34
.
36
-
7/28/2019 Review MidtermII Summer09
40/51
If we are sampling from a population with unknown distribu-
tion, either finite or infinite, the sampling distribution of X will
be approximately normal with mean and variance 2/n pro-
vided that the sample size is large (n > 30).
Central Limit Theorem
If X is the mean of a random sample of size n taken from a
population with mean and finite variance 2, then the limiting
form of the distribution of
Z =
X /nas n , is the standard normal distribution N(0, 1).
37
-
7/28/2019 Review MidtermII Summer09
41/51
Example 13
A pair of fair 4-sided dice is rolled 192 times. Let T be the
number that a total of 5 occurs.
1. Find the probability function of T?
2. What are the mean (expected value) and variance of T?
3. What is the probability that a total of 5 occurs at most 49
times?
38
-
7/28/2019 Review MidtermII Summer09
42/51
Solution:
1. T Bin
192, 14
. That is
f(x) =
nx
1
4
x 34
192x, x = 0, . . . , 192.
2. E(T) = 48, Var(T) = 36
3. Normal Approximation to Binomial:
P(T 49) P
T 486