An archive the questions from Mark's Fall 2018 Stat 225.

Finding discrete joint distributions and covariance

Mark

A self driving car has a computer vision component that is used to distinguish between colors of a traffic light: red, yellow and green. This component sometimes makes a wrong decision. The red light is not recognized correctly in 5% of the cases (in 3% of the cases it is mistaken for the green light and in 2% for the yellow light); the yellow light is not recognized correctly in 2% of the cases (in 1% of the cases it is mistaken for the green light and in 1% of the cases for the red light(; and the green light is not recognized correctly in 4% of the cases (in 3% of the cases it is mistaken for the red light and in 1% for the yellow light). It is known that the traffic light in a town are showing red and green 45% of the time and yellow 10% of the time.

Let X be a random variable indicating the actual color of the traffic light and Y be a random variable indicating the outcome of the computer vision component. In both cases, we identify Green with 0, Yellow with 1, and Red with 3.

  1. Find the joint distribution of X and Y and write it in a form of a table.
  2. Find the marginal distributions of X and Y.
  3. Find the expectation of X and Y.
  4. Find the covariance of X and Y.
  5. Are X and Y independent?
Mark

Here’s my lame pivot table:

detected color   green  yellow     red  Total
actual color                                 
green           0.4320  0.0045  0.0135   0.45
yellow          0.0010  0.0980  0.0010   0.10
red             0.0135  0.0090  0.4275   0.45
Total           0.4465  0.1115  0.4420   1.00
dennis
   detected color   green  yellow     red  Total
    actual color                                 
    green           0.4320  0.0045  0.0135   0.45
    yellow          0.0010  0.0980  0.0010   0.10
    red             0.0135  0.0090  0.4275   0.45
    Total           0.4465  0.1115  0.4420   1.00
  1. Marginal dist. are the Total column/row in table above.

  2. E(X) = 0(.45) + 1(.10) + 2(.45) = 1
     E(Y) = 0(.4465) + 1(.1115) + 2(.4420) = 0.9955
    
  3. COV(X,Y)= E(X-p1)(Y-p2) =