My data set has a column that indicates the time taken (in days) for members on a site - each with an ID - to sign up for an event. This can range between 1 to 300 days, with about half of the rows filled with NaNs for members who have yet to sign up for any events. Another column indicates the channel through which members initially joined the site, for example through direct referrals, a forum, or other websites.

The question is: If I'd like to try and estimate which groups I should target, as well as the best time, to send an e-mail reminder that increases the chances that members sign up for an event, what would be the appropriate approach if I have no labels for whether past e-mail reminders is successful or not? I was thinking of taking the average (median) of days taken to sign up for an event grouped by the channel through which members joined the site, but that would remove half the data which seems like a waste. Is there an alternative method?


3 Answers 3


What you are asking about is called imputation - https://en.wikipedia.org/wiki/Imputation_(statistics)

Imputation basically means replacing NaNs with other data. There are lots of ways to do it and the method usually depends on the application. In this case you are the domain expert so you would be in the best position to decide what imputation method you should use.

Some common imputation methods are:

Mean (replace all NaNs with the average)

Median (replace all NaNs with the "middle" of the data)

MICE (Multiple Imputation by Chained Equations - probably overkill for your application, but worth looking into)

In your case I would go with mean imputation to start and then see what kind of results you get.

  • $\begingroup$ I did think about that, but I was a little unsure about the resulting interpretation because the NaN values in this case could be indicative of something systematic about people who tend not to sign up rather than a representation of randomly missing values. Would imputation still be valid, you think? Thank you for the quick response so far! $\endgroup$
    – GendouH
    Oct 30, 2019 at 12:50
  • $\begingroup$ Imputation is as valid as you make it. When you report your findings be able to say "I used mean imputation because it is good practice." OR "I came up with my own imputation method because based on my experience in this field people tend not to sign up because of X, so I did Y calculation to estimate that." There are no hard and fast rules - just ground what you do in common sense. $\endgroup$
    – bstrain
    Oct 30, 2019 at 22:46

I would remodel the problem in a different manner. Bin the days to sign up feature into meaningful bins(first day, 2-7 days, 8-14, etc..). Also add a feature stating number of days since join. Then your data might look like:

uid | channel | join_date | days_since_join| is_first_day_signup | is_first_week_signup | etc..
1 | forum | 20/10/2019 | 30 | 0 | 1 | ...

Then per each group per each binned days feature leave only users with relevant minimum days_since_join. Count number of eligible users(ones with big enough days_since_join) and calculate rate of ones who signed up to an event.

For example:
channel | eligible_users for first week sign up | rate of users who signed on first week
forum | 100 | 0.6
FB | 500 | 0 .4

This method allows you using the data of users who had yet signed up.

Its also straight forward seeing when users tend to sign up(by channel or not).
This approach is somewhat similar to cohort analysis.


Don't use the raw data. Also, there is nothing wrong with discarding bad data usually, if you can afford this.

Instead define derived features, such as a binary feature indicating if the user joined an event. This no longer will have NAs. The median time yo join is another feature, and it may be okay to set this to the maximum time for those who never joined an event.

Of you want a more scientific approach, I suggest you try modeling your data with right-censored distributions, for example.


Your Answer

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

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