Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3 Discrete Random Variables 主講人 : 虞台文. Content Random Variables The Probability Mass Functions Distribution Functions Bernoulli Trials Bernoulli.

Similar presentations


Presentation on theme: "Chapter 3 Discrete Random Variables 主講人 : 虞台文. Content Random Variables The Probability Mass Functions Distribution Functions Bernoulli Trials Bernoulli."— Presentation transcript:

1 Chapter 3 Discrete Random Variables 主講人 : 虞台文

2 Content Random Variables The Probability Mass Functions Distribution Functions Bernoulli Trials Bernoulli Distributions Binomial Distributions Geometric Distributions Negative Binomial Distributions Poisson Distributions Hypergeometric Distributions Discrete Uniform Distributions

3 Random Variables Chapter 3 Discrete Random Variables

4 Definition  Random Variables A random variable X of a probability space ( , A, P) is a real-valued function defined on , i.e.,

5 Definition  Random Variables A random variable X of a probability space ( , A, P) is a real-valued function defined on , i.e., 原來熊貓不是貓

6 Example 1

7 11

8 22

9

10 Example 2 l ab

11 l ab

12 Notations

13 Example 1

14

15

16 Definition  Discrete Random Variables A discrete random variable X is a random variable with range being a finite or countable infinite subset {x 1, x 2,...} of real numbers R.

17 Definition  Discrete Random Variables A discrete random variable X is a random variable with range being a finite or countably infinite subset {x 1, x 2,...} of real numbers R. What is countablity? The set of all integers The set of all real numbers countable uncountable

18 Example 1 X, Y and Z are discrete random variables. All are finite

19 Example 2 l ab X, Y and Z are not discrete random variables. All are uncountable

20 Example 2 l ab X, Y and Z are not discrete random variables. All are uncountable In fact, they are continuous random variables.

21 The Probability Mass Functions Chapter 3 Discrete Random Variables

22 Definition  The Probability Mass Function (pmf) The probability mass function (pmf) of r.v. X, denoted by p X (x), is defined as

23 Example 4

24 23456789101112 x 1/36 2/36 3/36 4/36 5/36 6/36

25 Example 4 123456 y

26 01 z

27 Properties of pmf’s 1. x 2.

28 Distribution Functions Chapter 3 Discrete Random Variables

29 Cumulative Distribution Function (cdf) cdf

30 Cumulative Distribution Function (cdf) cdf pmf

31 Cumulative Distribution Function (cdf) cdf pmf x pX(x)pX(x) x1x1 x2x2 x3x3 x4x4 x FX(x)FX(x) x1x1 x2x2 x3x3 x4x4

32 Cumulative Distribution Function (cdf) cdf pmf x pX(x)pX(x) x1x1 x2x2 x3x3 x4x4 x FX(x)FX(x) x1x1 x2x2 x3x3 x4x4

33 Cumulative Distribution Function (cdf) cdf pmf x pX(x)pX(x) x1x1 x2x2 x3x3 x4x4 x FX(x)FX(x) x1x1 x2x2 x3x3 x4x4

34 Cumulative Distribution Function (cdf) cdf pmf x pX(x)pX(x) x1x1 x2x2 x3x3 x4x4 x FX(x)FX(x) x1x1 x2x2 x3x3 x4x4 1 pX(x1)pX(x1) pX(x2)pX(x2) pX(x3)pX(x3) pX(x4)pX(x4)

35 Example 5

36 23456789101112 x 1/36 2/36 3/36 4/36 5/36 6/36

37 Example 5 x p(x)p(x) x F(x)F(x)

38 x p(x)p(x) x F(x)F(x)

39 123456 y

40 y p(y)p(y) y F(y)F(y)

41 Properties of cdf’s 1. x 2. Monotonically nondecreasing. 3. 4. 5.

42 Properties of cdf’s 1. x 2. Monotonically nondecreasing. 3. 4. 5. F(b)F(b) F(a)F(a)

43 Bernoulli Trials Chapter 3 Discrete Random Variables

44 Bernoulli Trials Suppose an experiment consists of n trials, n > 0. The trials are called Bernoulli trials if three conditions are satisfied: 1. Each trial has a sample space {S =1, F =0} (two outcomes), S to be called success and F to be called failure. 2. For each trial P(S) = p and P(F) = q, where 0 ≤ p ≤ 1 and q = 1 − p. 3. The trials are independent.

