11 Apr 2015

Summary

How does potato starch affect my sleep?

Here is the summary chart based on testing since October 2014:

This is for a total of 125 days of complete PS/REM/Z/Deep data. (n=31) nights with potato starch.

Overall Sleep Summary

(from 2014-10-05 to 2015-04-10 )

Sleep (n=125) Average (hrs) Standard Deviation w/Potato Starch (n=31)
total sleep (Z) 6.356 0.823 6.415 (SD=0.76)
REM 1.825 0.396 1.857 (SD=0.39)
Deep 1.064 0.194 1.073 (SD=0.2)

Although the average amount of sleep I get with potato starch is slightly higher, there is enough variance in the data for it to be a coincidence.

Here’s a summary of the REM sleep (standard deviation = 23.7691276 minutes) for all dates (n=126 ) when I have Zeo REM data:

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.7167  1.5460  1.8500  1.8250  2.0420  2.6670

What’s the standard deviation (variance) for days when I have above average and below-average sleep?

sd(rik2$Z[rik2$Z>mean(rik2$Z,na.rm=TRUE)],na.rm=TRUE)
## [1] 0.4585686
sd(rik2$Z[rik2$Z<mean(rik2$Z,na.rm=TRUE)],na.rm=TRUE)
## [1] 0.588466

Summary of when/how I took potato starch

I tried potato starch on 61 days, and I have Zeo sleep data for a total of 31 of those days.

On 16 days I took exactly one tablespoon.

For total sleep (Z):

##     days   Z.Mean REM.Mean Deep.Mean      Z.SD
## 0     94 6.311312 1.818262  1.061170 0.7412362
## 1     16 6.609979 1.975000  1.064583 0.7015906
## 1.5    1 6.283333 1.300000  1.083333        NA
## 2      6 6.047222 1.641667  1.016667 0.7371429
## 2.5    1 5.750000 1.983333  1.250000        NA
## 3      3 6.933333 2.105556  1.066667 0.9291573
## 4      3 6.000000 1.694444  1.111111 1.0000000
## 8      1 6.000000 1.433333  1.250000        NA

T-Test for Potato Starch Sleep

Here’s the effect of any potato starch has on my overall sleep (Z), REM, and Deep:

t.test(allps$Z[allps$Potato.Starch==0],allps$Z[allps$Potato.Starch>0])
## 
##  Welch Two Sample t-test
## 
## data:  allps$Z[allps$Potato.Starch == 0] and allps$Z[allps$Potato.Starch > 0]
## t = -0.6669, df = 50.335, p-value = 0.5079
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.4173695  0.2092624
## sample estimates:
## mean of x mean of y 
##  6.311312  6.415366
t.test(allps$REM[allps$Potato.Starch==0],allps$REM[allps$Potato.Starch>0])
## 
##  Welch Two Sample t-test
## 
## data:  allps$REM[allps$Potato.Starch == 0] and allps$REM[allps$Potato.Starch > 0]
## t = -0.4772, df = 52.482, p-value = 0.6352
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.2015359  0.1240823
## sample estimates:
## mean of x mean of y 
##  1.818262  1.856989
t.test(allps$Deep[allps$Potato.Starch==0],allps$Deep[allps$Potato.Starch>0])
## 
##  Welch Two Sample t-test
## 
## data:  allps$Deep[allps$Potato.Starch == 0] and allps$Deep[allps$Potato.Starch > 0]
## t = -0.2744, df = 48.903, p-value = 0.7849
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.09496866  0.07214779
## sample estimates:
## mean of x mean of y 
##  1.061170  1.072581

(p-values are too high, indicating virtually no effect )

T-Test with Potato Starch = 1 TBS

Try with a single tablespoon (but note: n=16) is very small:

t.test(allps$Z[allps$Potato.Starch==0],allps$Z[allps$Potato.Starch==1])
## 
##  Welch Two Sample t-test
## 
## data:  allps$Z[allps$Potato.Starch == 0] and allps$Z[allps$Potato.Starch == 1]
## t = -1.561, df = 21.118, p-value = 0.1334
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.69643578  0.09910156
## sample estimates:
## mean of x mean of y 
##  6.311312  6.609979
t.test(allps$REM[allps$Potato.Starch==0],allps$REM[allps$Potato.Starch==1])
## 
##  Welch Two Sample t-test
## 
## data:  allps$REM[allps$Potato.Starch == 0] and allps$REM[allps$Potato.Starch == 1]
## t = -1.8875, df = 25.984, p-value = 0.07031
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.32743354  0.01395836
## sample estimates:
## mean of x mean of y 
##  1.818262  1.975000
t.test(allps$Deep[allps$Potato.Starch==0],allps$Deep[allps$Potato.Starch==1])
## 
##  Welch Two Sample t-test
## 
## data:  allps$Deep[allps$Potato.Starch == 0] and allps$Deep[allps$Potato.Starch == 1]
## t = -0.07, df = 21.41, p-value = 0.9448
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.10463150  0.09780526
## sample estimates:
## mean of x mean of y 
##  1.061170  1.064583

