27
Handout Ch3 實

Handout Ch3 實習

  • Upload
    kylar

  • View
    129

  • Download
    6

Embed Size (px)

DESCRIPTION

Handout Ch3 實習. 微積分複習. dx n /dx=nx n-1 dC/dx=0 dlnx/dx=1/x de x /dx=e x dx/dy=0 ∫x n dx=(1/n+1)x n+1 +C ∫e x dx=e x +C ∫(1/x)dx=ln∣x ∣+C. 微積分笑話一. 某天,一位同學和微積分教授說: 「教授啊,我今天心情很不好耶 … 」 教授就說:「那我用微積分來幫你卜卦看看好不好?」 於是,教授就要求同學隨意寫下兩個字, 同學雖然半信半疑,但是還是寫了「麻煩」二字。 教授看了之後,笑笑的說:「你一定是被爸媽罵了。」 - PowerPoint PPT Presentation

Citation preview

Page 1: Handout Ch3  實習

Handout Ch3 實習

Handout Ch3 實習

Page 2: Handout Ch3  實習

Jia-Ying Chen2

微積分複習

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∣ ∣

Page 3: Handout Ch3  實習

Jia-Ying Chen3

微積分笑話一 某天,一位同學和微積分教授說: 「教授啊,我今天心情很不好耶…」 教授就說:「那我用微積分來幫你卜卦看看好不好?」                                                             於是,教授就要求同學隨意寫下兩個字,同學雖然半信半疑,但是還是寫了「麻煩」二字。

教授看了之後,笑笑的說:「你一定是被爸媽罵了。」 同學大驚:「哇塞!教授,你怎麼那麼厲害,一下就猜到了!」 「你別急,我來慢慢解釋給你聽。」教授不急不徐地解釋: 「首先我們先用一次微分把麻煩的「麻」字的蓋子微掉, 不就剩下「林」了嗎?然後也把「煩」這個字用二次微分, 分別把「火」和「┬」去掉,剩下的字就是「貝」。」

「此時我們可以得到「林貝」二字,這就說明你被你爸罵了!」 正當同學張大嘴巴說不出話來時,教授又繼續說了下去。 「還沒完喔,現在再把剩下的「貝」字再做一次微分, 把下面的「八」去掉,就得到「目」這個字。」

「因此我們又得到「林目」二字,這說明你也有被你媽媽罵!」

Page 4: Handout Ch3  實習

Jia-Ying Chen4

微積分笑二

某天上微積分課時,教授提到了在座標軸上的積分,學生們看著滿滿的黑板公式,趕緊在下面抄筆記,但是心似乎都不放在課堂之上。 

講到一半,教授問一位女同學:「先積甚麼?」  女同學被突如其來的問話嚇了一跳,緊接著說她不會,教授再問全班同學,也沒有人回答。

這時教授突然大吼一聲:「雞歪啦!連這個都不會。」 全班同學當場嚇了一大跳,教授竟然開口飆髒話! 結果仔細一看,才發現教授正在積y軸…

Page 5: Handout Ch3  實習

Jia-Ying Chen5

微積分笑話三 有一位數學家得了精神病,他覺得自己是微分的主宰者,朋友們將他送到精神病院希望他能好起來。

每天,這位數學家都會在院內四處閒逛,只要遇到其他病人,他就會恐嚇地說:「我要把你微分掉!」 

有一天,院裡來了一個新病人,像往常一樣地,他瞪著那位病人大聲吼:「我要把你微分掉!」但這次,那位病人的表情一點也不變。

數學家十分訝異,提起精神來狠狠地盯著那位新病人,更大聲地說:「我要把你微分掉!」但那位病人依然一點反應也沒有。

數學家氣極了,最後他放聲大叫:「我要把你微分掉!」  病人平靜地看了數學家一眼,他說: 「你想怎麼微分我都無所謂,因為我是e的x次方。」 

Page 6: Handout Ch3  實習

Jia-Ying Chen6

微積分笑話四

某天,常數函數C和指數函數e的x次方走在街上,遠遠地,他們看到微分運算元朝他們這邊走了過來。

常數函數嚇得慌忙躲藏起來,緊張地說:「被它微分一下,我就什麼都沒有啦!」

指數函數則是不慌不忙地說:「它可不能把我怎麼樣,我可是e的x次方耶!」

