Learn practical skills, build real-world projects, and advance your career

MA2102

Probability and Statistics

Lecture-12

Transformations

Let XX be a random variable defined on probability space (Ω,F,P)(\Omega,\mathscr{F},P), with probability distribution PXP^X, and we are often interested in a random variable YY which is some transformation of XX, say Y=g(X)Y=g(X), then YY will be another random variable on (Ω,F,P)(\Omega,\mathscr{F},P)

Note: Technically g:RRg:\mathbb{R}\to\mathbb{R} should be Borel measurable function so that Y=g(X)Y=g(X) will be again a random variable on (Ω,F,P)(\Omega,\mathscr{F},P)
(A function f:RRf:\mathbb{R}\to\mathbb{R} is said to be Borel measurable function if f1(B)B BBf^{-1}(B)\in\mathscr{B}~\forall B\in\mathscr{B})

import numpy as np
from matplotlib import patches
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.subplots()


Omega = patches.Ellipse((0.14, 0.5), 0.2, 0.5,
                     angle=0, linewidth=2, fill=False, zorder=2,color='purple')

XR = patches.Rectangle((0.4, 0.25), 0.2, 0.5,
                     angle=0, linewidth=2, fill=False, zorder=2,color='blue')

gR = patches.Rectangle((0.75, 0.25), 0.2, 0.5,
                     angle=0, linewidth=2, fill=False, zorder=2,color='red')
ax.add_patch(Omega)
ax.add_patch(XR)
ax.add_patch(gR)

ax.text(0.1,0.8,r"$\Omega$",fontsize=15)
ax.text(0.45,0.8,r"$\mathbb{R}$",fontsize=15)
ax.text(0.8,0.8,r"$\mathbb{R}$",fontsize=15)

ax.arrow(0.15,0.82,0.25,0,width=0.005,color='navy')
ax.arrow(0.5,0.82,0.25,0,width=0.005,color='green')
ax.text(0.23,0.85,r"$X$",fontsize=15)
ax.text(0.63,0.85,r"$g$",fontsize=15)

ax.arrow(0.13,0.55,0.30,0,width=0.003,color='black')
ax.arrow(0.56,0.55,0.26,0,width=0.003,color='black')
ax.text(0.09,0.55,r"$\omega$",fontsize=15)
ax.text(0.47,0.55,r"$x$",fontsize=15)
ax.text(0.85,0.55,r"$y$",fontsize=15)
plt.axis('off')
plt.show()
Notebook Image