# Random Processes in Communication and Control/M-Sep14

## Last Time

PMF $P[X=x]=P[s:X(s)=x]\!\,$ a) $P_{X}(x)\geq 0\forall x\in S_{x}\!\,$ b) $\sum _{x\in S_{X}}P_{X}(x)=1\!\,$ c) event $B\subset S_{X}\!\,$ $P[B]=\sum _{x\in B}P_{X}(x)\!\,$ ## Some Useful Random Variables

### Bernoulli R.V

$P_{X}(x)={\begin{cases}1-p&x=0\\p&x=1\\0&o.w.\end{cases}}\!\,$ $0\leq p\leq 1\!\,$ success probability

#### Example

1) Flip a coin $X=\!\,$ # of H

2) Manufacture a Chip $X=\!\,$ # of acceptable chips

3) Bits you transmit successfully by a modem

### Geometric Random Variable

Number of trials until (and including) a success for an underlying Bernoulli

$P_{X}(x)=p(1-p)^{x-1}\quad x=1,2,3,\ldots \!\,$ #### Example

1) Repeated coin flips $X=\!\,$ # of tosses until H

2) Manufacture chips $X=\!\,$ 3 of chips produced until an acceptable time

### Binomial R.V

"# of successes in n trials"

$P_{x}(x)={n \choose x}p^{x}(1-p)^{n-x}\quad x=0,1,\ldots n\!\,$ #### Example

1) Flip a coin n times. $X=\!\,$ # of heads.

2) Manufacture n chips. $X=\!\,$ # of acceptable chips.

Note: Binomial $X=Y_{1}+Y_{2}+Y_{3}+\ldots +Y_{n}\!\,$ where $Y_{1}+Y_{2}+Y_{3}\ldots +Y_{n}\!\,$ are independent Bernoulli trials

Note: n=1; Binomial=Bernoulli; $X=Y_{1}\!\,$ ### Pascal R.V

"number of trials until (and including) the kth success with an underlying Bernoulli"

$P_{X}(x)={x-1 \choose k-1}p^{k}(1-p)^{x-k}\quad x=k,k+1,k+2,\ldots \!\,$ where ${x-1 \choose k-1}\!\,$ is $k-1\!\,$ successes in $x-1\!\,$ trials

Note: Pascal $X=Y_{1}+Y_{2}+\ldots +Y_{k}\!\,$ where $Y_{1},Y_{2},\ldots Y_{k}\!\,$ are geometric R.V.

Note: K=1 Pascal=Geometric

#### Example

$X=\!\,$ # of flips until the kth H

### Discrete Uniform R.V.

$P_{X}(x)={\begin{cases}{\frac {1}{b-a+1}}&x=a,a+1,\ldots ,b\\0&{\mbox{otherwise}}\end{cases}}\!\,$ #### Example

1) Rolling a die. $a=1,b=6\!\,$ $P_{X}(x)={\begin{cases}{\frac {1}{6}}&x=1,\ldots ,6\\0&{\mbox{otherwise}}\end{cases}}\!\,$ 2) Flip a fair coin. $X\!\,$ =# of H

$P_{X}(x)={\begin{cases}{\frac {1}{2}}&x=0\\{\frac {1}{2}}&x=1\\0&{\mbox{ otherwise }}\end{cases}}\!\,$ ### Poisson R.V.

$P_{X}(x)=e^{-\alpha }{\frac {\alpha ^{x}}{x!}}\quad x=0,1,2\ldots \!\,$ (Exercise) limiting case of binomial with $n\rightarrow \infty ,p\rightarrow 0,np=\alpha \!\,$ PMF is a complete model for a random variable

## Cumulative Distribution Function

$F_{X}(x)=P[X\leq x]=\sum _{x'\leq x}P_{X}(X=x')\!\,$ Like PMF, CDF is a complete description of random variable.

### Example

Flip the coins $X=\!\,$ # of H

$P_{X}(x)={\begin{cases}{\frac {1}{4}}&x=0\\{\frac {1}{2}}&x=1\\{\frac {1}{2}}&x=2\\0&{\mbox{otherwise}}\end{cases}}\!\,$ {\begin{aligned}P[X\leq 0]&=P[X=0]\\P[X\leq 0.5]&=P[X=0]\\P[X\leq 1]&=\underbrace {P[X=0]} _{\frac {1}{4}}+\underbrace {P[X=1]} _{\frac {1}{2}}\\\end{aligned}}\!\, ### Properties of CDF

• a) $F_{X}(-\infty )=0\Leftarrow F_{X}(-\infty )=P[X\leq -\infty ]=0\!\,$ $F_{X}(\infty )=1\Leftarrow F_{X}(\infty )=P[X\leq \infty ]=1\!\,$ "starts at 0 and ends at 1"

• b) For all $x'\geq x\!\,$ , $F_{X}(x')\geq F_{X}(x)\!\,$ "non-decreasing in x"

