Step 1: Median calculation
The median of the dataset is the middle element. Since the dataset has 5 elements, the median will be the third element in the ordered set. Thus, \( a = 3 \) because the median is 3, and it corresponds to the third element.
Step 2: Mean calculation
The mean of the dataset is the sum of the elements divided by the number of elements. We are told that the mean is 3, so we can use the formula: \[ {Mean} = \frac{-5 + 1 + a + 5 + b}{5} = 3. \] Substituting \( a = 3 \) into the equation: \[ \frac{-5 + 1 + 3 + 5 + b}{5} = 3. \] Simplifying the equation: \[ \frac{4 + b}{5} = 3, \] \[ 4 + b = 15, \] \[ b = 11. \] Thus, the value of \( b \) is 11.