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).

website performance data

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.

enter image description here

  • 1
    $\begingroup$ Log scale often helps on such graphs. $\endgroup$ – Nick Cox Apr 24 '19 at 20:41
  • 1
    $\begingroup$ On log scale lines with $xy$ constant are straight too. $\endgroup$ – Nick Cox Apr 24 '19 at 21:24
  • $\begingroup$ Thanks for the tip, @NickCox, it is easier to read now. I don't understand your second comment though. Are you suggesting another improvement? $\endgroup$ – DavidS Apr 24 '19 at 21:30
  • 1
    $\begingroup$ 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. $\endgroup$ – Nick Cox Apr 24 '19 at 21:36
  • $\begingroup$ Thanks for explaining, @NickCox. It's a big help. $\endgroup$ – DavidS Apr 25 '19 at 17:10

NUM_TRANSACTIONS * AVERAGE is the total time spent loading this page (e.g. page 1: the sum of all 891 343 loading times of this page), since AVERAGE = TOTALTIME/NUM_TRANSACTIONS. This is not a good measure for your problem, since you lose the information which pages are requested frequently.

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.

  • $\begingroup$ 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.) $\endgroup$ – DavidS Apr 24 '19 at 16:12
  • $\begingroup$ I edited my answer, adding a very rough score that might help you associating number of transactions and higher-than-average loading times. $\endgroup$ – Edgar Apr 24 '19 at 16:20
  • $\begingroup$ Just checking, but I think you must mean TOTALAVERAGE = (sum of all (NUM_TRANSACTIONS*AVERAGE))/(sum of all NUM_TRANSACTIONS)? $\endgroup$ – DavidS Apr 24 '19 at 18:49
  • $\begingroup$ yes, that's correct :) $\endgroup$ – Edgar Apr 25 '19 at 8:22
  • $\begingroup$ If you have a moment for a mini-question: is this just "basic stats"? I feel like I just stumbled upon a big blank spot in my education and I'd like to fill it with something, but I'm not sure what the topic is -- "stats" seems too broad. $\endgroup$ – DavidS May 8 '19 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.