# 0.9 Lab 7a - discrete-time random processes (part 1)  (Page 3/5)

 Page 3 / 5

## Linear transformation of a random variable

A linear transformation of a random variable $X$ has the following form

$Y=aX+b$

where $a$ and $b$ are real numbers, and $a\ne 0$ . A very important property of lineartransformations is that they are distribution-preserving , meaning that $Y$ will be random variable with a distribution of the same form as $X$ . For example, in [link] , if $X$ is Gaussian then $Y$ will also be Gaussian, but not necessarily with the same mean and variance.

Using the linearity property of expectation, find the mean ${\mu }_{Y}$ and variance ${\sigma }_{Y}^{2}$ of $Y$ in terms of $a$ , $b$ , ${\mu }_{X}$ , and ${\sigma }_{X}^{2}$ . Show your derivation in detail.

First find the mean, then substitute the result when finding the variance.

Consider a linear transformation of a Gaussian random variable $X$ with mean 0 and variance 1. Calculate the constants $a$ and $b$ which make the mean and the variance of Y 3 and 9, respectively. Using [link] , find the probability density function for $Y$ .

Generate 1000 samples of $X$ , and then calculate 1000 samples of $Y$ by applying the linear transformation in [link] , using the $a$ and $b$ that you just determined. Plot the resulting samples of $Y$ , and use your functions to calculate the sample mean and sample variance of the samples of $Y$ .

## Inlab report

1. Submit your derivation of the mean and variance of $Y$ .
2. Submit the transformation you used, and the probability density function for $Y$ .
3. Submit the plot of samples of $Y$ and the Matlab code used to generate $Y$ . Include the calculated sample mean and sample variance for $Y$ .

## Estimating the cumulative distribution function

Suppose we want to model some phenomenon as a random variable $X$ with distribution ${F}_{X}\left(x\right)$ . How can we assess whether or not this is an accurate model?One method would be to make many observations and estimate the distribution function based on the observed values.If the distribution estimate is “close” to our proposed model ${F}_{X}\left(x\right)$ , we have evidence that our model is a good characterization of thephenomenon. This section will introduce a common estimate of thecumulative distribution function.

Given a set of i.i.d. random variables $\left\{{X}_{1},{X}_{2},...,{X}_{N}\right\}$ with CDF ${F}_{X}\left(x\right)$ , the empirical cumulative distribution function ${\stackrel{^}{F}}_{X}\left(x\right)$ is defined as the following.

$\begin{array}{ccc}\hfill {\stackrel{^}{F}}_{X}\left(x\right)& =& \frac{1}{N}\sum _{i=1}^{N}{I}_{\left\{{X}_{i}\le x\right\}}\hfill \\ \hfill {I}_{\left\{{X}_{i}\le x\right\}}& =& \left\{\begin{array}{cc}1,\hfill & \text{if}\phantom{\rule{4.pt}{0ex}}{X}_{i}\le x\hfill \\ 0,\hfill & \text{otherwise}\hfill \end{array}\right)\hfill \end{array}$

In words, ${\stackrel{^}{F}}_{X}\left(x\right)$ is the fraction of the ${X}_{i}$ 's which are less than or equal to $x$ .

To get insight into the estimate ${\stackrel{^}{F}}_{X}\left(x\right)$ , let's compute its mean and variance.To do so, it is easiest to first define ${N}_{x}$ as the number of ${X}_{i}$ 's which are less than or equal to $x$ .

${N}_{x}=\sum _{i=1}^{N}{I}_{\left\{{X}_{i}\le x\right\}}=N{\stackrel{^}{F}}_{X}\left(x\right)$

Notice that $P\left({X}_{i}\le x\right)={F}_{X}\left(x\right)$ , so

$\begin{array}{ccc}\hfill P\left({I}_{\left\{{X}_{i}\le x\right\}}=1\right)& =& {F}_{X}\left(x\right)\hfill \\ \hfill P\left({I}_{\left\{{X}_{i}\le x\right\}}=0\right)& =& 1-{F}_{X}\left(x\right)\hfill \end{array}$

Now we can compute the mean of ${\stackrel{^}{F}}_{X}\left(x\right)$ as follows,

$\begin{array}{ccc}\hfill E\left[{\stackrel{^}{F}}_{X},\left(x\right)\right]& =& \frac{1}{N}E\left[{N}_{x}\right]\hfill \\ & =& \frac{1}{N}\sum _{i=1}^{N}E\left[{I}_{\left\{{X}_{i}\le x\right\}}\right]\hfill \\ & =& \frac{1}{N}NE\left[{I}_{\left\{{X}_{i}\le x\right\}}\right]\hfill \\ & =& 0·P\left({I}_{\left\{{X}_{i}\le x\right\}},=,0\right)+1·P\left({I}_{\left\{{X}_{i}\le x\right\}},=,1\right)\hfill \\ & =& {F}_{X}\left(x\right)\phantom{\rule{4pt}{0ex}}.\hfill \end{array}$

This shows that ${\stackrel{^}{F}}_{X}\left(x\right)$ is an unbiased estimate of ${F}_{X}\left(x\right)$ . By a similar approach, we can show that

$Var\left[{\stackrel{^}{F}}_{X},\left(x\right)\right]=\frac{1}{N}{F}_{X}\left(x\right)\left(1-{F}_{X}\left(x\right)\right)\phantom{\rule{4pt}{0ex}}.$

Therefore the empirical CDF ${\stackrel{^}{F}}_{X}\left(x\right)$ is both an unbiased and consistent estimate of the true CDF.

## Exercise

Write a function F=empcdf(X,t) to compute the empirical CDF ${\stackrel{^}{F}}_{X}\left(t\right)$ from the sample vector $X$ at the points specified in the vector $t$ .

The expression sum(X<=s) will return the number of elements in the vector $X$ which are less than or equal to $s$ .

what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers! By By  By  By  By By 