Download presentation
Presentation is loading. Please wait.
1
P robability 1 05. Continuous Random Variable Independent random variable Mean and variance 郭俊利 2009/03/30
2
Probability 2 Outline Review Problem 2.42 Exponential random number Normal random number CDF (Cumulative Distribution Function) 2.7 ~ 3.3
3
Probability 3 Problem 2.42 Computational problem. Here is a probabilistic method for computing the area of given subset S of the unit square. The method uses a sequence of independent random selections of points in the unit square [0, 1] x [0, 1], according to a uniform probability law. If the i th point belongs to the subset S the value of a random variable X i is set to 1, and otherwise it is set to 0. Let X 1, X 2, … be the sequence of random variables thus defined, and for any n, let (a) Show that E[S n ] is equal to the area of the subset S, and that var(S n ) diminishes to 0 as n increases. (b) Show that to calculate S n, it is sufficient to know S n-1 and X n, so the past values of X k, k = 1, …, n – 1, do not need to be remembered. Give a formula. (c) Write a computer program to generate S n for n = 1, 2, …, 10000, using the computer’s random number generator, for the case where the subset S is the circle inscribed within the unit square. How can you use your program to measure experimentally the value of π? (d) Use a similar computer program to calculate approximately the area of the set of all (x, y) that lie within the unit square and satisfy 0 ≦ cosπx + sinπy ≦ 1. S n = X 1 + X 2 + … + X n n
4
Probability 4 Solution 2.42 (1/3) 我的翻譯 (my translation, 翻錯別打我 ) : 有種機率算法是計算一個 S 的面積 (S 在給定範圍 unit square 內 ) , 每次選取的點 i th 會落在 [0, 1] x [0, 1] 中 ( 並且 i th 是 uniform 且 independent) ,如果點 i th 落在 S 裡, X i 就等於 1 ,否則 X i = 0 ,又 (a) 計算 E[S n ] 和 var(S n ) (b) 發現 S n 不用管 X 1 ~ X n – 1 ,可以用 S n – 1 和 X n 表示 S n (c) 可以用程式語言寫一個遞迴求 S n ,設 S n 是一個圓形,從 n = 1 ~ 10000 推敲出 π 值 (d) 算出符合 0 ≦ cosπx + sinπy ≦ 1 這樣式子的所有 (x, y) 組合成的面 積 S n = X 1 + X 2 + … + X n n
5
Probability 5 Solution 2.42 (2/3) S..... i = 1 ~ n = 1 ~ 40 X i = 1 or 0 X i is a random variable, S n is a random variable...... P(X i = 1) = 18/40 P(X i = 1) = Area(S) / 給定範圍 = Area(S) Area( [0, 1] x [0, 1] ) = 1 My solution ( 解錯別打我 ) :
6
Probability 6 Solution 2.42 (3/3)
7
Probability 7 Continuous Random Variable Uniform (Lecture 8) (1) PDF f X (x) =, a ≦ x ≦ b (2) E[X] = (3) var(X) = ∫f X (x) dx = 1 ∫x f X (x) dx = E[X]
8
Probability 8 Example 1 (PDF) Computer ’ s lifetime is a random variable (unit: hour). Five computers construct a network server (1) A computer is down at 150 th hour. (2) A computer is down before 150 th hour. (3) A computer is down before 200 th hour. (4) A server is crash before 700 th hour. f(x) = 0, x ≦ 100 100 / x 2, x > 100 { = P(X ≧ a) – P(X ≧ b)
9
Probability 9 Exponential random number f(x) = λe –λx P(x ≧ a) =∫ a ∞ λe –λx dx = –e –λx | a ∞ = e –λa E[X] = 1 / λ var(X) = 1 / λ 2 (E[X 2 ] = 2 / λ 2 )
10
Probability 10 Example 2 (Exponential) The spent time of work is modeled as an exponential random variable. The average time that Xiao-Ming completes the task is 10 hours. What is the probability that Xiao-Ming has done this task early (in advance) ?
11
Probability 11 Cumulative Distribution Function f(x) = (x) dFx dx p(k) = P(X ≦ k) – P(X ≦ k–1) = F(k) – F(k–1)
12
Probability 12 Normal random number aμ + b 0 a2σ2a2σ2
13
Probability 13 Example 3 (Normal) Standard normal distribution N( – a) = P(Y ≦ – a) = P(Y ≧ a) = 1 – P(Y ≦ a) N( – a) = 1 – N(a) CDF P(X ≦ a) = P(Y ≦ ) = N( ) The annual rainfall is modeled as a normal random variable with a mean = 600 mm and a standard deviation = 200. What is the probability that this year ’ s rainfall will be at least 800 mm? a – μ σ a – μ σ
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.