<< Chapter < Page | Chapter >> Page > |

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$ .

- Submit your derivation of the mean and variance of $Y$ .
- Submit the transformation you used, and the probability density function for $Y$ .
- 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$ .

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
$\{{X}_{1},{X}_{2},...,{X}_{N}\}$ with CDF
${F}_{X}\left(x\right)$ ,
the
*empirical* cumulative distribution function
${\widehat{F}}_{X}\left(x\right)$ is defined as the following.

$$\begin{array}{ccc}\hfill {\widehat{F}}_{X}\left(x\right)& =& \frac{1}{N}\sum _{i=1}^{N}{I}_{\{{X}_{i}\le x\}}\hfill \\ \hfill {I}_{\{{X}_{i}\le x\}}& =& \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, ${\widehat{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 ${\widehat{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}_{\{{X}_{i}\le x\}}=N{\widehat{F}}_{X}\left(x\right)$$

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

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

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

$$\begin{array}{ccc}\hfill E\left[{\widehat{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}_{\{{X}_{i}\le x\}}\right]\hfill \\ & =& \frac{1}{N}NE\left[{I}_{\{{X}_{i}\le x\}}\right]\hfill \\ & =& 0\xb7P\left({I}_{\{{X}_{i}\le x\}},=,0\right)+1\xb7P\left({I}_{\{{X}_{i}\le x\}},=,1\right)\hfill \\ & =& {F}_{X}\left(x\right)\phantom{\rule{4pt}{0ex}}.\hfill \end{array}$$

This shows that ${\widehat{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[{\widehat{F}}_{X},\left(x\right)\right]=\frac{1}{N}{F}_{X}\left(x\right)(1-{F}_{X}\left(x\right))\phantom{\rule{4pt}{0ex}}.$$

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

Write a function
`F=empcdf(X,t)`

to compute the empirical CDF
${\widehat{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$ .-
100% Free
*Android Mobile*Application - Complete Textbook by OpenStax
- Multiple Choices Questions (MCQ)
- Essay Questions Flash Cards
- Key-Terms Flash Cards

Source:
OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4

Google Play and the Google Play logo are trademarks of Google Inc.

*Notification Switch*

Would you like to follow the *'Purdue digital signal processing labs (ece 438)'* conversation and receive update notifications?