A set of three distinct positive integers has mean 4 and median 5. What is the largest number in the set?

To find the largest number in the set, we need to understand the properties of mean and median and how they relate to the set of numbers.

The mean is the sum of all the numbers divided by the count of numbers in the set. In this case, the mean is 4 because the set has a mean of 4.

The median is the middle number when the numbers are arranged in ascending or descending order. In this case, the median is 5 because the set has a median of 5.

Let's assume the three distinct positive numbers in the set are arranged in ascending order. Since 5 is the middle number (median), the smallest number in the set must be less than 5.

Let's say the smallest number in the set is a. Since the mean of the set is 4, the sum of the three numbers must be 3 times 4, which is 12. So, the sum of the three numbers is a + 5 + b = 12.

To find the largest number, we need to maximize b. Since a and b are distinct positive integers, a < b. We also know a + 5 + b = 12.
Using these constraints, we can try different values of a and b to find the largest number.

- If we choose a = 1 and b = 6, we get 1 + 5 + 6 = 12, which satisfies the sum condition. So, the largest number would be 6.
- If we increase b any further, the sum would become larger than 12, which violates the condition.

Therefore, the largest number in the set of three distinct positive integers with a mean of 4 and a median of 5 is 6.