.. title: Engineering Probability Class 18 Mon 2022-03-21
.. slug: class18
.. date: 2022-03-21
.. tags: class, exam
.. link: 
.. description: 
.. type: text
.. has_math: true

.. sectnum::
.. contents:: Table of contents::
..


Exam 2
------

Will be in class on Thurs, April 7.  Same rules as exam 1, except you can have 2 2-sided crib sheets.


Trivia question
---------------

Today is the spring equinox.   However, today in Albany, sunrise is at 6:56am, sunset 7:08pm.   That makes the day 12 hours and 12 minutes long, not 12 hours.  Why?



Section 5.7, page 261. Conditional pdf, ctd
-------------------------------------------

#. There is nothing majorly new here; it's an obvious extension of 1 variable.

   #. Discrete: Work out an example with a pair of 3-sided loaded dice.

   #. Continuous: a triangular dart board.  There is one little trick because for P[X=x]=0 since X is continuous, so how can we compute P[Y=y|X=x] = P[Y=y &amp; X=x]/P[x]?  The answer is that we take the limiting probability P[x<X<x+dx] etc as dx shrinks, which nets out to using f(x) etc.

#. Example 5.31 on page 264.  This is a noisy comm channel, now with Gaussian (normal) noise.  This is a more realistic version of the earlier example with uniform noise.  The application problems are:

   #. what input signal to infer from each output,
   #. how accurate is this, and
   #. what cutoff minimizes this?

   In the real world there are several ways you could reduce that error:

   #. Increase the transmitted signal,
   #. Reduce the noise,
   #. Retransmit several times and vote.
   #. Handshake: Include a checksum and ask for retransmission if it fails.
   #. Instead of just deciding X=+1 or X=-1 depending on Y, have a 3rd decision, i.e., *uncertain* if $|Y|<0.5$, and ask for retransmission in that case.  

#. Section 5.8 page 271: Functions of two random variables.

   #. We already saw how to compute the pdf of the sum and max of 2 r.v.

#. What's the point of transforming variables in engineering?  E.g. in video, (R,G,B) might be transformed to (Y,I,Q) with a 3x3 matrix multiply.  Y is brightness (mostly the green component).  I and Q are approximately the red and blue.  Since we see brightness more accurately than color hue, we want to transmit Y with greater precision.  So, we want to do probabilities on all this.

#. Functions of 2 random variables

   #. This is an important topic.
   #. Example 5.44, page 275. Tranform two independent Gaussian r.v from
      (X,Y) to (R, $\\theta$} ).  
   #. Linear transformation of two Gaussian r.v.  
   #. Sum and difference of 2 Gaussian r.v. are independent.

#. Section 5.9, page 278: pairs of jointly Gaussian r.v.

   #. I will simplify formula 5.61a by assuming that $\\mu=0, \\sigma=1$.

      $$f_{XY}(x,y)= \\frac{1}{2\\pi \\sqrt{1-\\rho^2}} e^{ \\frac{-\\left( x^2-2\\rho x y + y^2\\right)}{2(1-\\rho^2)} }  $$ .

   #. The r.v. are probably dependent.  $\\rho$} says how much.
   #. The formula degenerates if $|\\rho|=1$ since the numerator and denominator are both zero.  However the pdf is still valid.  You could make the formula valid with l'Hopital's rule.
   #. The lines of equal probability density are ellipses.
   #. The marginal pdf is a 1 variable Gaussian.

#. Example 5.47, page 282: Estimation of signal in noise

   #. This is our perennial example of signal and noise.  However, here the signal is not just $\\pm1$ but is normal.  Our job is to find the ''most likely'' input signal for a given output.



#. Important concept in the noisy channel example (with X and N both being
   Gaussian):   The most likely value of X given Y is
   not Y but is somewhat smaller, depending on the relative sizes of
   :math:`\sigma_X` and :math:`\sigma_N`.  This is true in spite of :math:`\mu_N=0`. It
   would be really useful for you to understand this intuitively.  Here's
   one way:

   If you don't know Y, then the most likely value of X is 0.  Knowing Y
   gives you more information, which you combine with your initial info
   (that X is :math:`N(0,\sigma_X)` to get a new estimate for the most likely X.
   The smaller the noise, the more valuable is Y.  If the noise is very
   small, then the mostly likely X is close to Y.  If the noise is very
   large (on average) then the most likely X is still close to 0.




