Professional Documents
Culture Documents
Department of Economics
National Taiwan University
2023.7.14.
Section 1
Random Variables
Definition
A random variable is a variable that takes values according to a
certain probability distribution.
Keys to know:
All the possible values it can take.
The probability distribution according to which it takes all
possible values.
Definition
A random variable X is a real-value function from the sample space
to the real numbers:
X ∶ Ω z→ R
and it assigns to each element ω ∈ Ω one and only one real number
X(ω) = x.
The set of all possible values that a random variable X can take is
called the range of X.
Small letter x denotes the possible value of a random variable X.
Random Variables
Section 2
Examples
Probability Distribution
f (x) = P(X = x)
Definition (Support)
The support (砥柱集合) of a random variable X is defined as:
Properties:
∑ f (x) = 1
x∈supp(X)
An Example of pmf
𝑓(𝑥)
𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 𝑥6 𝑥
ω P({ω}) X(ω)
x f (x) = P(X = x)
TT 1/4 0
0 1/4
TH 1/4 1
1 1/2
HT 1/4 1
2 1/4
HH 1/4 2
݂ሺݔሻ
ͳ
ʹ
ͳ
Ͷ
ݔ
Ͳ ͳ ʹ
We write X ∼ Bernoulli(p).
It is denoted by Y ∼ Binomial(n, p)
Y = X1 + X2 + ⋯ + X n ,
Section 3
f (x) ≥ 0, ∀x
P(a ≤ X ≤ b)
= P(a < X < b)
= P(a ≤ X < b)
= P(a < X ≤ b)
pdf:
f (x) ∶ R ↦ R+ , f (x) ≠ P(X = x)
That is, density is not probability.
b−a
P(a ≤ X ≤ b) = .
h−l
Uniform Distribution
1.0
0.8
dunif(x, min = 0, max = 1)
0.6
0.4
0.2
0.0
Section 4
{X ≤ x}, x ∈ R
F(x) = P(X ≤ x)
If X is discrete,
F(x) = P(X ≤ x) = ∑ P(X = u) = ∑ f (u)
u≤x u≤x
If X is continuous,
x
F(x) = P(X ≤ x) = ∫ f (u)du
−∞
𝑓(𝑢)
𝐹(𝑥)
𝑢
𝑥
supp(X) = {x1 , x2 x3 }
𝐹(𝑥)
1
𝑃(𝑋 = 𝑥1 )+𝑃(𝑋 = 𝑥2 )
𝑃(𝑋 = 𝑥1 )
𝑥1 𝑥2 𝑥3 𝑥
(NTU Econ) Basic Quantitative Method 2023.7.14. 36 / 43
Cumulative Distribution Function
1
𝐹(𝑥)
0 𝑥
Example 1: Bernoulli(p)
Example 1: Bernoulli(p)
𝐹(𝑥)
1−𝑃
𝑥
0 1
Example 2: Uniform [l , h]
Example 2: Uniform [l , h]
𝐹(𝑥)
1
0
𝑙 ℎ 𝑥
Section 5
Quantiles
Quantiles
Definition (Quantiles)
Let F denote the CDF of a random variable X. The function
π p = F −1 (p) = {x∣F(x) = p}