終於,指數函數和微分運算元在路中相遇了。 指數函數首先自我介紹道:「你好,我是e的x次方!」 而微分運算元也微笑地自我介紹: 「你好,我是d/dy!」

Page 7: Handout Ch3  實習

Jia-Ying Chen7

Example 1

Suppose that the p.d.f of a random variable X is as follows :

a. Find the value of constant c and sketch the p.d.f b. Find the value of Pr(X>3/2)

3 1 2( )

0

cx for xf x

otherwise

Page 8: Handout Ch3  實習

Jia-Ying Chen8

Solutiona.

b.

23

1

4 21

4 4

1

11

41

(2 1 ) 14

4

15

cx dx

cx

c

c

15

322

15

41

0(x)'f'2,x1 when 5

8)(''

0(x)f'2,x1 when 5

4)('

15

4)(

2

3

) f()f(

xxf

xxf

xxf

15

4

32

15

23

3

2

4 23

2

3Pr( )

2

4

15

1 35

15 48

X

x dx

x

Page 9: Handout Ch3  實習

Jia-Ying Chen9

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:

Discrete distribution

Continuous distribution

xxXxF for )Pr()(

xt

tfxXxF )()Pr()(

dx

xdFxFxfdttfxXxF

x )()()( )()Pr()(

Page 10: Handout Ch3  實習

Jia-Ying Chen10

Determining Probabilities from the c.d.f.

For every x, Pr(X > x) = 1-F(x) For all x1 and x2 such that x1 < x2, then

For each x,

For every x,

For example,

and the probability of every

other individual value of X is 0.

0)(lim

xFx

)()()Pr( 1221 xFxFxXx

)()Pr( xFxX

)()()Pr( xFxFxX

,)Pr( 011 zzxX

233 )Pr( zzxX

1)(lim

xFx

Page 11: Handout Ch3  實習

Jia-Ying Chen11

Example 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)

Page 12: Handout Ch3  實習

Jia-Ying Chen12

1 2 4 5

0.2

0.3

0.7

0.8

Page 13: Handout Ch3  實習

Jia-Ying Chen13

Solution

.Pr( 2) (2) (2 ) 0.3 0.3 0

.Pr(2 5) (5) (2 ) 1 0.3 0.7

.Pr( 5) 1 (5 ) 1 1 0

.Pr( 4) (4) (4 ) 0.8 0.7 0.1

.Pr(1 2) (2) (1) 0.3 0.3 0

.Pr(2 4) (4) (2 ) 0.8 0.3 0.5

a X F F

b X F F

c X F

d X F F

e X F F

f X F F

Page 14: Handout Ch3  實習

Jia-Ying Chen14

Bivariate Distributions - Discrete Joint Distributions -

The joint probability mass function, or the joint p.m.f., of X and Y is defined as

Example: Suppose the joint p.m.f. of X and Y is specified as:

