(a) To find the probability that the supply is less than 1/2 gallon on a randomly selected day, we need to integrate the joint density over the region where X is less than 1/2 gallon.
Since X ≤ Y, the region where X is less than 1/2 gallon is the region where 0 ≤ X ≤ 1/2 and X ≤ Y ≤ 2.
So, we need to integrate f(x, y) = 1/2 over the region defined by these limits:
P(X < 1/2) = ∫∫(1/2) dxdy
The limits of integration are:
0 ≤ x ≤ 1/2
x ≤ y ≤ 2
The integral becomes:
P(X < 1/2) = ∫(0 to 1/2) ∫(x to 2) (1/2) dy dx
Evaluating the integral:
P(X < 1/2) = ∫(0 to 1/2) [(1/2)(2-x)] dx
= (1/2) ∫(0 to 1/2) (2-x) dx
= (1/2) [(2x - (1/2)x^2)] (0 to 1/2)
= (1/2) [(2(1/2) - (1/2)(1/2)^2) - (2(0) - (1/2)(0)^2)]
= (1/2) [1 - 1/8]
= 7/16
Therefore, the probability that the supply is less than 1/2 gallon on a randomly selected day is 7/16.
(b) To find the probability that the amount dispensed is less than 1/2 gallon on a randomly selected day, we need to integrate the joint density over the region where X is less than 1/2 gallon.
Since X ≤ Y, the region where X is less than 1/2 gallon is the region where 0 ≤ X ≤ 1/2 and 0 ≤ Y ≤ X.
So, we need to integrate f(x, y) = 1/2 over the region defined by these limits:
P(X < 1/2) = ∫∫(1/2) dxdy
The limits of integration are:
0 ≤ x ≤ 1/2
0 ≤ y ≤ x
The integral becomes:
P(X < 1/2) = ∫(0 to 1/2) ∫(0 to x) (1/2) dy dx
Evaluating the integral:
P(X < 1/2) = ∫(0 to 1/2) [(1/2)y] (0 to x) dx
= (1/2) ∫(0 to 1/2) (xy) dx
= (1/2) (x/2) (0 to 1/2)
= (1/2) [(1/2)(1/2) - 0]
= 1/8
Therefore, the probability that the amount dispensed is less than 1/2 gallon on a randomly selected day is 1/8.
(c) Z = Y - X represents the amount of soft drink left over at the end of the day.
To find the mean of Z, we need to find E(Z) = E(Y - X).
Since X and Y are independent random variables, we can find the mean of Z by subtracting the means of Y and X.
E(Z) = E(Y) - E(X)
To find the variance of Z, we use the property that Var(aX + bY) = a^2Var(X) + b^2Var(Y) + 2abCov(X, Y) where a and b are constants.
Since Z = Y - X, we have Var(Z) = Var(Y) + Var(X) - 2Cov(Y, X).
Since X and Y are independent, Cov(Y, X) = 0, so the variance simplifies to Var(Z) = Var(Y) + Var(X).
To find Var(Y), we use the formula: Var(Y) = E(Y^2) - [E(Y)]^2.
Similarly, for Var(X), Var(X) = E(X^2) - [E(X)]^2.
To calculate the mean and variance, we need to find E(X), E(Y), E(X^2), and E(Y^2).
E(X) = ∫∫x f(x, y) dx dy
The limits of integration are:
0 ≤ x ≤ y ≤ 2
The integral becomes:
E(X) = ∫(0 to 2) ∫(0 to y) x (1/2) dx dy
= (1/2) ∫(0 to 2) [(1/2)x^2] (0 to y) dy
= (1/2) ∫(0 to 2) [(1/2)y^2 - (1/2)(0)^2] dy
= (1/2) ∫(0 to 2) [(1/2)y^2] dy
= (1/2) [(1/6)(2^3 - 0)]
= 1
Similarly, we find E(Y) = ∫∫y f(x, y) dx dy
E(Y) = (1/2) ∫(0 to 2) [(1/2)y^3] dy
= (1/2) [(1/8)(2^4 - 0)]
= 1/2
To find E(X^2), we calculate:
E(X^2) = ∫∫x^2 f(x, y) dx dy
E(X^2) = (1/2) ∫(0 to 2) ∫(0 to y) x^2 dx dy
= (1/2) ∫(0 to 2) [(1/3)x^3] (0 to y) dy
= (1/2) ∫(0 to 2) [(1/3)y^3 - (1/3)(0)^3] dy
= (1/2) ∫(0 to 2) [(1/3)y^3] dy
= (1/2) [(1/12)(2^4 - 0)]
= 2/3
Similarly, we find E(Y^2) = ∫∫y^2 f(x, y) dx dy
E(Y^2) = (1/2) ∫(0 to 2) ∫(0 to y) y^2 dx dy
= (1/2) ∫(0 to 2) [(1/2)y^2] (0 to y) dy
= (1/2) ∫(0 to 2) [(1/6)y^3 - (1/2)(0)^3] dy
= (1/2) ∫(0 to 2) [(1/6)y^3] dy
= (1/2) [(1/24)(2^4 - 0)]
= 1/2
Now, we can calculate the mean and variance of Z.
Mean of Z: E(Z) = E(Y) - E(X) = 1/2 - 1 = -1/2
Variance of Z: Var(Z) = Var(Y) + Var(X) = E(Y^2) - [E(Y)]^2 + E(X^2) - [E(X)]^2
= (1/2) - (1/2)^2 + (2/3) - (1^2)
= 1/4 + 2/3 - 1/1
= 9/12
= 3/4
Therefore, the mean of Z is -1/2 and the variance of Z is 3/4.