45 Example 6 Tossing a die ten times, the actual face number in each toss is unnoted. Instead, the outcome of 1 or 2 will be considered a success, and the outcome of 3, 4, 5, or 6 will be considered a failure. What is the sample space of the experiment? Is this experiment to performing Bernoulli Trials? Why?

46 Discussion What probabilities may interest us on performing Bernoulli Trials?

47 Bernoulli Distributions Chapter 3 Discrete Random Variables

48 Let r.v. X denote the outcome of a Bernoulli trial, and let the probability of success equal to p. Then, we have cdf pmf Bernoulli Distributions

49 Let r.v. X denote the outcome of a Bernoulli trial, and let the probability of success equal to p. Then, we have cdf pmf Bernoulli Distributions

50 Let r.v. X denote the outcome of a Bernoulli trial, and let the probability of success equal to p. Then, we have cdf pmf Bernoulli Distributions 0 1 x pX(x)pX(x) 1p1p p

51 Let r.v. X denote the outcome of a Bernoulli trial, and let the probability of success equal to p. Then, we have 0 1 x pX(x)pX(x) 1p1p p cdf pmf Bernoulli Distributions 0 1 x pX(x)pX(x) 1p1p p 01 x FX(x)FX(x) 1p1p 1

52 Let r.v. X denote the outcome of a Bernoulli trial, and let the probability of success equal to p. Then, we have cdf pmf Bernoulli Distributions The parameters of the experiment.

53 cdf pmf Bernoulli Distributions 0 1 x pX(x)pX(x) 1p1p p 01 x FX(x)FX(x) 1p1p 1

54 Binomial Distributions Chapter 3 Discrete Random Variables

55 開瓶贈獎  中獎率 p 買 n 瓶可樂,令 X 表中獎瓶數 I(X)=? P(X=x)=?

56 Binomial Distributions Consider n Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #successes in the experiment. Then, cdf pmf n trials x successes n  x fails p p p (1  p)... 

57 Binomial Distributions Consider n Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #successes in the experiment. Then, cdf pmf n trials x successes n  x fails p p p (1  p)... 

58 Binomial Distributions Consider n Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #successes in the experiment. Then, cdf pmf n trials x successes n  x fails p p p (1  p)... 

59 Binomial Distributions Consider n Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #successes in the experiment. Then, cdf pmf

60 Binomial Distributions Consider n Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #successes in the experiment. Then, cdf pmf without closed-form

61 Binomial Distributions Consider n Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #successes in the experiment. Then, cdf pmf The parameters of the experiment.

62 Binomial Distributions cdf pmf

63 Binomial Distributions

64 Example 7 Verify that b(x; n, p) is a valid pmf. 

65 Example 8 10% of IC chips from an IC manufacturer are known to be defective. Taking a sample of ten IC chips from the manufacture. Find the probabilities of 1. no IC chip is defective; 2. at least 2 IC chips are defective. 10% of IC chips from an IC manufacturer are known to be defective. Taking a sample of ten IC chips from the manufacture. Find the probabilities of 1. no IC chip is defective; 2. at least 2 IC chips are defective.

66 Example 8 10% of IC chips from an IC manufacturer are known to be defective. Taking a sample of ten IC chips from the manufacture. Find the probabilities of 1. no IC chip is defective; 2. at least 2 IC chips are defective. 10% of IC chips from an IC manufacturer are known to be defective. Taking a sample of ten IC chips from the manufacture. Find the probabilities of 1. no IC chip is defective; 2. at least 2 IC chips are defective. Let X denote #defectives

67 Geometric Distributions Chapter 3 Discrete Random Variables

68 開瓶贈獎  中獎率 p I(X)=? P(X=x)=? 號外 !!! 中獎者汽車ㄧ部 有ㄧ人買可樂直至中獎才甘心 令 X 表買至第一瓶中獎時購買之瓶數

69 Geometric Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote the number of trials up to and including the first success. Then, cdf pmf x trials x  1 fails (1  p)...  First success p

70 Geometric Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote the number of trials up to and including the first success. Then, cdf pmf

71 Geometric Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote the number of trials up to and including the first success. Then, cdf pmf The parameter of the experiment.

72 Geometric Distributions cdf pmf

73 Example 9 Tossing a fair die, find: 1.the probability of the first appearing of 1 is in the 5th toss; 2.the probability of the first appearing of 1 is in the first five tosses.

