4. Modeling Assumptions in Regression

Review: Joint, Conditional, and Marginal Distributions

Let (X,Y) be a pair of random variables with joint density h(x,y)=x+y over the space [0,1]**2.

-What is the marginal density of X ? We denote this by writing h(x).
h(x)=


-What is the conditional density of Y given X=x? We denote this by writing .
h(x|y)=

1. x+1/2

2. (x+y)/(x+1/2)

To find the marginal density of X, we need to integrate the joint density h(x,y) over all possible values of Y.

h(x) = ∫[0,1] h(x,y) dy

In this case, the joint density h(x,y) is x+y, so we can substitute that into the integral:

h(x) = ∫[0,1] (x+y) dy

Now we can integrate with respect to y:

h(x) = [xy + (y^2)/2] evaluated from 0 to 1

Now we substitute the limits of integration:

h(x) = x(1) + (1^2)/2 - x(0) - (0^2)/2

h(x) = x + 1/2 - 0 - 0

So, the marginal density of X is h(x) = x + 1/2.

To find the conditional density of Y given X=x, we use the formula:

h(y|x) = h(x,y) / h(x)

In this case, the joint density h(x,y) is x+y and the marginal density of X is x+1/2, which we just found. So we can substitute these values into the formula:

h(y|x) = (x+y) / (x + 1/2)

So, the conditional density of Y given X=x is h(y|x) = (x+y) / (x + 1/2).

To find the marginal density of X, we integrate the joint density h(x, y) over all possible values of y.

h(x) = ∫ h(x, y) dy

Given that the joint density is x+y, we can substitute this into the integral:

h(x) = ∫ (x+y) dy

Integrating with respect to y, we get:

h(x) = x*y + (1/2)y^2 + C

Since we are looking for a density function, we need to normalize it such that the integral over all possible x values is equal to 1. Thus, we can solve for the constant C:

∫ h(x) dx = 1

∫ (x*y + (1/2)y^2 + C) dx = 1

Integrating with respect to x, we get:

[(1/2)*x^2*y + (1/6)*y^2*x + C*x] evaluated from 0 to 1 = 1

[(1/2)*y + (1/6)*y^2 + C] - (0 + 0 + 0) = 1

Simplifying, we get:

(1/2)*y + (1/6)*y^2 + C = 1

From here, we can solve for C:

C = 1 - (1/2)*y - (1/6)*y^2

Therefore, the marginal density of X is:

h(x) = x*y + (1/2)y^2 + (1 - (1/2)*y - (1/6)*y^2)