.) and Pr(),( yYxXyxf

Y

X 1 2 3 4

1 0.1 0 0.1 0

2 0.3 0 0.1 0.2

3 0 0.2 0 0

4

1

2.0),1()1Pr(

5.0)4,3()3,3()2,3()4,2()3,2()2,2()2 and 2Pr(

y

yfX

ffffffYX

Page 15: Handout Ch3  實習

Jia-Ying Chen15

Bivariate Distributions- Continuous Joint Distributions -

The joint probability density function, or the joint p.d.f. of X and Y is defined as f (x, y). For every subset A of the xy-plane,

The joint p.d.f. must satisfy two conditions:

A

dxdyyxfAyx ),(),(Pr

yxyxf and for 0),(

1),( dxdyyxf

Page 16: Handout Ch3  實習

Jia-Ying Chen16

雙重積分複習

0 y 1-x,0 x 1≦ ≦ ≦ ≦

積分秘訣

依照題目給定範圍畫出圖 判斷先積 x還是先積 y比較容易

11

0 0

( , )y

f x y dxdy

1 1

0 0

( , )x

f x y dydx

y=1-x

Page 17: Handout Ch3  實習

Jia-Ying Chen17

Example 3

Suppose that the joint p.d.f of two random variables X and Y as follows:

Determine Pr(0<=X<=1/2)

otherwise

xyforyxyxf

0

,10)(4

5),(

22

Page 18: Handout Ch3  實習

Jia-Ying Chen18

Solution

2

2

11 22

0 0

12 2 12

00

12 2 2 22

0

142

0

1Pr(0 )

2

5( )

4

5 5( )4 8

5 5[ (1 ) (1 ) ]4 8

5 5 79( )8 8 256

x

x

X

x y dydx

x y y dx

x x x dx

x dx

Page 19: Handout Ch3  實習

Jia-Ying Chen19

Bivariate Cumulative Distribution Functions The joint cumulative distribution function, or joint c.d.f., of two

random variables X and Y is defined as

Note that

If X and Y have a continuous joint p.d.f., then The joint p.d.f. can be derived from the joint c.d.f. by using

). and Pr(),( yYxXyxF

).,(),(),(),(

) and Pr(

caFcbFdaFdbF

dYcbXa

),(lim)Pr()(

),(lim)Pr()(

2

1

yxFyYyF

yxFxXxF

x

y

y x

drdssrfyxF ),(),(

yx

yxFyxf

),(

),(2

Page 20: Handout Ch3  實習

Jia-Ying Chen20

If X and Y have a discrete joint distribution for which the joint p.m.f. is f, then the marginal p.m.f. f1 of X can be found as follows:

Also,

If X and Y have a joint p.d.f. f, then the marginal p.d.f. of X and Y are:

Marginal Distributions

.),() and Pr()Pr()(1 y y

yxfyYxXxXxf

x

yxfyf ),()(1

ydxyxfyf

xdyyxfxf

for ),()(

for ),()(

2

1

Page 21: Handout Ch3  實習

Jia-Ying Chen21

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,

Two random variables X and Y are independent if and only if, for all real numbers x and y,

X and Y are independent if and only if, for all real numbers x and y,

)Pr()Pr() and Pr( BYAXBYAX

)()(),(

)Pr()Pr() and Pr(

21 yFxFyxF

yYxXyYxX

)()(),( 21 yfxfyxf

Page 22: Handout Ch3  實習

Jia-Ying Chen22

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 and

Proof:

x)()(),( , 21 ygxgyxfy

)()(),( that see thus we,1 Since

)(),()( ),(),()(

Also, .)( and )( where

)()(),(1Then

)()(),(

2121

212121

2211

2121

21

yfxfyxfCC

ygCdxyxfyfxgCdyyxfxf

dyygCdxxgC

CCdyygdxxgdxdyyxf

ygxgyxf

Page 23: Handout Ch3  實習

Jia-Ying Chen23

Example 4

Suppose that X and Y have a discrete joint distribution for which the joint p.f. is defined as follow:

a. Determine the marginal p.f.’s of X and Y b. Are X and Y independent?

otherwise

yxyxyxf

,0

1,01,0),(4

1),(

Page 24: Handout Ch3  實習

Jia-Ying Chen24

Solution

)12)(12(16

1)()()(

4

1),(. yxyfxfyxyxfb

Page 25: Handout Ch3  實習

Jia-Ying Chen25

Discrete and Continuous Conditional Distributions

Suppose that X and Y have a joint p.m.f. f (x, y), then we can define the conditional p.m.f. g1 of x given that Y = y as

Suppose that X and Y have a joint p.d.f. f(x,y), then we can define the conditional p.d.f. g1 of X given that Y=y as

)(

),(

)Pr(

) and Pr()|Pr()|(

21 yf

yxf

yY

yYxXyYxXyxg

12

( , )( | ) for

( )

f x yg x y x

f y

Page 26: Handout Ch3  實習

Jia-Ying Chen26

Example 5 (3.6.7)

Suppose that the joint p.d.f of two random variables X and Y is as follows:

Determine (a) the conditional p.d.f of Y for every given value of X, and (b)

3(4 2 ) for 0, 0 and 2 4

( , ) 160, otherwise

x y x y x yf x y

)5.02(P XYr

Page 27: Handout Ch3  實習

Jia-Ying Chen27

Solution

otherwise 0

24y0for 288

24

)(

),()|( So,

)288(16

3)24(

16

3)(

2

12

24

0

21

xxx

yx

xf

yxfxyg

xxdyyxxfx

3

2

3

2 22 9

1

288

245.0|5.0|2Pr dy

xx

yxdyygXY