Topic 3
Topic 3
Example of discrete random variable Example 2: Tossing a coin twice. Examples of continuous random variable Examples of continuous random variable
Example 1: Tossing a coin once. I Sample space S = {HH, HT,TH, TT} where H means Head Example 1: Temperature of a given date. Example 2: Stock market index.
I Sample space S = {H, T} where H is head and T is tail and T means tail. I Sample space S = {x œ R : x Ø ≠273.15}. I Sample space S = R + = {x œ R : x Ø 0}.
I Let X be a random variable of total number of heads. I Let X be a random variable of total number of heads. I Let X be a random variable of temperature. I Let X be a random variable of stock market index.
I X = 1 when we have a head, or X (H) = 1. I Then X = 0 means TT, X = 1 means HT or TH, and X = 2 I Support of X is the same as S. I Support of X is the same as S.
means HH.
I X = 0 when we have a tail, or X (T) = 0.
I Support of X is {0,1}.
I Formally, X (TT) = 0, X (TH) = X (HT) = 1, and Notation: R is the set of real numbers and R + is the set Notation: R is the set of real numbers and R + is the set
X (HH) = 2. of non-negative real numbers. of non-negative real numbers.
I Support of X is {0,1,2}.
Common Discrete Distributions Uniform Distribution Graph for Uniform distribution Bernoulli Distribution
I Every possible value of X is equally likely I Two outcomes: failure or success
I Support of X : {x1 , . . . , xn } I Probabilities of success and failure: p and 1 ≠ p
P (x ) I Random variable X : number of success
I Uniform 1
Pr (X = xi ) = X = 1, ..., 5 I Support of X : {0, 1}
I Bernoulli n I Then Pr(X = 1) = p and Pr(X = 0) = 1 ≠ p
I Binomial X = 1, ..., 3
I Probability function I Probability function
I Possion
I Hypergeometric X x1 · · · xn X 0 1
P (x ) n1 · · · 1 P (x ) 1 ≠ p p
n x
1 2 3 4 5 I Usage: tossing a fair coin, running an experiment
I Example: number of heads tossing a fair coin, face
value of rolling fair dice with binary outcomes
Example
A restaurant owners found that 30% of customers like spicy food. I Partition a period of time with n intervals
P (x ) What is the probability that out of five randomly chosen customers, I Each internal has a Bernoulli trial
A restaurant owners found that 30% of customers like spicy food. no more 2 of them like spicy food?
n = 6, p = 0.5 What is the probability that out of five randomly chosen customers,
I Each trial has success probability p
n = 4, p = 0.3 2 of them like spicy food? Pr(X Æ 2) = Pr(X = 0) + Pr(X = 1) + Pr(X = 2) I Each trial are independent
A B
A B
5 5
A B I Random variable X : total number of successes
5 = (0.3)0 (0.7)5 + (0.3)1 (0.7)4 I Support of X : {0, 1, . . . , n}
Pr(X = 2) = (0.3)2 (0.7)3 ¥ 0.3087 0 1
2 A B
5 I Probability function:
Note that we have n = 5, x = 2 and p = 0.3. + (0.3)2 (0.7)3
x 2 Q R
n n≠x
0 1 2 3 4 5 6 ¥ 0.8369 Pr (X = x ; n, p ) = a bp x (1 ≠ p )
x
Exponential Distribution
Exponential Distribution
Example
I Waiting time until a success in Possion with mean ⁄ Denote ⁄ a positive number:
Example Suppose the time for next customer to arrive follows exponential
I Memoryless: same probability after waiting I Support of X : (0, Œ)
Suppose the time for next customer to arrive follows exponential distribution with mean 20 minutes.
I Support of X : [0, Œ) I Cumulative probability function: What is the probability that a customer arrive in between next 5
distribution with mean 20 minutes.
I Probability distirubtion function What is the probability that a customer arrive in within next 10 minutes and 15 minutes?
Y F (x ; ⁄) = 1 ≠ e ≠⁄x minutes? Note that mean = 20 implies that ⁄ = 20 1
. Hence, we have
] ⁄e ≠⁄x if x Ø 0 Note that mean = 20 implies that 20 = ⁄1 or ⁄ = 20 1
. Hence, we
f (X = x |⁄) = [ I Mean: E (X ) = ⁄≠1 Pr(5 Æ X Æ 15) = F (15) ≠ F (5)
0 otherwise have 1
(10) 1 1
I Variance: Var (X ) = ⁄≠2 Pr(X Æ 10) = F (10) = 1 ≠ e ≠ 20
¥ 0.3934 = (1 ≠ e ≠ 20 (15) ) ≠ (1 ≠ e ≠ 20 (5) )
I Cumulative distribution function ¥ 0.30634
Intuition:
F (x ) = 1 ≠ e ≠⁄x I When we expect ⁄ of events happen in an hour,
then we expect 1/⁄ is the arrival of the first event
Chiu Yu KO 130 / 213 Chiu Yu KO 131 / 213 Chiu Yu KO 135 / 213 Chiu Yu KO 136 / 213
Normal Distribution Graph for normal distribution Normal Distribution Shorthand notation for normal
Denote µ a number and ‡ a positive number:
I Bell curve I Support of X : (≠Œ, Œ)
I Support of X : (≠Œ, Œ) I Probability desnity function:
I Probability distribution function
µ = 0, ‡ 2 = 4
µ = ≠4, ‡ 2 = 1
Shorthand notation for normal
µ = 0, ‡ 2 = 1 1
2
2 1 1 (x ≠µ)
2
If X follows normal distribution with mean µ, and
f X = x |µ, ‡ =Ô e ≠ 2 ‡2
1 2 1 1 (x ≠µ)
2
2fi‡ 2 variance ‡ 2 , we write
f X = x |µ, ‡ 2 = Ô e ≠ 2 ‡2
2fi‡ 2
I Mean: E (X ) = µ X ≥ N (µ, ‡ 2 ).
I Distribution function: no functional form–required ≠4 0 4 I Variance: Var (X ) = ‡ 2
calculator or table to find F (x )
I Usage: very common–IQ, weight, height Remarks:
I µ: change the location of distribution
I ‡ 2 : change the spread of distribution
Chiu Yu KO 145 / 213 Chiu Yu KO 146 / 213 Chiu Yu KO 148 / 213 Chiu Yu KO 152 / 213
Chiu Yu KO 153 / 213 Chiu Yu KO 154 / 213 Chiu Yu KO 156 / 213 Chiu Yu KO 157 / 213
Graph for standard normal examples Special values from Z-table Graph for empirical rule Inverse Normal
0.9192
Consider Z ≥ N (0, 1). Using the Z-table inversely, we
z
0 1.4 Rule of thumb can
Empirical rule, or three sigma rule or 68-95-99-rule: I find z such that Pr(Z < z ) for any given
0.0548 68% 0 Æ – Æ 1.
I Pr (≠1 < Z < 1) ¥ 0.68,
z I Pr (≠2 < Z < 2) ¥ 0.95, 95% I By complement rule, we can find find z such that
≠1.6 0 Pr(Z > z ) for any given 0 Æ – Æ 1.
I Pr (≠3 < Z < 3) ¥ 0.99 99%
I Denote z– such that Pr(Z > z– ) = – for
0.8644 z
≠3 ≠2 ≠1 0 1 2 3 0 Æ – Æ 1.
z
≠1.6 0 1.4
Chiu Yu KO 158 / 213 Chiu Yu KO 163 / 213 Chiu Yu KO 164 / 213 Chiu Yu KO 165 / 213
Chiu Yu KO 168 / 213 Chiu Yu KO 169 / 213 Chiu Yu KO 170 / 213 Chiu Yu KO 171 / 213
z z
0 1 ≠1 0 1