# How to rank observations with two variables (website performance)

I have no background in statistics, so I find myself confused by this simple problem. I'm not even sure which search terms to use.

I have some website performance data. I have the number of times a page was requested/visited, and how long it took to load (average time and percentiles in seconds).

I want to identify pages that are often requested/visited but take a long time to load. So for example, if an "FAQ" page takes 30 seconds to load but is only visited a few times a day, this is less important than a "Search" page that takes 2 seconds to load but is used thousands of times a day. The purpose is to make a "Top 10" list or something like that which some website developers will use to improve performance.

I had thought to do something simple like create a new column with NUM_TRANSACTIONS * AVERAGE and sort that, but I'm wondering if there is something wrong with this approach.

SOLVED: Edgar's answer worked well for me. I created the plot he suggested, and the scoring mechanism, and they produced similar results. The number markers indicate ranking.

• Log scale often helps on such graphs. – Nick Cox Apr 24 '19 at 20:41
• On log scale lines with $xy$ constant are straight too. – Nick Cox Apr 24 '19 at 21:24
• Thanks for the tip, @NickCox, it is easier to read now. I don't understand your second comment though. Are you suggesting another improvement? – DavidS Apr 24 '19 at 21:30
• You are interested in the product $xy$ of your two variables. On log scale hyperbolas $xy =$ constant are mapped to straight lines $\log x + \log y =$ another constant. I find straight lines easier to compare than hyperbolas. Also, log scale will spread your data more evenly. – Nick Cox Apr 24 '19 at 21:36
• Thanks for explaining, @NickCox. It's a big help. – DavidS Apr 25 '19 at 17:10

For the start, it might be helpful to plot the NUM_TRANSACTIONS versus the AVERAGE time to load (since we don't know anything else about the pages like number of images/javascript code/whatever) and inspect visually if there are unusually high AVERAGE loading times associated with high NUM_TRANSACTIONS.

Alternatively, if you want to identify the Top 10 problematic candidates, you could find the overall average loading time: TOTALAVERAGE = (sum of all (NUM_TRANSACTIONS*AVERAGE))/(sum of all NUM_TRANSACTIONS), then sort your pages by decreasing NUM_TRANSACTIONS and take the 10 topmost pages where AVERAGE is above TOTALAVERAGE.

Bulding on this, you could calculate a rough SCORE = NUM_TRANSACTIONS*(AVERAGE-TOTALAVERAGE) for all pages and take the Top 10 with the highest positive SCORE.

• Thank you Edgar. Your first paragraph shows exactly the sort of bone-headed mistake I was trying to avoid. I'm going to try both of the approaches you suggest. My goal is to make something like a "Top 10" list. (I will mark a question correct this afternoon.) – DavidS Apr 24 '19 at 16:12
• Just checking, but I think you must mean TOTALAVERAGE = (sum of all (NUM_TRANSACTIONS*AVERAGE))/(sum of all NUM_TRANSACTIONS)? – DavidS Apr 24 '19 at 18:49