Lecture 1
Lecture 1
Juergen Meinecke
1 / 102
Roadmap
Univariate Probability
Random Variables, Probability Distributions
2 / 102
Definition
The mutually exclusive potential results of a random process are
called outcomes.
Definition
The set of all possible outcomes is called sample space.
Definition
An event is a subset of the sample space.
3 / 102
Example:
random process rolling a die
4 / 102
Example:
random process
number of kangaroos spotted during my morning run
5 / 102
Definition
A random variable 𝑌 is the numerical representation of an
outcome in a random process.
6 / 102
Random variables save us a lot of notation
7 / 102
Definition
The probability distribution of a random variable 𝑌 is the full
characterization of probabilities for all possible outcomes of a
random process.
8 / 102
Example: probability distribution of age
⎧0.05
{ if 𝑦 = 18
{
{0.14
{ if 𝑦 = 19
{0.24 if 𝑦 = 20
{
{
{0.23 if 𝑦 = 21
{
{
Pr(𝑌 = 𝑦) = ⎨0.14 if 𝑦 = 22
{
{0.15
{ if 𝑦 = 23
{
{0.02
{ if 𝑦 = 24
{0.02 if 𝑦 = 25
{
{
{0.01 if 𝑦 = 26
⎩
9 / 102
Example: cumulative probability distribution of heights
⎧0.05
{ if 𝑦 = 18 ⎧0.05
{ if 𝑦 = 18
{ {
{0.14
{ if 𝑦 = 19 {0.19
{ if 𝑦 = 19
{0.24 if 𝑦 = 20 {0.43 if 𝑦 = 20
{ {
{ {
{0.23 if 𝑦 = 21 {0.66 if 𝑦 = 21
{ {
{ {
Pr(𝑌 = 𝑦) = ⎨0.14 if 𝑦 = 22 Pr(𝑌 ≤ 𝑦) = ⎨0.80 if 𝑦 = 22
{ {
{0.15
{ if 𝑦 = 23 {0.95
{ if 𝑦 = 23
{ {
{0.02
{ if 𝑦 = 24 {0.97
{ if 𝑦 = 24
{0.02 if 𝑦 = 25 {0.99 if 𝑦 = 25
{ {
{ {
{0.01 if 𝑦 = 26 {1.00 if 𝑦 = 26
⎩ ⎩
10 / 102
Frequency plot (histogram)
11 / 102
Review of Probability and Statistics
Juergen Meinecke
12 / 102
Roadmap
Univariate Probability
13 / 102
Definition
Suppose the random variable 𝑌 takes on 𝑘 possible values
𝑦1 , … , 𝑦𝑘 . The expected value is given by
𝑘
𝐸[𝑌] ∶= ∑ 𝑦𝑗 ⋅ Pr(𝑌 = 𝑦𝑗 ) (1)
𝑗=1
14 / 102
Example: age distribution
Recall
⎧0.05 if 𝑦 = 18
{ ⎧0.15
{
{ { if 𝑦 = 23
{
{ 0.14 if 𝑦 = 19 {
{
{ {0.02 if 𝑦 = 24
Pr(𝑌 = 𝑦) = ⎨0.24 if 𝑦 = 20 Pr(𝑌 = 𝑦) = ⎨
{
{ {0.02
{ if 𝑦 = 25
{
{ 0.23 if 𝑦 = 21 {
{ {0.01 if 𝑦 = 26
{0.14 ⎩
⎩ if 𝑦 = 22
15 / 102
Properties of the expected value
16 / 102
Definition
The 𝑟𝑡ℎ moment of a random variable 𝑌 is given by
𝑚𝑟 (𝑌) ∶= 𝐸[𝑌 𝑟 ], for 𝑟 = 1, 2, 3, …
It is obivous that the first moment and the expected value are the
same
17 / 102
Definition
The population variance is defined by
𝑘
Var [𝑌] ∶= ∑(𝑦𝑗 − 𝜇𝑦 )2 ⋅ Pr(𝑌 = 𝑦𝑗 )
𝑗=1
Definition
The population standard deviation is defined by
18 / 102
Example: age distribution
We have 𝑦1 = 18, 𝑦2 = 19, … , 𝑦9 = 26
Doing the math
9
Var [𝑌] = ∑(𝑦𝑗 − 𝜇𝑦 )2 ⋅ Pr(𝑌 = 𝑦𝑗 )
𝑗=1
Therefore
StD[𝑌] = 1.66
19 / 102
Properties of the variance
20 / 102
Review of Probability and Statistics
Juergen Meinecke
21 / 102
Roadmap
Univariate Probability
22 / 102
Definition
A population is a well defined group of subjects.
Examples
• Australian citizens
• kangaroos in Tidbinbilla
• leukocytes in the bloodstream
• protons in an atom
• lactobacilli in yogurt
23 / 102
Definition
The population size 𝑁 is the number of subjects in the population.
24 / 102
Example: population of Australian citizens
Clearly, 𝑁 = 26, 310, 784
For all practical purposes it is so large that it might as well
have been 𝑁 = ∞
Example: kangaroos in Tidbinbilla
25 / 102
The point is:
for some reason we are not able to observe the entire population
(too difficult, too big, too costly)
Instead, we only have a random sample of the population
26 / 102
Definition
In a random sample, 𝑛 subjects are selected
(without replacement) at random from the population.
27 / 102
The random variable for the 𝑖-th randomly drawn subject is denoted
𝑌𝑖
Definition
Because each subject is equally likely to be drawn and the
distribution is the same for all 𝑖, the random variables 𝑌1 , … , 𝑌𝑛
are independently and identically distributed (i.i.d.)
with mean 𝜇𝑌 and variance 𝜎𝑌2 .
We write 𝑌𝑖 ∼ i.i.d.(𝜇𝑌 , 𝜎𝑌2 ).
28 / 102
Review of Probability and Statistics
Juergen Meinecke
29 / 102
Roadmap
Univariate Probability
Sample Average
30 / 102
In analogy to the mean of a population,
we define the mean of a subset of the population:
Definition
The sample average is the average outcome in the sample:
1 𝑛
𝑌̄ ∶= ∑ 𝑌𝑖
𝑛 𝑖=1
31 / 102
Let’s say we are interested in learning about the weights of
kangaroos in Tidbinbilla
We drive to Tidbinbilla and somehow randomly collect 30 roos and
measure their weights
This will give us a random sample of size 30 of kangaroo weights
32 / 102
There is a huge difference between the population mean and the
sample mean
There is only one population, therefore there is only one population
mean
But there are many different random subsets (samples) of the
population, each of which results in a (potentially) different sample
average
33 / 102
It is unlikely that the second time around we collect exactly the same
30 roos (while it is possible, it is not probable)
If we collect a different subset of 30 kangaroos, chances are that we
come up with a different sample average
Suppose we obtain a sample average of 49kg
And now we collect a third random sample …
34 / 102
This illustrates that the sample average itself is a random variable!
Random variables have statistical distributions
What distribution does the sample average have?
35 / 102
Let 𝑌𝑖 ∼ i.i.d.(𝜇𝑌 , 𝜎𝑌2 ) for all 𝑖
• population mean 𝜇𝑌
• variance 𝜎𝑌2
36 / 102
Expected value
𝑛
1
E[𝑌]̄ = E ⎡
⎢ ∑ 𝑌𝑖 ⎥
⎤
𝑛
⎣ 𝑖=1 ⎦
𝑛
1
= E⎡ ⎤
⎢∑ 𝑌𝑖 ⎥
𝑛 ⎣𝑖=1 ⎦
1 𝑛
= ∑ E[𝑌𝑖 ]
𝑛 𝑖=1
1 𝑛
= ∑𝜇
𝑛 𝑖=1 𝑌
1
= 𝑛𝜇
𝑛 𝑌
= 𝜇𝑌
37 / 102
Variance
1 𝑛
Var [𝑌]̄ = Var ⎡
⎢ ∑ 𝑌𝑖 ⎥
⎤
⎣ 𝑛 𝑖=1 ⎦
𝑛
1
= 2 Var ⎡ ⎤
⎢∑ 𝑌𝑖 ⎥
𝑛 ⎣𝑖=1 ⎦
1 𝑛
= ∑ Var [𝑌𝑖 ]
𝑛2 𝑖=1
1 𝑛 2
= ∑𝜎
𝑛2 𝑖=1 𝑌
1
= 𝑛𝜎 2
𝑛2 𝑌
= 𝜎𝑌2 /𝑛
38 / 102
Standard deviation
StD(𝑌)̄ = 𝜎𝑌 /√𝑛
39 / 102