74 Example 9 Tossing a fair die, find: 1.the probability of the first appearing of 1 is in the 5th toss; 2.the probability of the first appearing of 1 is in the first five tosses. Let X denote #tossing to reach the 1 st 1

75 Memoryless or Markov Property 12m 繼續買 開始買 誰易中獎 ?

76 Memoryless or Markov Property 12m m+1 m+2 m+nm+n 1 2 n 以後某次中獎

77 12m m+1 m+2 m+nm+n 1 2 n 以後某次中獎 Memoryless or Markov Property 令 X 表買樂透至首次中獎之次數

78 Memoryless or Markov Property

79 A r.v. X is said to have memoryless or Markov property if it satisfies

80 Theorem 1 Let r.v. X have image 1, 2,…. Then, X ∼ G(p)  P(X > m + n|X > m) = P(X > n) where m, n be any positive integers.

81 Theorem 1 PF) “”“”

82 Theorem 1 PF) “”“” Define

83 Theorem 1 Let r.v. X have image 1, 2,…. Then, X ∼ G(p)  P(X > m + n|X > m) = P(X > n) where m, n be any positive integers. 離散型隨機變數中,唯有幾何分配具無記憶性

84 Geometric Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote the number of trials up to and including the first success. Then, cdf pmf Modified Y   Y 0,1,2,… Y y   y = 0,1,… y+1 Y y    y < 0 0  y y failures

85 Modified Geometric Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. Y denote the number of failures up to the first success. Then, cdf pmf

86 Modified Geometric Distributions cdf pmf

87 Negative Binomial Distributions Chapter 3 Discrete Random Variables

88 開瓶贈獎  中獎率 p I(X)=? P(X=x)=? 號外 !!! 中獎者汽車ㄧ部 有ㄧ人買可樂直至得 r 中獎瓶蓋止 令 X 表所購買之總瓶數 辦法 : r 中獎瓶蓋換汽車ㄧ部

89 Negative Binomial Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #trials up to and including the r th success. Then, cdf pmf 第r次成功第r次成功 X = x r  1 次成功 

90 Negative Binomial Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #trials up to and including the r th success. Then, cdf pmf 第r次成功第r次成功 X = x r  1 次成功 

91 Negative Binomial Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #trials up to and including the r th success. Then, cdf pmf without closed-form

92 Negative Binomial Distributions Consider a sequence of Bernoulli trials with the probability of success on each trial being p. Let r.v. X denote #trials up to and including the r th success. Then, cdf pmf without closed-form The parameters of the experiment.

93 Negative Binomial Distributions cdf pmf Fact:

94 Negative Binomial Distributions cdf pmf

95 Negative Binomial Distributions pmf

96 Negative Binomial Distributions pmf Verify that nb(x;r,p) is a valid pmf. Exercise

97 開瓶贈獎  中獎率 p I(X)=? P(X=x)=? 號外 !!! 中獎者汽車ㄧ部 有ㄧ人買可樂直至得 r 中獎瓶蓋止 令 X 表所購買之總瓶數 辦法 : r 中獎瓶蓋換汽車ㄧ部

98 開瓶贈獎  中獎率 p I(Y)=? P(Y=y)=? 號外 !!! 中獎者汽車ㄧ部 有ㄧ人買可樂直至得 r 中獎瓶蓋止 令 Y 表未中獎之瓶數 辦法 : r 中獎瓶蓋換汽車ㄧ部 Fact: Y = X  r

99 Negative Binomial Distributions pmf Modified Fact: Y = X  r Y  Y  ’ y  y  ’ y =0,1,2, … y y y

100 Modified Negative Binomial Distributions pmf Fact:

101 Poisson Distributions Chapter 3 Discrete Random Variables

102 A Toll Station 輛 / 時

103 Arriving/Failure Rate 輛 / 時 : 平均單位時間所發生之事件數 値通常由統計方法得知

104 Poisson Distributions Consider a highway toll station. Assume that, on average, vehicles pass the station per unit time interval (e.g., an hour). Let X denote #vehicles passing in a time interval of duration t, i.e., (0, t]. 0 t : Arriving rate X: #vehicles passing in (0, t] I(X) = ? P(X=x) = ? {0, 1, 2, …}

105 Poisson Distributions : Arriving rate X: #vehicles passing in (0, t] P(X=x) = ? 0 t t n 

106 Poisson Distributions : Arriving rate X: #vehicles passing in (0, t] P(X=x) = ? 0 t t n  ㄧ時間槽內會同時有兩輛 ( 含 ) 以上車通過嗎 ? 每ㄧ時間槽應 0 或 1 輛車通過 0101001000110001010

