0
$\begingroup$

From an event log I have derived the days between each user's logins. This leaves me with a dataframe like this: 1

I then took the average of column 'days_between_logins' which gave me a result of 15.9 days.

But then, if I calculate the average number of days between logins on an individual user basis and then average that across all users, the result is 34 days. 2

I think I have an average of averages problem? Then again, I think both results are valid.

I would really welcome any thoughts or supporting/opposing conclusions.

$\endgroup$

1 Answer 1

1
$\begingroup$

In you first approach you take into account the number of logins for each user, which you do not do in the second approach. Take the following example with two users with a different amount of logins:

$ u_1 = {7, 5, 10, 10, 8} \\ u_2 = {1} $

Using the first approach the average would be 6.8 days whereas the second approach would give an average of 4.5 days. The second approach does not take into account that we have more observations for the first user (with a higher number of days between logins) than for the first user. Which approach is the best would depend on what question you are trying to answer, but I think generally the first approach would be more accurate in getting the average time between logins.

$\endgroup$
2
  • $\begingroup$ The question is "what is the average number of days between logins?". So i guess the first approach gives an answer for "all logins" regardless of who made them, and the second approach gives an answer for "logins for the average user". So perhaps there are 2 questions really, but i'm just surprised by the difference in the 2 answers (15.9 days vs 34 days) $\endgroup$ Commented Mar 5, 2021 at 11:22
  • $\begingroup$ This difference is caused by the fact that there are users with a high number of days between logins with relatively few observations combined with the fact that the second method does not weigh the user average by the number of observations. $\endgroup$
    – Oxbowerce
    Commented Mar 5, 2021 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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