What’s wrong in it?

n=14

n/2=7

(n/2)+1=8

so 7th position of element is 6

and 8th position of element is 7

median =(6+7)/2=6.5

because the value of median is lie in between the 6 and 7 postion of the give data and i.e 6.5

5 Likes

Hi, like a few other users have pointed out, let me clarify your doubt

\text{L = [2,3,3,5,6,6,6,7,10,10,13,14,15,15] contains 14 elements (even number)}\\~\\
\text{Let n be the number of elements which is 14 in this case}\\~\\
\text{Let x be the element at position} \frac{n}{2} = \frac{14}{2}=7\\~\\
\text{Let y be the element at position } (\frac{n}{2}+1)= (\frac{14}{2}+1)=8\\~\\
\therefore\text{The values are}\\~\\
x=L[7]=6\\
y=L[8]=7\\~\\
\text{For an even number of elements, Median}=\frac{\frac{n}{2}+(\frac{n}{2}+1)}{2} \space or \frac{x+y}{2}\\~\\
\therefore Median = \frac{6+7}{2}=6.5

Hope this clarifies your doubt.

Well, Thank You Everyone for helping. I forgot that the professor said that we need to find the average of “values” at the indexes, instead I calculated the average of indexes.