Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
1
Lecture 10! Variance
! Property of Variances
! The variances of Bernoulli, Binomial and Poisson Distributions
! The Exponential Distribution
2
Variance (Measures of Dispersion)Example 1:甲乙两个女声小合唱队(chorus team)都由五名队员组成,她们的身高为:
甲队:160cm, 162cm, 159cm, 160cm, 159cm乙队:180cm, 160cm, 150cm, 150cm, 160cm
两队的身高的mean=160cm.
Which one would you choose?
3
Variance (Measures of Dispersion)
Example 2:The number of working days required to fill orders from two suppliers.
9 10 11
Number of Working Days
Rel
ativ
e Fr
eque
ncy
0
.1
.2
.3
.4
.5
Dawson Supply, Inc.
7 8 9 10 11 12 13 14 15
Number of Working Days
Rel
ativ
e Fr
eque
ncy
0
.1
.2
.3
.4
.5
J.C. Clark Distributors
Mean=10.3
Which one would you choose?
4
最重要的变异程度的度量,反映了关于平均值的变异程度
方差(Variance)
标准差(Stand. Dev.)
变异程度的度量: 方差和标准差
( )22 , iX
Nµ
s µ-
=å 其中, 是均值。
2s s=
5
1 2 3 4
[ ] 4 ), 44 1, 2, 3, 4
Nx x x x
=
= = = =
例1设一个总体,含有 个元素(个体 即总体个数 。
个个体分别为 。
( ) ( ) ( ) ( ) ( )2 2 2 2 22 1 2.5 2 2.5 3 2.5 4 2.5= = 1.25
4xNµ
s- - + - + - + -
=å
总体方差的两种算法:
(1)观察到总体中所有的元素
( )( )( ) ( )
( ) ( ) ( ) ( )
2
2
2
2 2 2 2
2
=1 1 1 1= 1 2.5 + 2 2.5 + 3 2.5 + 4 2.54 4 4 4
=1.25
Var X
E X
x f x
s
µ
µ
=
= -
-
- ´ - ´ - ´ - ´
å
( )知道总体分布
( )=2.5E Xµ =
总体的方差的两种算法
6
另一个例子
1 2 3 4
4 ), 44 1, 2, 2, 3
Nx x x x
=
= = = =
设一个总体,含有 个元素(个体 即总体个数 。 个个体分别为 。请问:总
体的方差是多少?
7
! The variance is the average of the squared deviations(the difference between data value and the mean).Formally, suppose X has mean . The varianceof X, is defined as:
• It follows that• If the possible values of X are bounded, then
Var(X) must exist.• The variance provides a measure of the spread or
dispersion of the distribution around its mean.• The variance can be affected greatly by extreme
values.
)(XE=µ
])[()( 2µ-= XEXVar0)( ³XVar
8
• The standard deviation is defined to be thenonnegative square root of the variance.
• Generally, the standard deviation of a givenrandom variable is denoted by , and the varianceis denoted by .
s2s
9
Properties of Variance
Theorem. The variance of a constant is 0.
10
Theorem. For any constants a and b,
)()( 2 XVarabaXVar =+
11
Proof. If E(X)=µ, then E(aX+b)=aµ+b. So
Note: Var(X+b)=Var(X)Var(-X)=Var(X)
)(])[(])[(
])[()(
2
22
2
2
XVaraXEaaaXE
babaXEbaXVar
=
-=
-=
--+=+
µ
µ
µ
12
Theorem. For any random variable X,
22 )]([)()( XEXEXVar -=
13
Proof. Let E(X)=µ. Then
22
22
22
2
)()(2)()2(
)][()(
µ
µµ
µµ
µ
-=
+-=
+-=
-=
XEXEXE
XXEXEXVar
14
Theorem. If X1,...,Xn are independent random variables, then
1 1( ... ) ( ) ... ( ).n nVar X X Var X Var X+ + = + +
15
Proof. Suppose first n=2. If E(X1)=µ1, E(X2)=µ2then E(X1+X2)= µ1+µ2So
The theorem can be established for any positive number n by an induction argument.
21 2 1 2 1 2
2 21 1 2 2 1 1 2 2
1 2 1 1 2 2
1 2 1 2
( ) ( )
( ) ( ) 2( )( )
( ) ( ) 2 ( ) ( )( ) ( ) 2 0 ( ) ( )
Var X X E X X
E X X X X
Var X Var X E X E XVar X Var X Var X Var X
µ µ
µ µ µ µ
µ µ
é ù+ = + - -ë ûé ù= - + - + - -ë û
= + + - -= + + × = +
16
! Corollary. If X1,...,Xn are independent randomvariables and if a1,...,an and b are arbitraryconstants, then
2 21 1 1 1( ) ( ) ( )n n n nVar a X a X b a Var X a Var X+ + + = + +L L
17
Example! Suppose X can take each of the five values –2,
0, 1, 3, and 4 with equal probability. What is the standard deviation of Y=4X-7?
18
Solution! X can take each of the five values –2, 0, 1, 3,
and 4 with equal probability. What is the standard deviation of Y=4X-7?• E(X)=(1/5)*(-2+0+1+3+4)=1.2• E( )=• Var(X)= =4.56• Var(Y)=16Var(X)=72.96• The standard deviation of Y is
2X 2 2 2 2 21/ 5 [( 2) 0 1 3 4 ] 6´ - + + + + =( )
54.896.72 ==s
22 )]([)( XEXE -
19
Variance of The Bernoulli Distribution
! A random variable X has a Bernoullidistribution with parameter p if X can take onlythe values 0 and 1 with probabilities:
Pr(X=1)=p and Pr(X=0)=q=1-p.
! The p.f. of X can be written as:
! E(X)=p! Var(X)=?
îíì =
=-
otherwise0,1,0for
)|(1 xqp
pxfxx
20
Variance of The Binomial Distribution! If the random variables X1,...,Xn form n Bernoulli
trials with parameter p, and if X= X1+…+Xn, then Xhas a Binomial distribution with parameters n and p.
! The p.f. for a random variable having binomialdistribution with parameters n and p is
! E(X)=np! Var(X)=?
ïî
ïíì
=÷÷ø
öççè
æ=
-
otherwise
for
0
n,,1,0xqpxn
)p,n|x(fxnx
!
21
Variance of The Poisson Distribution! A nonnegative random variable X has a
Poisson distribution with mean l (l>0) if the p.f. of X is as follows:
Note:
ïî
ïíì
==
-
otherwise0
,2,1,0for!)|( !xx
exf
xll
l
1!
)|(00
=== -¥
=
-¥
=åå lll ll eex
exfx
x
x
22
Example! We are interested in the number of people
who buy McDonald’s food in any 15 minutesin the morning of Sundays. Using historicaldata, we know that averagely there are 10people buying McDonald’s food in 15minutes.
! Here we can assume the number of peoplefollows a Poisson(10) distribution.
23
24
l
ll
llllll
ll
llllll
ll
lll
lll
=-=
+=+-=
==-
=-=
-=-=-
==-
==
==
ååå
åå
ååå
åå
¥
=
-¥
=
--¥
=
-
¥
=
¥
=
¥
=
-¥
=
--¥
=
-
¥
=
¥
=
22
22
2
0
2
2
22
2
20
01
1
1
10
)]([)()()()]1([)(
!)!2(!)1(
)|()1()|()1()]1([
!)!1(!
)|()|()(
XEXEXVarXEXXEXE
ye
xe
xexx
xfxxxfxxXXE
ye
xe
xex
xxfxxfXE
y
y
x
x
x
xxx
y
y
x
x
x
xxx
Variance of The Poisson Distribution
25
The Exponential Distribution! A random variable X has an exponential
distribution with parameter b (b>0) if X has acontinuous distribution with p.d.f.
îíì >
=-
otherwisexfore
xfx
00
)|(bb
b
2( ) 1/ ( ) 1/E X Var Xb b= =
26
The Rate Parameter b
1=b
2=b
3=b
27
Memoryless Property! If X has an exponential distribution with
parameter b, then for any number t>0,
For t>0 and any other number h>0,t
t
x edxetX bbb -¥ - ==³ ò)Pr(
Pr( | )X t h X t³ + ³ =?
28
Memoryless Property! If X has an exponential distribution with
parameter b, then for any number t>0,
For t>0 and any other number h>0,
• Regardless of the length of time that has elapsedwithout the occurrence of the event, theprobability that the event will occur during thenext h minutes always has the same value.
t
t
x edxetX bbb -¥ - ==³ ò)Pr(
)Pr(
)Pr()Pr()|Pr(
)(
hXeee
tXhtXtXhtX
ht
ht
³===
³+³
=³+³
--
+-b
b
b
29
Application ----- Reliability
The exponential distribution is often used in reliability studies as
the model for the time until failure of a device.
For example, the lifetime of a semiconductor chip might bemodeled as an exponential random variable with a mean of40,000 hours. The lack of memory property of the exponentialdistribution implies that the device does not wear out. Thelifetime of a device with failures caused by random shocksmight be appropriately modeled as an exponential randomvariable.
However, the lifetime of a device that suffers slow mechanical
wear is better modeled by a distribution that does not lack
memory.
30
Life Tests
! n light bulbs are burning simultaneously in a test todetermine the lengths of their lives. Let Xi denote thelifetime of bulb i, i=1,...,n.
! Assume that X1,...,Xn are independent and identicallydistributed.
! Xi has an exponential distribution with parameter b.
! What is the distribution of the length of time Y1 untilone of the n bulbs fails?
31
• Y1=min{X1,...,Xn}.• For any number t>0,
The distribution of Y1 must be an exponentialdistribution with parameter nb.
1 1
1
1 1
Pr( ) Pr( , , )Pr( ) Pr( )
Then, Pr( ) 1 Pr( ) 1
, 0Thus, ( ) .
0, otherwise
n
nt t n t
n t
n t
Y t X t X tX t X t
e e eY t Y t e
n e tf t
b b b
b
bb
- - -
-
-
> = > >
= > >
= =
£ = - > = -
ì >= íî
LL
L
32
! What is the distribution of the length of timeY2 after one bulb has failed until a second bulbfails?• After one bulb has failed, n-1 bulbs remain burning.• Regardless of the time at which the first bulb failed,
the distribution of the remaining lifetime of each ofthe n-1 bulbs is still an exponential distributionwith parameter b.
• Y2 will be equal to the smallest of n-1 i.i.d. randomvariables, each of which has an exponentialdistribution with parameter b.
• It follows that Y2 will have an exponentialdistribution with parameter (n-1)b.
33
• Similarly, the distribution of the length of time Y3
after two bulbs have failed until a third bulb failswill be an exponential distribution with parameter(n-2)b.
• ...• After all but one of the bulbs have failed, the
distribution of the additional length of time untilthe final bulb fails will be an exponentialdistribuition with parameter b.