Transcript Document

Handout Ch3 實習
微積分複習
•
•
•
•
•
•
•
•
dxn/dx=nxn-1
dC/dx=0
dlnx/dx=1/x
dex/dx=ex
dx/dy=0
∫xndx=(1/n+1)xn+1+C
∫exdx=ex+C
∫(1/x)dx=ln∣x ∣+C
微積分笑話一
•
•
•
•
•
•
•
•
•
•
•
某天,一位同學和微積分教授說:
「教授啊,我今天心情很不好耶…」
教授就說:「那我用微積分來幫你卜卦看看好不好?」
於是,教授就要求同學隨意寫下兩個字,
同學雖然半信半疑,但是還是寫了「麻煩」二字。
教授看了之後,笑笑的說:「你一定是被爸媽罵了。」
同學大驚:「哇塞!教授,你怎麼那麼厲害,一下就猜到了!」
「你別急,我來慢慢解釋給你聽。」教授不急不徐地解釋:
「首先我們先用一次微分把麻煩的「麻」字的蓋子微掉,
不就剩下「林」了嗎?然後也把「煩」這個字用二次微分,
分別把「火」和「┬」去掉,剩下的字就是「貝」。」
「此時我們可以得到「林貝」二字,這就說明你被你爸罵了!」
正當同學張大嘴巴說不出話來時,教授又繼續說了下去。
「還沒完喔,現在再把剩下的「貝」字再做一次微分,
把下面的「八」去掉,就得到「目」這個字。」
「因此我們又得到「林目」二字,這說明你也有被你媽媽罵!」
微積分笑二
• 某天上微積分課時,教授提到了在座標軸上的積分,
學生們看著滿滿的黑板公式,趕緊在下面抄筆記,
但是心似乎都不放在課堂之上。
• 講到一半,教授問一位女同學:「先積甚麼?」
• 女同學被突如其來的問話嚇了一跳,緊接著說她不會,
教授再問全班同學,也沒有人回答。
• 這時教授突然大吼一聲:「雞歪啦!連這個都不會。」
• 全班同學當場嚇了一大跳,教授竟然開口飆髒話!
• 結果仔細一看,才發現教授正在積y軸…
微積分笑話三
• 有一位數學家得了精神病,他覺得自己是微分的主宰者,
朋友們將他送到精神病院希望他能好起來。
• 每天,這位數學家都會在院內四處閒逛,只要遇到其他病人,
他就會恐嚇地說:「我要把你微分掉!」
• 有一天,院裡來了一個新病人,像往常一樣地,
他瞪著那位病人大聲吼:「我要把你微分掉!」
但這次,那位病人的表情一點也不變。
• 數學家十分訝異,提起精神來狠狠地盯著那位新病人,
更大聲地說:「我要把你微分掉!」
但那位病人依然一點反應也沒有。
• 數學家氣極了,最後他放聲大叫:「我要把你微分掉!」
• 病人平靜地看了數學家一眼,他說:
• 「你想怎麼微分我都無所謂,因為我是e的x次方。」
微積分笑話四
• 某天,常數函數C和指數函數e的x次方走在街上,
遠遠地,他們看到微分運算元朝他們這邊走了過來。
• 常數函數嚇得慌忙躲藏起來,緊張地說:
「被它微分一下,我就什麼都沒有啦!」
• 指數函數則是不慌不忙地說:
「它可不能把我怎麼樣,我可是e的x次方耶!」
• 終於,指數函數和微分運算元在路中相遇了。
• 指數函數首先自我介紹道:「你好,我是e的x次方!」
• 而微分運算元也微笑地自我介紹:
• 「你好,我是d/dy!」
1.
• Suppose that the p.d.f of a random variable X is as follows:
3

cx for1  x  2
f ( x)  

0 otherwise
• a. Find the value of constant c and sketch the p.d.f
• b. Find the value of Pr(X>3/2)
Solution
a.
2
3
cx
 dx  1
1
1 4 2
cx 1  1
4
1
c ( 2 4  1)  1
4
4
c
15
b.
3
Pr( X  )
2
2


4 3
x dx
15
3
2

1 4
x
15
2
3
2

4 3
x
15
4
f ' ( x)  x 2 when1  x  2, f' (x)  0
5
8
f ' ' ( x)  x when1  x  2, f' ' (x)  0
5
4
32
f( 1 ) 
f( 2 ) 
15
15
f ( x) 
35
48
32
15
4
15
Cumulative Distribution Function
• The cumulative distribution function (c.d.f.) or distribution
function (d.f.) of a random variable X (discrete or continuous) is
a function defined for each real number x as follow:
F ( x)  Pr(X  x) for    x  
• Discrete distribution
F ( x)  Pr(X  x)   f (t )
tx
• Continuous distribution
x
F ( x)  Pr( X  x)   f (t )dt
f ( x)  F ( x) 
dF ( x)
dx
Determining Probabilities from the c.d.f.
• For every x, Pr(X > x) = 1-F(x)
F ( x)  0
lim F ( x)  1
• xlim
 
