Lecture 1. Introduction and Random Variables: Kwong-Yu Wong
Lecture 1. Introduction and Random Variables: Kwong-Yu Wong
Lecture 1. Introduction and Random Variables: Kwong-Yu Wong
Kwong-Yu Wong
1
No answer sheet will be accepted 2 days after the deadlines
Kwong-Yu Wong Lecture 1. Introduction and random variables 7 / 43
Problem set and Tutorial session
▶ Participation
▶ Each tutorial sessions accounts for 1%. Half from showing up to
participate and half from proactive participation (e.g.
answering/asking questions)
▶ For excused absence, please provide a medical certificate or a
statement of reasons to your TA to avoid deduction.
▶ In addition to the 11% from 11 tutorial sessions, the final 1% is
rewarded to those who never miss any tutorial session, excluding
excused absence.
2
TWXX is your tutorial session number.
Kwong-Yu Wong Lecture 1. Introduction and random variables 10 / 43
Shall we start?
▶ We distinguish by notation
▶ Random variable: Upper case (e.g. X)
▶ Potential outcome: Lower case (e.g. x)
▶ Let usdefine X (the random variable) as
−1 if tail shows up
X=
1 if head shows up
Definition
Probability Mass Function (PMF) is defined as
fX (x) = P(X = x)a .
a
Note the use of x for the potential outcome as opposed to the random
variable X.
1/6 at x = 1
1/6 at x = 2
1/6 at x = 3
▶ fX (x) = P(X = x) = 1/6 at x = 4
1/6 at x = 5
1/6 at x = 6
0 otherwise
▶ fX (x)?
1/4 at x = 0
1/2 at x = 1
Answer: fX (x) = P(X = x) =
1/4 at x = 2
0 otherwise
Definition
Cumulative Distribution Function (CDF) is defined as
FX (x) = P(X ≤ x).
Definition 1
Probability Mass Function (PMF) is defined as
fX (x) = P(X = x).
Definition 2
Cumulative Distribution Function (CDF) is defined as
FX (x) = P(X ≤ x).
▶ For a fixed x,
▶ P(X ≤ x) is,
▶ P(X ≤ x) is,
Two coins toss example: we toss two coins and let X be the number of
heads.
Answer:
0.25 at x = 0
0.5 at x = 1
fX (x) =
0.25 at x = 2
0 otherwise
Answer:
0 when x < 0
0.25 when 0≤x < 1
FX (x) =
0.75 when 1≤x < 2
1 when 2≤x
▶ Once you find the PMF, it is easy to find the CDF, FY (y).
0 when y < 0
0.25 when 0 ≤ y < 1
FY (y) =
0.75 when 1 ≤ y < 4
1 when 4 ≤ y
Let’s go back to our one coin toss example where we defined X to be,
−1 with the probability 0.5
X=
1 with the probability 0.5
Define Y = 2X + 1 and Z = X 2 .
What are the PMF and CDF of Y and Z respectively?
So far, we have only considered the cases where the sample space
consists of discrete numbers.(e.g. coin toss, die rolling)
There is another type of random variable which can take any value in
an interval.
▶ For example, the response time to some stimulus, the sample
space is Ω = (0, ∞), and the possible values of the response time
are measured on a continuum.
Continuous or discrete?
1.
2.
1. Discrete
2. Discrete
Continuous or discrete?
▶ Time between failures of an electrical component
▶ Average temperature in Singapore tomorrow
▶ Weight of packages filled by a mechanical filling process
▶ The favorite integer of a student in EC2303 between 1 and 3
▶ The favorite real number of a student in EC2303 between 1 and 3
▶ The exam score of a student in EC2303
Definition
If X is discrete, Probability Mass Function (PMF) fX (x) is
fX (x) = P(X = x)
Definition
Cumulative Distribution Function (CDF) is defined as
FX (x) = P(X ≤ x).