# How to best visualize time interval difference and compute a single measure

I have a table like as shown below

subject_id   lab_test_id    lab_test_date       value    difference

"10005606"  "20364112"  "2143-12-06 02:32:00"   "1.3"   "13:10:00"
"10005606"  "20364112"  "2143-12-06 15:42:00"   "1.3"   "02:02:00"
"10005606"  "20364112"  "2143-12-06 17:44:00"   "1.3"   "10:11:00"
"10005606"  "20364112"  "2143-12-07 03:55:00"   "1.3"      NULL
"10005866"  "20364112"  "2149-10-01 19:30:00"   "2.1"   "07:42:00"
"10005866"  "20364112"  "2149-10-02 03:12:00"   "2.2"   "08:51:00"
"10005866"  "20364112"  "2149-10-02 12:03:00"   "2.1"   "04:59:00"
"10005866"  "20364112"  "2149-10-02 17:02:00"   "1.6"     NULL


the difference column indicates the time difference between each of the lab tests

Now, the doctor likes to know how often these measurements are done for each patient?

How can I best convey this information? Should I capture the average difference between lab tests?

For example, for patient = 10005606, it is 8 hours. Meaning adding all different values and divide by total number of records. 25 hours, 30 mins (approx)/3 records = 8 hours approx

Is there any other better way to represent this using median or any other measure etc?

Can guide me with this?

• If the sequential differences are sufficiently normal for your tastes, you could use the mean & SD, if not, you could use a standard nonparametric summary (min, 25th%, 50th%, 75th%, max). Is that all you're after? Or are you asking something else? Mar 26, 2021 at 19:06
• @gung-ReinstateMonica - I am looking for a way to represent the frequency of a specific lab test for each patient. For ex: I want to convey to the doctor that, lab test named "ABC" is captured on average every 12 hours for each patient. Similarly, another lab test named "DEF" is captured every 4 hours for each patient.. Mar 27, 2021 at 6:34
• So, for each lab test, I would like to know how often it was captured for each patient and then let the doctor know that it is done on average every X hours for each patient.. Mar 27, 2021 at 6:35
• Of coure, any other suggestions that you may have is also welcome Mar 27, 2021 at 6:36