I've been looking at attendance data for a college library taken during finals week when the library was open for 24 hours. However the staff only took head counts during the hours of 12am to 6am (7 data points per night, for about 11-12 nights, 3 semesters worth of similar counts). I was wondering if, because the data isn't "continuous" I can really make anything analysis on it, since it seems to create a cyclical pattern different from what I would see over a true 24 hour period.

Do you think the data is still usable?

Also if anyone knows of any special tool applicable to time series analysis using attendance data, where we want to know how many are using the library and how to get more people to attend, I would be extremely grateful, as I'm new to statistical analysis in general. Thanks!

  • $\begingroup$ Is 12am midnight? If so you are probably missing most of the use of the library, and can only draw conclusions about night studying. $\endgroup$
    – Henry
    Jun 22, 2011 at 15:13
  • $\begingroup$ I am a little confused by your question. Do you have data for attendance for 18 hours per day over a few years and data for only 7 hours during finals week ? Perhaps if you actually posted the observed data I might be able to help. I have been involved with passenger data on an hourly basis for the Paris subway system. We have found that the intra-day distribution is quite different for different days of the week (weekdays vs weekends) and also very dependent on holidays/events. $\endgroup$
    – IrishStat
    Jun 22, 2011 at 15:35

2 Answers 2


We have seen similar problems where there is mixed frequency. For example certain beers are only made 4 months of the year. One can string out the data 7 values for day1 followed by 7 values for day2 ,etc . What we have done is to create 6 dummies for hour of the day reflecting the "fixed effects due to hour" and in this case 6 dummies reflecting day of the week. Additionally you might include interaction effects reflecting the hour-day interaction. There may also be a semester effect that might be significant . Again a set of dummy variables for the semester contrast might be a good idea. One can also include the "free coffee indicator" . Care should be taken to ensure that any outliers get neutralized by incorporating special 0/1 variables for any identifiable anomalies. In this way the "unusual values" won't bias the result. Now additionally there may have been a number of students effect and heretofore unknown deterministic policy changes that might be important to detect. I can suggest Intervention Detection procedures to fish these unknown variables out of the residuals , so to speak.


It makes no sense to slap the 7 points/day together in a contiguous fashion as your answer suggests, unless you're continuing to track the $\delta t$ between the points and treating the time series as irregularly sampled. You can compute things like (where evening = 12-6am):

  1. Mean head count per 'evening'
  2. Max head count per 'evening'
  3. Min head count per 'evening'

and then analyze the time series consisting of one of the daily statistics. These would be spaced evenly in time and you might be able to come to some conclusions about them.

Do you have a specific objective in mind for this data, i.e. are you trying to demonstrate decreased usage of these 'all-night' time slots at the end of the exam period?

  • $\begingroup$ I can't give out the data, sorry. 12am is midnight. There is a head count of all students in the building taken at 12am, 1am, 2am, 3am, 4am, 5am, & 6am. This was done each night for the week before and during finals, 11-12 days depending on the semester. Each semester is comprised of these 11-12 day sets. My question is really whether it is ok to put together the 12am-6am data points in one long graph. Its obviously cyclical because there is an 18 hour gap. How do I get rid of or account for that? Is it ok to just ignore the gaps and look at it as any other time series? $\endgroup$
    – induvidyul
    Jun 22, 2011 at 17:29
  • $\begingroup$ As I mentioned, I am very very new to statistical analysis; could you please explain delta t or at least give me a term to google? My objective is to identify trends that can be manipulated to drive more people into the library. For example, does giving out free coffee in semester 3 drive more people to study at the library? Thank you setting me straight on using these as contiguous data. $\endgroup$
    – induvidyul
    Jun 22, 2011 at 19:14
  • $\begingroup$ $\delta t$ refers to the delta (or relative) time between points. So in your case, between the sample at midnight and 1am, there is a $\delta 1 = 1$ hour. From your description, it sounds as if what you're mostly interested in is total library usage, which can be represented (in a daily sense) as either the sum of all head counts or the mean of all head counts. If you convert your data from 7 pts/day into 1 pt/day and plot each Semester individually, you may then be able to draw some conclusions about your samples. $\endgroup$ Jun 22, 2011 at 20:55

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.