Potato Starch affect on Deep Sleep

Here’s the affect on deep sleep, X=no potato starch, Y=some potato starch

compare_treatment(data=rik2,treatment=rik2$Potato.Starch,wrt="Deep")
## 
##  Welch Two Sample t-test
## 
## data:  data[[wrt]][treatment > 0] and data[[wrt]][treatment == 0]
## t = 0.2744, df = 48.903, p-value = 0.7849
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.07214779  0.09496866
## sample estimates:
## mean of x mean of y 
##  1.072581  1.061170

Potato Starch affect on REM Sleep

Here’s the affect on REM sleep, X=no potato starch, Y=some potato starch

compare_treatment(data=rik2,treatment=rik2$Potato.Starch,wrt="REM")
## 
##  Welch Two Sample t-test
## 
## data:  data[[wrt]][treatment > 0] and data[[wrt]][treatment == 0]
## t = 0.4772, df = 52.482, p-value = 0.6352
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.1240823  0.2015359
## sample estimates:
## mean of x mean of y 
##  1.856989  1.818262

Alcohol doesn’t affect my sleep

How about alcohol? Here’s my sleep average with and without drinking alcohol:

waR <- rik2[rik2$Alcohol>0,]$Z
woaR <- rik2[rik2$Alcohol==0,]$Z
mean(waR, na.rm=TRUE)
## [1] 6.350194
mean(woaR, na.rm=TRUE)
## [1] 6.361838

i.e. virtually no difference. and here’s REM with and without alcohol:

waR <- rik2[rik2$Alcohol>0,]$REM
woaR <- rik2[rik2$Alcohol==0,]$REM
mean(waR, na.rm=TRUE)
## [1] 1.805721
mean(woaR, na.rm=TRUE)
## [1] 1.846045

Deep sleep without and then with alcohol (the control, i.e. the null case is shown as X)

compare_treatment(data=rik2,treatment=rik2$Alcohol,wrt="Deep")
## 
##  Welch Two Sample t-test
## 
## data:  data[[wrt]][treatment > 0] and data[[wrt]][treatment == 0]
## t = -0.2763, df = 123.999, p-value = 0.7828
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.07761694  0.05860184
## sample estimates:
## mean of x mean of y 
##  1.059701  1.069209
compare_treatment(data=rik2,treatment=rik2$Alcohol,wrt="REM")
## 
##  Welch Two Sample t-test
## 
## data:  data[[wrt]][treatment > 0] and data[[wrt]][treatment == 0]
## t = -0.5654, df = 118.516, p-value = 0.5729
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.1815451  0.1008974
## sample estimates:
## mean of x mean of y 
##  1.805721  1.846045
compare_treatment(data=rik2,treatment=rik2$Alcohol,wrt="Z")
## 
##  Welch Two Sample t-test
## 
## data:  data[[wrt]][treatment > 0] and data[[wrt]][treatment == 0]
## t = -0.0897, df = 159.286, p-value = 0.9286
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.2678830  0.2445966
## sample estimates:
## mean of x mean of y 
##  6.350194  6.361838

bottom line: no measurable difference.

Taking Vitamin D (Y, below) seems to slightly increase my REM:

compare_treatment(data=rik2,treatment=rik2$Vitamin.D,wrt="REM")
## 
##  Welch Two Sample t-test
## 
## data:  data[[wrt]][treatment > 0] and data[[wrt]][treatment == 0]
## t = 1.9235, df = 71.716, p-value = 0.05839
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.005514323  0.308119644
## sample estimates:
## mean of x mean of y 
##  1.877439  1.726136

and maybe a tiny improvement in overall sleep too:

compare_treatment(data=rik2,treatment=rik2$Vitamin.D,wrt="Z")
## 
##  Welch Two Sample t-test
## 
## data:  data[[wrt]][treatment > 0] and data[[wrt]][treatment == 0]
## t = 0.7154, df = 135.05, p-value = 0.4756
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.1669586  0.3561981
## sample estimates:
## mean of x mean of y 
##   6.40019   6.30557

but the p-values in each case are high enough that I shouldn’t make assumptions about Vitamin D one way or another.