x 
• For all x1 and x2 such that x1 < x2, then Pr(x1  X  x2 )  F ( x2 )  F ( x1 )
• For each x, Pr(X  x)  F ( x  )
• For every x,Pr(X  x)  F ( x)  F ( x  )
For example,Pr(X  x1 )  z1  z0 ,
Pr(X  x3 )  z3  z 2
and the probability of every
other individual value of X is 0.
2.
• Suppose that the d.f. F of a random variable X is as
sketched as follows. Find each of the following
probabilities
a. Pr(X=2)
b. Pr(2<=x<=5)
c. Pr(X>=5)
d. Pr(X=4)
e. Pr(1<x<=2)
f. Pr(2<=X<=4)
0.8
0.7
0.3
0.2
1
2
4
5
Solution

a.Pr( X  2)  F (2)  F (2 )  0.3  0.3  0
b.Pr(2  X  5)  F (5)  F (2  )  1  0.3  0.7
c.Pr( X  5)  1  1  0
d .Pr( X  4)  F (4)  F (4  )  0.8  0.7  0.1
e.Pr(1  X  2)  F (2)  F (1)  0.3  0.3  0
f .Pr(2  X  4)  F (4)  F (2  )  0.8  0.3  0.5
3.
• Suppose that the joint p.d.f of two random variables X and Y as
follows:
5 2
2
(
x

y
)
for
0

y

1

x
,

f ( x, y)   4

0 otherwise
Determine Pr(0<=X<=1/2)
雙重積分複習
• 0≦y ≦1-x,0≦x≦1
• 1 1 y
  dxdy
•
0 0
1 1 x
  dydx
0 0
y=1-x
Solution
1
Pr(0  X  )
2
1
1 x 2 5
 2 
( x 2  y )dydx
0 0
4
1
5 2
5 2 1 x2
2
  ( x y  y ) 0 dx
0 4
8
1
5 2
5
2
2
  [ x (1  x )  (1  x 2 ) 2 ]dx
0 4
8
1
5 5 4
79
2
  (  x )dx 
0 8
8
256
Independent Random Variables
• Two random variables (discrete or continuous) X and Y are
independent if, for every two sets A and B of real numbers,
Pr(X  A and Y  B)  Pr(X  A) Pr(Y  B)
• Two random variables X and Y are independent if and only
if, for all real numbers x and y,
Pr(X  x and Y  y)  Pr(X  x) Pr(Y  y)
F ( x, y)  F1 ( x) F2 ( y)
• X and Y are independent if and only if, for all real numbers x
and y,
f ( x, y)  f1 ( x) f 2 ( y)
Independent Random Variables
• Suppose X and Y are random variables that have a continuous joint
p.d.f. Then X and Y will be independent if and only if, for    x  
and    y  , f ( x, y)  g1 ( x) g 2 ( y)
• Proof:
f ( x, y )  g1 ( x ) g 2 ( y )




Then 1    f ( x, y )dxdy   g1 ( x)dx  g 2 ( y )dy  C1C2


where C1   g1 ( x)dx and C2   g 2 ( y )dy. Also,

f1 ( x)   f ( x, y )dy  C2 g1 ( x),

f 2 ( y )   f ( x, y )dx  C1 g 2 ( y )
Since C1C2  1, we thus see that f ( x, y )  f1 ( x) f 2 ( y )
4.
• Suppose that X and Y have a discrete joint distribution for which the
joint p.f. is defined as follow:
1
 ( x  y ), x  0,1y  0,1
f ( x, y )   4

0, otherwise
• a. Determine the marginal p.f.’s of X and Y
• b. Are X and Y independent?
Solution
1
1
b. f ( x, y )  ( x  y )  f ( x) f ( y )  (2 x  1)( 2 y  1)
4
16
5.
• Suppose that the joint p.d.f of two random variables X and Y is as
follows:
3
 (4  2 x  y) forx  0, y  0and2 x  y  4
f ( x, y)  16

0, otherwise
• Determine (a) the conditional p.d.f of Y for every given value of X,
and (b)
Pr (Y  2 X  0.5)
Solution
42 x
3
3
(4  2 x  y )dy  (8  8 x  2 x 2 )
0
16
16
 4  2x  y
for 0  y  4  2 x
f ( x, y ) 
2
So, g 2 ( y | x) 
 8  8x  2 x
f1 ( x) 
otherwise
 0
f1 ( x)  
4  2x  y
1
dy

2 8  8x  2 x 2
9
Pr Y  2 | X  0.5   g 2  y | 0.5dy  
3
2
3