Download presentation
Presentation is loading. Please wait.
Published byIsabella Joseph Modified over 8 years ago
1
Probability & Random Variables Prof. Jae Young Choi, Ph.D. Pattern Recognition Lab., Jungwon University Department of Biomedical Engineering Email: jyoung.choi@jwu.ac.kr URL: http://bprlab.tistory.com/notice/4 Probability & Random Variables
2
OPERATIONS ON 1 RANDOM VARIABLE ▣ EXPECTATION PDF 는 rv. 의 특성에 대한 전체적 윤곽을 보여준다. –Discrete PDF : –Continuous PDF : Central Tendency ← Expected Value, Mean (Avg. of a rv., 평균 ) ~ Accuracy ( 정확도 ) Dispersion ← Variance ( 분산 ) ~ Precision ( 정밀도 )
3
OPERATIONS ON 1 RV. ▣ EXPECTATION D/ Expectation ( 기대값 ) : E[X] –Let X be a rv. w/ PDF f X (x), then the expected value of X is E[X], (Mean Value of X, Statistical Avg. of X) defined as follows : ⑴ Expected Value of Continuous rv. : ⑵ Expected Value of Discrete rv. :
4
Review of Probability Expected Value & Moments (Con’t) The expected value is one of the operations used most frequently when working with random variables. For example, the expected value of random variable x is obtained by letting g(x) = x: when x is continuos and when x is discrete. The expected value of x is equal to its average (or mean) value, hence the use of the equivalent notation and m.
5
Review of Probability Expected Value & Moments (Con’t)
6
Review of Probability Expected Value & Moments (Con’t)
7
Review of Probability Expected Value & Moments (Con’t) The variance of a random variable, denoted by ², is obtained by letting g(x) = x² which gives for continuous random variables and for discrete variables.
8
Review of Probability Expected Value & Moments (Con’t) Of particular importance is the variance of random variables that have been normalized by subtracting their mean. In this case, the variance is and for continuous and discrete random variables, respectively. The square root of the variance is called the standard deviation, and is denoted by .
9
Review of Probability Expected Value & Moments (Con’t) We can continue along this line of thought and define the nth central moment of a continuous random variable by letting and for discrete variables, where we assume that n 0. Clearly, µ 0 =1, µ 1 =0, and µ 2 = ². The term central when referring to moments indicates that the mean of the random variables has been subtracted out. The moments defined above in which the mean is not subtracted out sometimes are called moments about the origin.
10
Review of Probability Expected Value & Moments (Con’t) In image processing, moments are used for a variety of purposes, including histogram processing, segmentation, and description. In general, moments are used to characterize the probability density function of a random variable. For example, the second, third, and fourth central moments are intimately related to the shape of the probability density function of a random variable. The second central moment (the centralized variance) is a measure of spread of values of a random variable about its mean value, the third central moment is a measure of skewness (bias to the left or right) of the values of x about the mean value, and the fourth moment is a relative measure of flatness. In general, knowing all the moments of a density specifies that density.
11
OPERATIONS ON 1 RV. ▣ EXPECTATION Ex) Let X be a binomial rv. on n-trials w/ P( “ success ” )=p. Find E[X].
12
OPERATIONS ON 1 RV. ▣ EXPECTATION Ex) 자동차 도둑이 형사재판에서 유죄선고, 재판결과 3 년이하의 유기징 역에 처해졌다. 그러나, 집행기간이 일정치 않아 문제점 → ∴ 재판 기록 을 참고하여 분포를 구하였다. 평균 집행기간은 얼마인가 ? Let X be a rv. of the sentence length in years, then PDF of X is 3 x 1 fX(x)fX(x)
13
OPERATIONS ON 1 RV. ▣ EXPECTATION
14
OPERATIONS ON 1 RV. ▣ EXPECTATION
15
OPERATIONS ON 1 RV. ▣ EXPECTATION
16
OPERATIONS ON 1 RV. ◈ EXPECTED VALUE of FUNCTION of rv. D/ FUNTION of a rv. X ~ g(X) Ex) D/ EXPECTED VALUE of g(x) ※ Continuous Case : ※ Discrete Case :
17
OPERATIONS ON 1 RV. ◈ EXPECTED VALUE of FUNCTION of rv. Ex) 어떤 불규칙한 전압 V 가 Rayleigh 분포를 따른다고 한다. 즉, Rayleigh 분포에서 a = 0, b = 5 이고 단위 저항 (1Ω) 에 대한 전력을 구하는 측정 장비의 출력이 Y = g(V) = V 2 일 때, E(Y) = ? Power in V :
18
OPERATIONS ON 1 RV. ◈ CONDITIONAL EXPECTED VALUE D/ Conditional Expected Value : Ex) B = {X≤b} 의 경우 (-∞ < b < ∞) : As in the Previous Conditional Prob. {X ≤ b} 로 제한된 rv. X 의 기대값
19
OPERATIONS ON 1 RV. ◈ PROPERTIES of EXPECTED VALUES ※ rv. X 가 다른 rv. 들로 표현될 경우, 예를 들어, X 가 X i 의 선형 함수 이면, 직접 E[X] 를 구하는 것보다 E[X i ] 를 먼저 계산하는 것이 편리하다. T/ [Linearity]E[aX+bY] = aE[X] + bE[Y] w/ a, b ~ real ① Homogeneity : E[aX] = a E[X] (i) a>0 : x=s/a, dx=ds/a → 대입 (ii) a<0 : 마찬가지 방법으로 결과 얻음 ② Additivity :E[X + Y] = E[X] + E[Y]
20
OPERATIONS ON 1 RV. ◈ PROPERTIES of EXPECTED VALUES Ex) Let X be a binomial rv. on n-independent trials, and P(success)=p. Find E[X]. X = X 1 + X 2 + … + X n w/ X i ~ Bernoulli rv. (#success at the i th trial) →E[X i ] = 1 ․ p + 0 ․ (1-p) = p ∴ E[X] = E[X 1 ] + E[X 2 ] + … + E[X n ] = n ․ E[X i ] = n ․ p ※ 앞에서 구한 방법보다 간단함 !!!
21
OPERATIONS ON 1 RV. ◈ MOMENTS Moments about the Origin: g(X) = X n (n = 0, 1, 2, …)← n th moment 구할 때 사용 m n = E[X n ] NOTE : m 0 = 1, m 1 = E[X] = X Central Moments : g(X) = (X - X) n (n = 0, 1, 2, …) μ n = E[(X - X) n ] NOTE : μ 0 = 1, μ 1 = 0, μ 2 = σ X 2 Variance & Skew : 위에서 2nd Central Moment μ 2 = σ X 2 (Variance, 분산 ) σ X 2 = μ 2 = E[(X - X) 2 ] D/ Standard Deviation σ X : Measure of Dispersion (Spread) in f X (x) σ X 2 = E[(X - X) 2 ] = E[X 2 - 2X + X 2 ] = E[X 2 ] - 2E[X] + X 2 = E[X 2 ] - X 2 = m 2 -m 1 2 D/ 3rd Moment : μ 3 = E[(X - X) 3 ] 는 x = X 에 대한 f X (x) 의 비 대칭성 D/ Coefficient of Skewness : μ 3 /σ X 3 (Skewness of f X (x))
22
OPERATIONS ON 1 RV. FUNCTIONS giving MOMENTS D/ Characteristic Function : X = E[e j X ] w/ -∞ < < ∞ X 는 대신 - 를 사용한 PDF f X (x) 의 Fourier Transform (*) f X (x) 는 X 의 Inverse Fourier Transform (x 대신 -x 를 사용 ) (**) ※ (*) 식을 에 대해 n 번 미분하여, = 0 로 놓으면 n 차 모멘트 m n 을 구함. ※ 장점 : 항상 X 값 존재하며, n 차 미분이 존재하면 n 차 모멘트 m n 을 항상 구할 수 있다. ※ 성질 : X =1 이고, | X | ≤ X = 1 이다.
23
OPERATIONS ON 1 RV. FUNCTIONS giving MOMENTS D/ Moment Generating Function : M x = E[e νX ] w/ -∞ < ν < ∞ M x 는 대신 - 를 사용한 PDF f X (x) 의 Laplace Transform (*) f X (x) 는 M x 의 Inverse Laplace Transform (x 대신 -x 를 사용 ) (**) ※ (*) 식을 에 대해 n 번 미분하여, = 0 로 놓으면 n 차 모멘트 m n 을 구함. ※ 단점 : M x ( ) 값 존재하지 않을 수 있다. 그러나, ν=0 에 대해 n 차 미분이 존재하면, n 차 모멘트 m n 을 구할 수 있다.
24
OPERATIONS ON 1 RV. FUNCTIONS giving MOMENTS Ex) 다음 지수함수분포에 대해, 특성 함수와 모멘트 발생함수를 이용하여 1 차 모멘트 m 1 을 구하라. – ⑴ 특성함수를 이용한 방법 : – ⑵ 모멘트발생함수를 이용한 방법 :
25
OPERATIONS ON 1 RV. ♣ Useful Probability Inequalities Chebyshev's Inequality For rv. w/ mean X and variance X 2, ∃ ε>0 s.t. or Markov's Inequality For a non-negative rv., Chernoff's Inequality and Bound For a rv. and ν>0, (generalization of Markov's inequality)
26
OPERATIONS ON 1 RV. ◈ TRANSFORMATION of 1 RV. : ▶ Mapping of ONE RV. to ANOTHER RV. : X Y New RV.Y = T(X) or New RV.Y = g(X) Ex)Y = 2X + 5, Y = X 2 + exp(-X)
27
OPERATIONS ON 1 RV. ◈ TRANSFORMATION of 1 RV. : Y = g(X)~ Mapping g : rv. X rv. Y ▶ Discrete rv. 의 경우 : ⑴ g = 단조 함수인 경우 : X = g -1 (Y) ← ∃ a Unique Inverse g -1 s.t. P(Y=y k ) = P(X=g -1 (x k )) ⑵ g = 단조 함수가 아닌 경우 : Y = g(X) 에서 → Y 의 원소 개수 ≠ X 의 원소 개수 Ex) Y = X 2 에서 P(X=-2) = 0.1, P(X=-1) = 0.2, P(X=0) = 0.3, P(X=1) = 0.4 → y = x 2 에서 가능한 y 값을 먼저 구한다. y ∈ {0, 1, 4} y=0 이면 x=0, ∴ P(Y=0) = P(X=0) = 0.3 y=1 이면 x=1 or x=-1, ∴ P(Y=1) = P(X=-1) + P(X=1) = 0.2 + 0.4 = 0.6 y=4 이면 x=-2, ∴ P(Y=4) = P(X=-2) = 0.1 f X (x)0.4 0.3 0.2 0.1 -201x 0.6f Y (y) 0.3 0.1 00 01234y
28
OPERATIONS ON 1 RV. ◈ TRANSFORMATION of 1 RV. ▶ Continuous rv. 의 경우 : Y = g(X) ⑴ Monotonic Transformation of a Continuous rv. 의 경우 : y = g(x) 에서 x 의 미세증분에 해당하는 x+dx 에 대해 다음 관계를 만족한다. y + dy = g(x + dx) ≒ g(x) + g'(x) ․ dx g = 단조증가함수 g = 단조감소함수 g = 단조증가함수 (dx,dy) ~ 미세증분
29
OPERATIONS ON 1 RV. ◈ TRANSFORMATION of 1 RV. ※ NOTE : ㉮ 구간 설정에 항상 주의한다. ㉯ 변환시 변수변환에 주의한다. ( x y 로 항상 바꿔준다 ) ※ T/ [ 단조 변환의 확률 보존 법칙 ] : rv. Y 의 구간에 해당하는 확률과 rv. X 의 구간에 해당하는 확률은 같다. 즉, P(y < Y ≤ y + dy) = P(x < X ≤ x + dx)↓ f Y (y) ․ |dy| = f X (x) ․ |dx| g = 단조증가함수 (dx,dy) ~ 미세증분
30
OPERATIONS ON 1 RV. ◈ TRANSFORMATION of 1 RV. ※ 다른 방법 : ① g = 단조 증가 함수의 경우 : CDF 에서 구간 {Y≤y 0 } 과 구간 {X≤x 0 } 의 확률은 같다. 즉, F Y (y 0 ) = P(Y≤y 0 ) = P(X≤x 0 ) = F X (x 0 ) ② g = 단조 감소 함수의 경우 : CDF 에서 구간 {Y≤y 0 } 과 구간 {X≥x 0 } 의 확률은 같다. 즉, F Y (y 0 ) = P(Y≤y 0 ) = P(X≥x 0 ) = 1 - F X (x 0 )cf. 연속이면 등호와 무관 같은 방법으로, ∵ g -1 의 기울기는 음수 (-) ∴ ①, ②에서
31
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex) Uniform rv. X 의 PDF 가 다음과 같을 때 변환된 rv. Y = sinh(X) 의 PDF, CDF 를 구하라. ( 구간 설정에 항상 주의 !!) ① PDF : ② CDF :
32
OPERATIONS ON 1 RV. ◈ RV. MAPPING ※ PDF f X (x) 에서 불연속점이 발생할 경우 (x=g -1 (y) 에서 ) : F Y (y) = P(Y≤y) = P(X≥g -1 (y)) = 1 - P(X < g -1 (y)) = 1 – { P(X≤g -1 (y)) - P(X=g -1 (y)) } = 1 - P(X≤g -1 (y)) + P(X=g -1 (y)) ← Jump at x = g -1 (y) = 1 - F X (g -1 (y)) + P(X=g -1 (y)) ( 이 위치에서 점프 확률값 존재 ) ① f X (x) ~ 연속일 경우 : P(X=g -1 (y)) 값은 점에서의 확률이므로 0 이다. ② f X (x) ~ 이산적인 경우 : P(X=g -1 (y)) 값은 이산적 확률이므로 계산한다.
33
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex) Linear Transformation : Y = g(X) = a X + b (a≠0) g = 단조 함수 w/ Inverse : X = g -1 (Y) = (Y - b)/a g'(x) = a 이므로 ① PDF : ② CDF : ㉮ a > 0 : ㉯ a < 0 : y = g(x) x Jump at x = g -1 (y)
34
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex) Linear Transformation of Gaussian rv. : ( 계속 ) Gaussian Distribution f X (x) = N( X,σ X 2 ) 사용하여 실제 대입해보자. ※ BIG RESULT : ∴ Gaussian rv. 의 선형변환에 의해 생성된 rv. 도 역시 Gaussian rv. 이 된다 cf. 다른 변환에 대해서도 성립하는가 ? → Ans. No !!! ( 전혀 다른 PDF 가 만들어짐 ) y = g(x) x
35
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex) Linear Transformation of Gaussian rv. : ( 계속 ) y = g(x) x f X (x) x f Y (y) y y = ax + b
36
OPERATIONS ON 1 RV. ◈ TRANSFORMATION of 1 RV. ⑵ Nonmonotonic Transformations of a Continuous rv. 의 경우 : Y = g(X) → 단조 함수가 아닌 경우, 하나의 y 값에 대해 여러개의 x 값이 존재 Non-unique Inverse 를 갖는다. ∴ Many-to-One Transformation Ex) 3 차 함수의 경우 : 하나의 Y Event 에 대해 X 의 다른 3 가지 Event 가 해당 된다. 즉, 구간에 대한 Event 는 각각 단조 증가 또는 단조 감소이고 {y < Y≤y+dy} = {x 1 < X≤x 1 +dx 1 } ∪ {x 2 +dx 2 < X≤x 2 } ∪ {x 3 < X≤x 3 +dx 3 } 각 구간에 대한 단조 변환의 확률 보존 법칙으로 부터 P(y < Y≤y+dy) = P(x 1 < X≤x 1 +dx 1 ) + P(x 2 +dx 2 < X≤x 2 ) + P(x 3 < X≤x 3 +dx 3 ) ( ∵ X 에 대한 3 가지 Event 는 dy→0 일 때 서로 M.E. Event 들이므로 더함 )
37
OPERATIONS ON 1 RV. ◈ TRANSFORMATION of 1 RV. ⑵ Nonmonotonic Transformations of a Continuous rv. 의 경우 : Ex) ∴ f Y (y) ․ |dy| = f X (x 1 ) ․ |dx 1 | + f X (x 2 ) ․ |dx 2 | + f X (x 3 ) ․ |dx 3 | (cf. 위의 두 번째 항에서 x = x 2 일 때 dy/dx < 0) 양변을 |dy| 로 나누어 정리하면, w/ g k -1 (y) 는 y = g(x) 의 x = x k 에 대한 k 번째 root ※ RESULT : 같은 Y 의 Event 에 대해, 모든 관련된 X 의 Event 들의 확률을 더한다.
38
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex)Quadratic Transformation : Y = a (X - c) 2 + b(a > 0) → 모든 x 에 대해, y≥b 이다. (y < b 일 때 f Y (y)=0) y = g(x) = a (x - c) 2 + b 하나의 y 값에 대해 2 개의 x 값이 존재 (x 1, x 2 ) g'(x) = 2a (x - c) 이므로 PDF : CDF : 단조감소영역단조증가영역
39
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex)Quadratic Transformation : Y = X 2 → f X (x) = N( ,σ 2 ) ~ Gaussian PDF,f Y (y) = 0 for y < 0 앞의 예제에서 {a=1, b=0, c=0} 대입, y = g(x) = x 2 g'(x) = 2x 이므로 PDF :
40
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex) A new rv. Y is defined as Y = 2 X + 1. Find f Y (y). a = 2, b = 1 : g'(x) = 2 ※ NOTE :The above eq. is NOT valid for all y ( 구간결정에 주의 ) ∵ 0 < x < 1 에서 0 < (y-1)/2 < 1 → ∴ 1 < y < 3
41
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex)Let Y = X 2 andr.v. X ~ Uniform. Find f Y (y). Quadratic Transformation ※ NOTE : 구간 결정에 주의할 것. ① -1 < √y < 2 일 경우 : 0≤ √y < 2 이므로 0≤ y < 4 ② -1 < -√y < 2 일 경우 : -1 < -√y ≤0 이므로 0≤ y < 1 ∴ ①, ②에서 (i) 0≤ y < 1 과 (ii) 1≤ y < 4 로 구간을 분리 (i) 0≤ y < 1 : ①∪② → (ii) 1≤ y < 4 : ① → (iii) otherwise : f X (x) y=g(x)
42
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex)Let Y = 7 X. Find f Y (y) in terms of f X (x). 단조증가 g(x) = 7 x, g ’ (x) = 7 f Y (y) = f X (y/7)/|7| Ex)Let Y = X 3, f X (x) = e -x u(x). Find f Y (y). 단조증가 g(x) = x 3, g ’ (x) = 3x 2 Ex)Let Y = X 2. Find f Y (y) in terms of f X (x). 단조증가 및 단조감소 g ’ (x) = 2x = ±2√y Ex)Let Y = 5X + 3, f X (x) = e -x u(x). Find f Y (y). 단조증가 g(x) = 5x + 3, x = (y-3)/5, g ’ (x) = 5
43
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex)Let rv. I ~ Gaussian PDF f I (i), & Power rv. W = R I 2. Find f W (w). 단조증가 g(i) = R i 2, g ’ (i) = 2Ri = ±2√(wR) A/rv. I ~ Gaussian, ※ FACT/ ① ②
44
OPERATIONS ON 1 RV. ◈ RV. MAPPING Ex) ( 계속 ) CDF of rv. W : Q(x) + F (x) = 1 이므로 Ex) 4Ω Speaker 의 최대 전력이 25W 일 때, 전류가 Gaussian 이고 평균 4W 전력을 발생한다고 한다. Speaker 가 최대 전력을 초과하는 확률은 얼마인가 ? Normalized Gaussian Q-Function
45
OPERATIONS ON 1 RV. ◈ COMPUTER GENERATION OF ONE RV. ▶ 컴퓨터 패키지 (S/W) 의 해당 Library 에서 여러 가지 분포를 생성하는 함수 가 있는 경우 : Ex) MATLAB, SPSS, SAS, MINITAB ▶ 이러한 배려가 없는 경우 :“ 시뮬레이션 ” 을 위해 컴퓨터로 분포를 만들어내 야 한다. ※ NOTE : 만들어진 수치의 분포를 확인 ! 초기값이 매 “ 시뮬레이션 ” 마다 달라져야 한다. 매 “ 시뮬레이션 ” 마다 이전에 구한 분포와 독립 → 상관계수가 0 이어야 한다. ▶ 컴퓨터의 Random Number Generator : a rv. w/ Uniform PDF in (0, 1) U(0, 1) 을 사용하여 필요시 Y = T(X) 를 사용하여 다른 rv. 로 변환 시킨다. ※ FACT : For Uniform X, ( ∃ Inverse F Y -1 & F Y -1 is Non-decreasing ∵ F Y (y) is Non-decreasing & Monotonic)
46
OPERATIONS ON 1 RV. ◈ COMPUTER GENERATION OF ONE RV. ※ PROBLEM : Solve the Inverse Function F Y -1 for y given F Y (y) = x. Compute y through Uniform PDF, U(0,1). Ex) Rayleigh Distribution w/ a = 0 : Ex) Exponential Distribution w/ a = 0 : Ex) Gaussian Distribution w/ a Y = 0 : RESULT : Gaussian PDF requires more than one rv.!!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.