PROBLEM 2

Let X and Y be independent random variables, with X uniformly distributed on [0,1] and Y uniformly distributed on [0,2]. Find the PDF fZ(z) of Z = max {X, Y}.

1. For z < 0 or z > 2:
fZ(z) = ????

2. For 0 <= z <= 1:
fZ(z) = ????

3. For 1 <= z <= 2:
fZ(z) = ????

1. 0

2. Z
3. 1/2

1. For z < 0 or z > 2:

fZ(z) = "Oops, it seems like Z escaped the boundaries! Maybe Z went for a vacation on an imaginary beach or decided to explore the infinite void."

2. For 0 <= z <= 1:
fZ(z) = "Hold on, let me find my imaginary cape and superhero glasses to help you calculate this fantastic probability! Now, Z = max{X, Y}, which means that Z will be equal to X or Y, depending on which one is larger. Since X is uniformly distributed on [0,1] and Y is uniformly distributed on [0,2], we can consider the different cases to determine fZ(z). If z is between 0 and 1, then since X can take any value between 0 and 1, it will always be smaller than or equal to z. On the other hand, Y can be smaller than or equal to z if z is less than or equal to 1. So for this range, fZ(z) = probability that X ≤ z * probability that Y ≤ z = (z-0)/(1-0) * (z-0)/(2-0) = z/2."

3. For 1 <= z <= 2:
fZ(z) = "Oh, it looks like Z decided to play hard to get between 1 and 2! In this range, there are two cases to consider. The first case is when X is greater than or equal to z, in which case Z will always be equal to X. The second case is when X is less than z and Y is greater than or equal to z. Since X is uniformly distributed on [0,1] and Y is uniformly distributed on [0,2], the probability that X is less than z is (z-0)/(1-0) = z/1 = z. The probability that Y is greater than or equal to z is (2-z)/(2-0) = (2-z)/2. Therefore, for this range, fZ(z) = probability that X is greater than or equal to z + probability that X is less than z and Y is greater than or equal to z = 1*(z-1)/1 + (z)*(2-z)/2 = (z-1) + (z)(2-z)/2 = z^2/2 - z/2 + 1 - z."

To find the probability density function (PDF) of Z, which is the maximum of X and Y, we can consider the different possible scenarios:

1. For z < 0 or z > 2:
The maximum of X and Y cannot be less than 0 or greater than 2. Therefore, for z < 0 or z > 2, the PDF fZ(z) is 0.

2. For 0 <= z <= 1:
To find the PDF fZ(z) for 0 <= z <= 1, we need to consider the different scenarios:

- If both X and Y are less than or equal to z, the value of Z would be z. So the probability of this event is given by P(X ≤ z) * P(Y ≤ z), which is z * (z/2) = z^2/2. Therefore, the PDF for this scenario is fZ(z) = z^2/2.

- If one of X and Y is greater than z (but not both), the value of Z would be equal to the maximum of X and Y, which is z. The probability of this event happening is given by 2 * P(X > z) * P(Y ≤ z), as either X or Y can be the larger value. Since X is uniformly distributed on [0,1], the probability of X > z is (1-z), and since Y is uniformly distributed on [0,2], the probability of Y ≤ z is z/2. Therefore, the PDF for this scenario is fZ(z) = 2 * (1-z) * (z/2) = (1-z)z.

Combining these two scenarios, the PDF for 0 <= z <= 1 is:

fZ(z) = z^2/2 for 0 <= z <= 1.

3. For 1 <= z <= 2:
To find the PDF fZ(z) for 1 <= z <= 2, we again consider the different scenarios:

- If both X and Y are less than or equal to z, the value of Z would be z. In this case, the probability of this event happening is P(X ≤ z) * P(Y ≤ z) = z * (z/2) = z^2/2. Therefore, the PDF for this scenario is fZ(z) = z^2/2.

- If one of X and Y is greater than z (but not both), the value of Z would be equal to the maximum of X and Y, which is z. The probability of this event happening is 2 * P(X ≤ z) * P(Y > z), as either X or Y can be the larger value. Since X is uniformly distributed on [0,1], the probability of X ≤ z is z, and since Y is uniformly distributed on [0,2], the probability of Y > z is (2-z)/2. Therefore, the PDF for this scenario is fZ(z) = 2 * z * (2-z)/2 = z * (2-z).

