# Ordered List: How is Overlay Determined?

Not specifically a CL question, but about a specific feature on the Activity Builder.
When you give students an “Ordered List” on the teacher view one of the options is for an “Overlay” which summarizes how students ranked the items.

I am wondering how the order in the Overlay is determined. Is it just based on which items were ranked first more frequently, or does it take all positions into account?

I looks like it’s either your correct order, or the order it shows in the CL if no correct order is indicated. Then, the bar graphs on the side coincide with how students ranked that particular choice.

For this example, I didn’t choose a correct order and the choices were originally listed in this order:

1. Leisure Time
2. Social Life
3. Mental Health
4. Physical Health

So it seems that it used the students’ rankings in some way to determine the Overlay’s order. Could just be simply by which one they ranked 1st most frequently. Would need to have my students answer a few more to see how it changes.

Maybe has to do just with what’s chosen first then. Easy enough to try by testing it in a bunch of tabs.

That aside, other than the number one spot, the rest are in alphabetical order.

It seems that they weight the ranks and I was wondering what weights they used to do that. Not sure if there is a better place to ask. Here’s an updated version showing it’s not just by 1st position, as the last one was ranked 1st by more people but still shows up as last.

I might play around it it later in different tabs as you suggested.

I can confirm. We use a ranked average to set the position and arrange ties by their initial position on the component.

1 Like

Do you know the specifics? For example, with a 5-element list, how is the ranked average done?

Its a pretty standard weighted average. We count the number of times an item is put into a particular position, multiply each value by the number of rows above, sum the list, and then arrange them in order from least to greatest.

For example, if an item was placed in the first position twice, the second position three times, and the third position once, we’d make the list `[2,3,1]`

Then we’d multiply and total: `2*0+3*1+1*2` where 0, 1, and 2 are the number of rows above each position

That gives the item a score of 5 that we’d compare to the other items.

Makes sense. Thanks for the reply! I was really just curious about the math behind it.