How to compute a "weather" score for repeated trials over time, with a bias for recency

45 Views Asked by At

I'm doing some analysis on repeated software tests that can either pass or fail. For each test, I've collected a set of historical (pass/fail, timestamp) records, and I'd like to compute a score to indicate the "weather" of a test -- some indication of the "health" of the test.

Currently, I'm taking 10 most recent records, and finding the fraction which passed. This gives me a score between 0 and 1, and I can associate the score with an icon (0 = stormy icon, 1 = sunshine, etc).

However, this doesn't take into account the recency of the records -- I'd like to give greater weight to more recent results, and lesser weight to older results.

What might be a good way of doing this? I'd ideally like something that would give a score between 0 and 1, would work on any number of records, and would allow me to tune how much weight is given to recency.