Combining these two scenarios, the PDF for 1 <= z <= 2 is:

fZ(z) = z^2/2 + z * (2-z) = z^2/2 + 2z - z^2 = 2z - z^2/2.

Therefore, the PDF of Z is:

fZ(z) =
0 for z < 0 or z > 2,
z^2/2 for 0 <= z <= 1,
2z - z^2/2 for 1 <= z <= 2.

To find the probability density function (PDF) of Z = max(X, Y), where X and Y are independent random variables uniformly distributed on [0,1] and [0,2] respectively, we need to consider the three different ranges of values for z:

1. For z < 0 or z > 2:
In this case, Z will always be outside the range of possible values for both X and Y. Therefore, the probability of Z taking any value outside [0,2] is 0.
Hence, fZ(z) = 0 for z < 0 or z > 2.

2. For 0 <= z <= 1:
In this range, Z can only take values between 0 and 1. To find the PDF in this range, we need to determine the probability that Z equals a specific value within [0,1].

P(Z = z) = P(max(X,Y) = z)

To find this probability, we must consider the two cases:
Case 1: X < Y:
In this case, for Z = z, X must be less than z, and Y must be greater than or equal to z. Since X is uniformly distributed on [0,1] and Y is uniformly distributed on [0,2], the probability of X < z is z (since X is uniformly distributed on [0,z]), and the probability of Y >= z is (2-z) (since Y is uniformly distributed on [0,2]).
So, for Case 1, the joint probability is fX(x) * FY(y) = z*(2-z).

Case 2: Y < X:
In this case, for Z = z, X must be greater than or equal to z, and Y must be less than z.
The probability of X >= z is (1-z) (since X is uniformly distributed on [0,1]), and the probability of Y < z is z/2 (since Y is uniformly distributed on [0,2]).
So, for Case 2, the joint probability is fX(x) * FY(y) = (1-z)*(z/2).

Since X and Y are independent, we can sum the probabilities of Case 1 and Case 2 to get the PDF in the range 0 <= z <= 1:

fZ(z) = P(X < Y)*P(X < z, Y >= z) + P(Y < X)*P(X >= z, Y < z)
= z*(2-z) + (1-z)*(z/2)
= z - z^2 + (1-z)*(z/2)
= z - z^2 + z/2 - z^2/2
= z/2 - z^2/2

Thus, for 0 <= z <= 1, the PDF of Z is fZ(z) = z/2 - z^2/2.

3. For 1 <= z <= 2:
In this range, Z can only take values between 1 and 2. Similar to the previous case, we need to determine the probability that Z equals a specific value within [1,2].

P(Z = z) = P(max(X,Y) = z)

To find this probability, we again consider two cases:
Case 1: X < Y
In this case, for Z = z, X must be less than z, and Y must be greater than or equal to z. Since X is uniformly distributed on [0,1] and Y is uniformly distributed on [0,2], the probability of X < z is z (since X is uniformly distributed on [0,z]), and the probability of Y >= z is (2-z) (since Y is uniformly distributed on [0,2]).
So, for Case 1, the joint probability is fX(x) * FY(y) = z*(2-z).

Case 2: Y < X
In this case, for Z = z, X must be greater than or equal to z, and Y must be less than z.
The probability of X >= z is (1-z) (since X is uniformly distributed on [0,1]), and the probability of Y < z is z/2 (since Y is uniformly distributed on [0,2]).
So, for Case 2, the joint probability is fX(x) * FY(y) = (1-z)*(z/2).

Since X and Y are independent, we can sum the probabilities of Case 1 and Case 2 to get the PDF in the range 1 <= z <= 2:

fZ(z) = P(X < Y)*P(X < z, Y >= z) + P(Y < X)*P(X >= z, Y < z)
= z*(2-z) + (1-z)*(z/2)
= z - z^2 + (1-z)*(z/2)
= z/2 - z^2/2

Thus, for 1 <= z <= 2, the PDF of Z is fZ(z) = z/2 - z^2/2.

To summarize:

For z < 0 or z > 2: fZ(z) = 0
For 0 <= z <= 1: fZ(z) = z/2 - z^2/2
For 1 <= z <= 2: fZ(z) = z/2 - z^2/2