107 Poisson Distributions : Arriving rate X: #vehicles passing in (0, t] P(X=x) = ? 0 t t n  0101001000110001010 相當於進行伯努力試驗 n 次,每次成功抑或失敗 p = ?

108 Poisson Distributions : Arriving rate X: #vehicles passing in (0, t] P(X=x) = ? 0 t t n  0101001000110001010 相當於進行伯努力試驗 n 次,每次成功抑或失敗 p = ? 0 請記住 n 很大 p 很小這件事

109 Poisson Distributions : Arriving rate X: #vehicles passing in (0, t] P(X=x) = ? 0 t t n  0101001000110001010 相當於進行伯努力試驗 n 次,每次成功抑或失敗 p = ? 0

110 Poisson Distributions : Arriving rate X: #vehicles passing in (0, t] =1, n 

111 Poisson Distributions : Arriving rate X: #vehicles passing in (0, t] Let Chapter 2 Exercises

112 Poisson Distributions : Arriving rate X: #vehicles passing in (0, t]

113 Poisson Distributions Consider a highway toll station. Assume that, on average, vehicles pass the station per unit time interval (e.g., an hour). Let X denote #vehicles passing in a time interval of duration t, i.e., (0, t]. : Arriving rate X: #vehicles passing in (0, t] cdf pmf without closed-form

114 Poisson Distributions Consider a highway toll station. Assume that, on average, vehicles pass the station per unit time interval (e.g., an hour). Let X denote #vehicles passing in a time interval of duration t, i.e., (0, t]. cdf pmf without closed-form   in an interval the same interval        

115 Poisson Distributions cdf pmf Verify that p(x;  ) is a valid pmf. Exercise

116 Poisson Distributions cdf pmf Verify that p(x;  ) is a valid pmf. Exercise

117 Example 12 On average, a job arrives for CPU service every 6 seconds. Find the probability that there will be less than or equal to 4 arrivals in a given minute? = 1/6 job/sec. Let X denote #arrivals in the minute. t = 60 secs.  = t = 10 jobs.

118 Poisson Approximation The binomial distribution is important, but the probability values associated with it are hardly evaluated.

119 Poisson Approximation pp 此式於 n 很大 p 很小時成立

120 Poisson Approximation pp

121 pp pp

122 pp

123 n 很大 p 很小時,下式可用於估算二項分配之機率。 E.g., n  20 and p  0.05.

124 Example 13 A manufacture produces IC chips, 1% of which are defective. A box contains 100 chips. Find the probability that 1. the box contains no defective. 2. the box contains less than or equal to 2 defectives. A manufacture produces IC chips, 1% of which are defective. A box contains 100 chips. Find the probability that 1. the box contains no defective. 2. the box contains less than or equal to 2 defectives. Let X denote the number of defectives.

125 Hypergeometric Distributions Chapter 3 Discrete Random Variables

126 Hypergeometric Distributions + = N d NdNd n w/o repl. X = # I(X)=? P(X=x)=?

127 Hypergeometric Distributions I(X)=? P(X=x)=? cdf pmf without closed-form

128 Hypergeometric Distributions pmf

129 Example 14 Compute the probability of obtaining three defectives in a sample of size ten taken without replacement from a box of twenty components containing four defectives. Let X denote the number of defectives.

130 Hypergeometric Distributions pmf 不好算

131 Example 15 A box contains 200 red balls and 800 black balls. Now 10 balls are taken without replacement. Find the probability of obtaining none red ball. Let X denote #red balls taken.

132 Discrete Uniform Distributions Chapter 3 Discrete Random Variables

133 Discrete Uniform Distributions A r.v. X is said to possess a discrete uniform distribution if it has a finite image {x 1, x 2, …, x N } and has the pmf

134 Example 16 One ball is drawn from a box containing 10 balls numbered 1,2,...,10. Find the probability that the ball number is less than 4. Let r.v. X denote the ball number. Is uniform distribution really that simple?

135 Review Bernoulli Distributions Binomial Distributions Geometric Distributions Negative Binomial Distributions Poisson Distributions Hypergeometric Distributions Discrete Uniform Distributions


Download ppt "Chapter 3 Discrete Random Variables 主講人 : 虞台文. Content Random Variables The Probability Mass Functions Distribution Functions Bernoulli Trials Bernoulli."

Similar presentations


Ads by Google