Sleepyhead Statistics

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
bradleyjoe
Posts: 55
Joined: Sun Mar 29, 2009 8:13 am
Location: Nebraska

Sleepyhead Statistics

Post by bradleyjoe » Sat Nov 15, 2014 2:44 pm

Why in sleepyhead the last 7 days AHI off. I look at daily add up the last 7 days and divide by 7 and the number is not the same. Is their a problem or how does sleepyhead calculate it. Brad

User avatar
ChicagoGranny
Posts: 15544
Joined: Sun Jan 29, 2012 1:43 pm
Location: USA

Re: Sleepyhead Statistics

Post by ChicagoGranny » Sat Nov 15, 2014 5:52 pm

bradleyjoe wrote:Why in sleepyhead the last 7 days AHI off. I look at daily add up the last 7 days and divide by 7 and the number is not the same. Is their a problem or how does sleepyhead calculate it. Brad

Calculate the weighted average - multiply each AHI by the number of hours of usage for that night. Now take the sum of those numbers and divide by the total hours for the seven days.

That is the weighted average and should be equal to the SH number. Never tried it myself, but let us know if SH agrees with your calculation. It should.
Last edited by ChicagoGranny on Sun Nov 16, 2014 1:52 pm, edited 1 time in total.
"It's not the number of breaths we take, it's the number of moments that take our breath away."

Cuando cuentes cuentos, cuenta cuántas cuentos cuentas.

User avatar
palerider
Posts: 32308
Joined: Wed Dec 16, 2009 5:43 pm
Location: Dallas(ish).

Re: Sleepyhead Statistics

Post by palerider » Sat Nov 15, 2014 5:58 pm

ChicagoGranny wrote:
bradleyjoe wrote:Why in sleepyhead the last 7 days AHI off. I look at daily add up the last 7 days and divide by 7 and the number is not the same. Is their a problem or how does sleepyhead calculate it. Brad

Calculate the weighted average - multiply each AHI by the number of hours of usage for that night. Now take the sum of those numbers and divide by the total hours for the seven days. Now divide that number by the total hours for the seven days.

That is the weighted average and should be equal to the SH number. Never tried it myself, but let us know if SH agrees with your calculation. It should.
my brain hurts!
Get OSCAR

Accounts to put on the foe list: dataq1, clownbell, gearchange, lynninnj, mper!?, DreamDiver, Geer1, almostadoctor, sleepgeek, ajack, stom, mogy, D.H., They often post misleading, timewasting stuff.

User avatar
Nick Danger
Posts: 621
Joined: Mon Jun 09, 2014 3:13 pm

Re: Sleepyhead Statistics

Post by Nick Danger » Sun Nov 16, 2014 7:22 am

I've found that Sleepyhead has a more accurate approach to calculating averages than ResScan.

User avatar
ChicagoGranny
Posts: 15544
Joined: Sun Jan 29, 2012 1:43 pm
Location: USA

Re: Sleepyhead Statistics

Post by ChicagoGranny » Sun Nov 16, 2014 1:55 pm

palerider wrote:my brain hurts!
Well no wonder! I duplicated the last instruction. Corrected now.

Take two aspirin and call me when you are back PailRiding again.
"It's not the number of breaths we take, it's the number of moments that take our breath away."

Cuando cuentes cuentos, cuenta cuántas cuentos cuentas.

User avatar
ChicagoGranny
Posts: 15544
Joined: Sun Jan 29, 2012 1:43 pm
Location: USA

Re: Sleepyhead Statistics

Post by ChicagoGranny » Sun Nov 16, 2014 1:56 pm

Nick Danger wrote:I've found that Sleepyhead has a more accurate approach to calculating averages than ResScan.
Did you ever actually calculate some weighted averages and compare them to SH and ResScan?
"It's not the number of breaths we take, it's the number of moments that take our breath away."

Cuando cuentes cuentos, cuenta cuántas cuentos cuentas.

User avatar
palerider
Posts: 32308
Joined: Wed Dec 16, 2009 5:43 pm
Location: Dallas(ish).

Re: Sleepyhead Statistics

Post by palerider » Sun Nov 16, 2014 2:09 pm

Nick Danger wrote:I've found that Sleepyhead has a more accurate approach to calculating averages than ResScan.
mark tends to obsess about those kinds of things.
Get OSCAR

Accounts to put on the foe list: dataq1, clownbell, gearchange, lynninnj, mper!?, DreamDiver, Geer1, almostadoctor, sleepgeek, ajack, stom, mogy, D.H., They often post misleading, timewasting stuff.

User avatar
Nick Danger
Posts: 621
Joined: Mon Jun 09, 2014 3:13 pm

Re: Sleepyhead Statistics

Post by Nick Danger » Sun Nov 16, 2014 3:37 pm

ChicagoGranny wrote:
Nick Danger wrote:I've found that Sleepyhead has a more accurate approach to calculating averages than ResScan.
Did you ever actually calculate some weighted averages and compare them to SH and ResScan?
Yes. ResScan tends to do a weighted average of the medians and the various percentiles. Mark actually loads the detailed data for all the nights and calculates them directly. You can't legitimately average medians or percentiles (even if you weight them correctly).

User avatar
palerider
Posts: 32308
Joined: Wed Dec 16, 2009 5:43 pm
Location: Dallas(ish).

Re: Sleepyhead Statistics

Post by palerider » Sun Nov 16, 2014 5:58 pm

ChicagoGranny wrote:
palerider wrote:my brain hurts!
Well no wonder! I duplicated the last instruction. Corrected now.
Take two aspirin and call me when you are back PailRiding again.
thank you granny, much better now. your concern warms my heart.
Get OSCAR

Accounts to put on the foe list: dataq1, clownbell, gearchange, lynninnj, mper!?, DreamDiver, Geer1, almostadoctor, sleepgeek, ajack, stom, mogy, D.H., They often post misleading, timewasting stuff.

User avatar
ChicagoGranny
Posts: 15544
Joined: Sun Jan 29, 2012 1:43 pm
Location: USA

Re: Sleepyhead Statistics

Post by ChicagoGranny » Sun Nov 16, 2014 6:54 pm

Nick Danger wrote:ResScan tends to do a weighted average of the medians and the various percentiles.
That's strange. It's harder and takes more lines of code to do it that way.
"It's not the number of breaths we take, it's the number of moments that take our breath away."

Cuando cuentes cuentos, cuenta cuántas cuentos cuentas.

User avatar
Nick Danger
Posts: 621
Joined: Mon Jun 09, 2014 3:13 pm

Re: Sleepyhead Statistics

Post by Nick Danger » Sun Nov 16, 2014 7:39 pm

Well, the advantage is that they can report averages without keeping the detailed data. The display on the machine for various time periods can't be done using detailed data - because they don't store that much. I'm guessing that they don't want their software to report different numbers than the machine itself.