{\begin{aligned}F_{X}(x')&\quad F_{X}(x)\\P[X\leq x']&\quad P[X\leq x]\\P[s:X(s)\leq x']&\quad P[s:X(s)\leq x]\\\{s:X(s)\leq x\}&\subset \{s:X(s)\leq x'\}\\P[X\leq x]&\leq P[X\leq x']\\F_{X}(x)&\leq F_{X}(x')\end{aligned}}\!\, • c) For all $x,x'\!\,$ $P[x\leq X\leq x']=F_{X}(x')-F_{X}(x)\!\,$ "probabilities can be found by difference of the CDF"

$\{s:X(x)\leq x'\}=\{s:X(x)\leq x\}\cup \{s:x\leq X(s)\leq x'\}\!\,$ $P[X\leq x']=P[X\leq x]+P[x\leq X\leq x']\!\,$ • d) For all $x\!\,$ ,

$\lim _{\epsilon \rightarrow 0}F_{X}(x+\epsilon )=F_{X}(x)\!\,$ "CDF is right continuous"

• e) For $x_{i}\in S_{X}\!\,$ $F_{X}(x_{i})-F_{X}(x_{i}-\epsilon )=P_{X}(x_{i})\!\,$ "For a discrete random variable, there is a jump (discontinuity) in the CDF at each value $x_{i}\in S_{X}\!\,$ . This jump equals $P_{X}(x_{i})\!\,$ $P[x_{i}\leq x]-P[x_{i}\leq x_{i}-\epsilon ]=P[x_{i}-\epsilon • f) $F_{X}(x)=F_{X}(x_{i})\!\,$ for all $x_{i}\leq x\leq x_{i+1}\!\,$ "Between two jumps the CDF is constant"

{\begin{aligned}P[X\leq x]&=P[X\leq x_{i}\cup x_{i} • g) $P[X>x]=1-\underbrace {F_{X}(x)} _{P[X\leq x]}\!\,$ ## Continuous Random Variables

outcomes uncountable many

### Example

T: arrival of a partical

$S_{T}=\{t:0\leq t<\infty \}\!\,$ V: voltage

$S_{V}=\{v:-\infty $\theta \!\,$ : angle

$S_{\theta }=\{\theta :0\leq \theta \leq 2\pi \}\!\,$ $X\!\,$ : distance

$S_{X}=\{X:0\leq x\leq 1\}\!\,$ $P[x\in A]={\frac {1}{n}}\rightarrow 0\!\,$ No PMF, $P[X=x]=0\forall x\!\,$ ### Theorem

For any random variable (continuous or discrete)

• a) $F_{X}(-\infty )=0\quad F_{X}(\infty )=1\!\,$ • b) $F_{X}(x)\!\,$ is nondecreasing in $X\!\,$ • c) $P[x • d) $F_{X}(x)\!\,$ is right continuous

### Example

$S_{X}=[0,1]\!\,$ $P_{[}x\in A]=P[x\ inB]\!\,$ where A, B are intervals of the same length contained in [0,1]

$P[X\leq 1]=1\Leftrightarrow F_{X}(1)=1\!\,$ $P[X\leq 0]=0\Leftrightarrow F_{X}(0)=0\!\,$ $P[x_{1} (exercise)$F_{X}(x_{2})-F_{X}(x_{1})=F_{X}(x_{2}-x_{1})\rightarrow F_{x}(x)=x\!\,$ ### Probability Density Function (PDF)

$f_{X}(x)={\frac {dF_{x}(x)}{dx}}\!\,$ discrete: PMF <--> CDF (sum/difference)

continuous <---> (derivative/integral)

### Theorem: Properties of PDF

• a) $f_{X}(x)\geq 0\!\,$ ($F_{X}(x)\!\,$ is nondecreasing)

• b) $F_{X}(x)=\int _{\infty }^{x}f_{X}(x)dx\quad (F_{X}(\infty )=0)\!\,$ • c) $\int _{-\infty }^{\infty }f_{X}(x)dx=1\quad (F_{x}(\infty )=1)\!\,$ ### Theorem

{\begin{aligned}P[x_{1}\leq X\leq x_{2}]&=F_{X}(x_{2})-F_{X}(x_{1})\\&=\int _{-\infty }^{x_{2}}f_{X}(x)dx-\int _{-\infty }^{x_{1}}f_{X}(x)dx\\&=\int _{x_{1}}^{x_{2}}f_{X}(x)\end{aligned}}\!\, ### Some useful continuous Random Variables

#### Uniform R.V

$f_{X}(x)={\begin{cases}{\frac {1}{b-a}}&a\leq x\leq b\\0&{\mbox{otherwise}}\end{cases}}\!\,$ #### Exponential R.V

$f_{X}(x)=ae^{-ax}\quad x\geq 0\!\,$ $F_{x}(x)=1-e^{-ax}\!\,$ #### Gaussian (Normal) R.V.

${\mathcal {N}}(\mu ,\sigma ^{2})\quad \infty $f_{X}(x)={\frac {1}{\sqrt {2\pi \sigma ^{2}}}}e^{-{\frac {(x-\mu )^{2}}{2\sigma ^{2}}}}\!\,$ $F_{X}(x)=\int _{-\infty ^{1}}{\frac {1}{\sqrt {2\pi \sigma ^{2}}}}e^{-{\frac {x-\mu }{2\sigma ^{2}}}}\!\,$ 