Probability· Note 04

Random Variables

Year 2 · Semester ElulLast updated

August 27th

Definition

A random variable (r.v.) is a probability space in which the outcomes are possible values of a variable (denoted by a capital letter: X,Y,Z…X,Y,Z…)

Example

X=X= number of dots on a roll of a single die
Ω={1,2,3,4,5,6}\Omega=\{1,2,3,4,5,6\}

Y=Y= number of dots on a roll two dice
Ω={2,…,12}\Omega=\{2,\dots,12\}

Z=Z= number of times die is rolled until it lands on a 3
Ω=N+\Omega=\N_+

W=W= weight of newborn baby in kg.
Ω=[1,4]\Omega=[1,4] note that this is an interval, not distinct values

X,Y,ZX,Y,Z are discrete random values — countable (finite or subset of N\N)
WW is a continuous r.v., the possible values form a continuous interval

The probability function fx(k)f_x(k) of a discrete rv XX gives the probability of XX assuming each of its possible values, ie fX(k)=P(X=k)f_X(k)=P(X=k), meaning, the probability that XX will indeed be kk.

Reiteration of previous example, now with NEW concept!

XX= Roll of one die
fX(2)=P(X=2)=16f_X(2)=P(X=2)=\frac16

Y=Y= Roll two dice
fY(2)=P(Y=2)=136f_Y(2)=P(Y=2)=\frac1{36}
fY(3)=P(Y=3)=236f_Y(3)=P(Y=3)=\frac2{36}
fY(4)=P(Y=4)=336f_Y(4)=P(Y=4)=\frac3{36}
fY(5)=P(Y=5)=436f_Y(5)=P(Y=5)=\frac4{36}
fY(6)=P(Y=6)=536f_Y(6)=P(Y=6)=\frac5{36}
fY(7)=P(Y=7)=636f_Y(7)=P(Y=7)=\frac6{36}
fY(8)=P(Y=8)=536f_Y(8)=P(Y=8)=\frac5{36}
fY(9)=P(Y=9)=436f_Y(9)=P(Y=9)=\frac4{36}
fY(10)=P(Y=10)=336f_Y(10)=P(Y=10)=\frac3{36}
fY(11)=P(Y=11)=236f_Y(11)=P(Y=11)=\frac2{36}
fY(12)=P(Y=12)=136f_Y(12)=P(Y=12)=\frac1{36}

A probability function can be written as a list, or a table, or when possible, by a formula.

Going back to r.v. ZZ, where ZZ is the number of rolls until we get a 3:
What is fZ(k)f_Z(k)?
56×⋯×56⏟k−1 times×16⏟rolling 3 on k-th try=(56)k−1⋅16\underbrace{\frac56\times\dots\times\frac56}_{k-1\text{ times}}\underbrace{\times\frac16}_{\text{rolling 3 on k-th try}}={(\frac56)}^{k-1}\cdot\frac16

Summary

fX(k)=16∣k∈{1,2,3,4,5,6}f_X(k)=\frac16\mid k\in\{1, 2, 3, 4, 5, 6\}
fY(k)=f_Y(k)= [list of values, see above example]
fZ(k)=(56)k−1⋅16f_Z(k)={(\frac56)}^{k-1}\cdot\frac16

Since all outcomes X=kX=k are disjoint and their union (over all possible values kk) is Ω\Omega,

P(Ω)=∑kPX(k)=1P(\Omega)=\sum_kP_X(k)=1
Exercise 4, Question 18

The number of flowers purchased by a customer in a certain flower store in a single purchase is a random variable XX, with the probability function:

PX(x)={k10⋅x2x=1,2,3,40otherwiseP_X(x)=\begin{cases}\frac{k}{10}\cdot x^2&x=1,2,3,4\\0&\text{otherwise}\end{cases}

Find the value of the constant kk.
(Do not confuse xx with XX)


Rewrite formula as table:

xx PX(x)P_X(x)
1 k10⋅12=k10\frac{k}{10}\cdot1^2=\frac{k}{10}
2 k10⋅22=4k10\frac{k}{10}\cdot2^2=\frac{4k}{10}
3 k10⋅32=9k10\frac{k}{10}\cdot3^2=\frac{9k}{10}
4 k10⋅42=16k10\frac{k}{10}\cdot4^2=\frac{16k}{10}
5 0
⋮\vdots 0

We know that the ∑xPX(x)=1\sum_xP_X(x)=1, that is, the sum of all values for PX(x)P_X(x) must be one, so let’s add them up:
k10+4k10+9k10+16k10=1\frac{k}{10}+\frac{4k}{10}+\frac{9k}{10}+\frac{16k}{10}=1

30k10=1⟹k=13\frac{30k}{10}=1\Longrightarrow k=\frac13
Exercise 4, Question 16

If XX is a random variable with the following probability function, find the value of aa:

PX(x)={a(13)xx∈N0x∉NP_X(x)=\begin{cases}a{\left(\frac13\right)}^x&x\in\N\\0&x\not\in\N\end{cases}