If the length of a set is odd then I know that the index of the median is $\frac{(n+1)}{2}$ but I'm not sure what it is when the length of the set is even. Some places I find say that it is still $\frac{(n+1)}{2}$ but some say that it is $\frac{n}{2}$.
I know this is probably an easy question that's been answered everywhere but I couldn't find it. Thanks.
I would say that it's still $\frac{n+1}2$, since that will correspond to a $X.5$th element, which lets you know that you need to take the average of the $\lfloor\frac{n+1}2\rfloor$th element and the $\lceil\frac{n+1}2\rceil$th element.
So, for instance, with $\{3, 4, 8, 9\}$, the median is the $\frac{4+1}2 = 2.5$th element. That means it's between the $2$nd and $3$rd elements, so we take the average of those elements to get $\frac{4+8}2 = 6$ as our median.