# Given a table defining the joint probabilities, how do I calculate certain parameters of the marginal distributions?

The number of items sold on any one day in the traditional shop is a random variable X and the corresponding number of items sold via the Internet is a random variable Y. The joint distribution of X and Y is described by the probability function p(x,y) below:

                 Y
X    0       1       2       3
0    0.01    0.07    0.05    0.00
1    0.09    0.15    0.15    0.06
2    0.00    0.13    0.10    0.19


Find Px(x) the marginal distribution of X

Find E(X), the expected number of items sold per day in the traditional shop

Find V(X) the variance of the number of items sold per day in the shop

Given E(Y) = 1.70 and V(Y) = 0.91 find the Co-variance between X and Y?

Owing to reduced costs, items sold on the Internet attract a higher profit margin.

The daily profit from sales of the item, P, is determined by the equation: P = 6X + 8Y - 5

Find E(P), the expected daily profit from the sales and also the standard deviation of P."

• Please see the early part of the faq - the subsection relating to homework (/self-study) questions - and see the details on the self-study tag wiki to get more details. Commented Mar 27, 2013 at 22:46

To find the marginal distribution of X, think about finding the probability that X can take on different discrete values, conditioning on Y.

pr(x = 0) = pr(x = 0 | y = 0) + pr(x = 0 | y = 1) + ... + pr(x = 0 | y = 3) = 0.13

pr(x = 1) = pr(x = 1 | y = 0) + pr(x = 1 | y = 1) + ... + pr(x = 1 | y = 3) = 0.45

etc...

To find the expected value of X, simply think about summing up the discrete values that X can take on, weighting each value by the probability of it occurring (using the previously calculated marginal distribution).

E[x] = X1*Pr(X = X1) + ... + Xn*Pr(X = Xn)

To find the variance of X, think about the average deviation of each observation. Since we don't actually have actual observations, we can think about how often we would expect each kind of discrete X value to appear by weighting each outcome with its associated probability of happening. Now think about the deviation of these expectations from average.

Given the expected value of Y and the variance of Y, we can calculate the co-variance of X and Y using the following formula: E[XY] - E[X]*E[Y]. We already know E[X] and E[Y]. To calculate E[XY] we can simply use an expectations formula.

E[XY] = XiYi * pr(X = Xi & Pr Y = Yi) + .... = (0)(0)(0.01) + (0)(1)(0.07) + (0)(2)(0.05) + (0)(3)(0.00) + ...

To find the expectation of P, E[P], we can take the expectation of both sides of the equation.

P = 6X + 8Y - 5 E[P] = E[6X + 8Y - 5]

The expectation of sums is equal to the sum of expectations using the property of Linearity.

E[P] = E[6X] + E[8Y] - E[5]

The expectation of a constant is the constant itself, since a constant is non-random.

E[P] = 6*E[X] + 8*E[Y] - 5

To find the standard deviation of P, think about how we calculated the variance of X earlier. The standard deviation of a variable is identical to the square root of the variance of that same variable.

Complete the margins of the table summing the probabilities like this:

  X  \ Y    0       1       2       3
0       0.01    0.07    0.05    0.00    0.13
1       0.09    0.15    0.15    0.06     ?
2       0.00    0.13    0.10    0.19     ?
0.10       ?       ?       ?     1


The bottom right corner must sum $1$ as indicated. This will give you the marginal distribution of $X$ (just read the rows of the table). Use the definitions to compute $\mathbb{E}[X]$ and $\mathbb{Var}[X]$ from this marginal distribution. The same for the covariance: use the definition. To find $\mathbb{E}[P]$, use the linearity of the expectation.