1
$\begingroup$

I've been asked the following question, and, while it is obviously pretty simple, I've got myself in a tangle overthinking it. The question is:

"Imagine that you have data from a web server, which is divided into sessions. You have 24 sessions and for each session you have a number of web-pages visited (the page-count). Suppose the dataset of these counts has sample median of 37.5.

Starting with the original 24 sessions, two additional measurements are added , with page-counts 12 and 38. For the following values, indicate whether or not the median page rank can take that value:

37.5

37

29.25

25.5

25

12

"

Now I think can be 37.5: if we have 37 and 38 as the middle two values and 11 before 37, then we have a median of 37.5 in the first instance, and if we had 12 and 38, then 37 and 38 remain the middles two values. I was going to say that it cannot be 37, but now the wheels have come off and I'm not sure if it can't be, let alone the others. Does anyone have ideas for how to think about the question in a clear-headed way? My brain has gone to mush!

Note: the calculation for the median according to my textbook is the average of the middle two values if we have a data set of even length and the middle value when it is an odd length.

$\endgroup$

1 Answer 1

1
$\begingroup$

Think about putting the 24 measurements in order from smallest to biggest. So we can write that as:

$x_1 \leq x_2 \leq \ldots \leq x_{12} \leq x_{13} \leq \ldots \leq x_{24}$

and then the median is $\tilde{x} = \frac{1}{2}(x_{12} + x_{13})$, so we don't need to know anything about the smallest 10 values or the biggest 10, only the two in the middle. Since we know the median is 37.5, that gives us $\frac{1}{2}(x_{12} + x_{13}) = 37.5 \implies x_{12} + x_{13} = 75$. You can also determine that $0 \leq x_{12} \leq 37$ and $38 \leq x_{13} \leq 75$.

So what happens when you introduce the two new measurements? Clearly the 12 will go somewhere in the bottom half of values, and the 38 will go in the top half. Also, the 38 definitely becomes the "bottom of the top" value, so there are now two possibilities:

  1. If $x_{12} > 12$, then the median becomes $\tilde{x} = \frac{1}{2}(x_{12} + 38)$.

  2. If $x_{12} \leq 12$, then the median becomes $\tilde{x} = \frac{1}{2}(12 + 38) = 25$.

Case 2 is the minimum we can make the median, so that rules out 12 as a possibility. Case 1 gives us a range of possibilities, but remembering that $x_{12} \leq 37$ means the upper bound is still $\tilde{x} = 37.5$. As for the other values, think about what happens when you pick one of them for $\tilde{x}$ - can you then solve $\tilde{x} = \frac{1}{2}(x_{12} + 38)$ for $x_{12}$ and get a plausible value? I will give the hint that there is at least one more value in the list you can eliminate.

$\endgroup$
1
  • $\begingroup$ Fantastic. Thank you so much. I strive to be this clear-headed $\endgroup$
    – Dan Öz
    Oct 25, 2022 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .