Summaries

##   ActivityHour                          Id                Calories     
##  Min.   :2016-04-12 00:00:00.00   Min.   :1503960366   Min.   : 42.00  
##  1st Qu.:2016-04-19 01:00:00.00   1st Qu.:2320127002   1st Qu.: 63.00  
##  Median :2016-04-26 06:00:00.00   Median :4445114986   Median : 83.00  
##  Mean   :2016-04-26 11:46:42.58   Mean   :4848235270   Mean   : 97.39  
##  3rd Qu.:2016-05-03 19:00:00.00   3rd Qu.:6962181067   3rd Qu.:108.00  
##  Max.   :2016-05-12 15:00:00.00   Max.   :8877689391   Max.   :948.00  
##  TotalIntensity   AverageIntensity   StepTotal      
##  Min.   :  0.00   Min.   :0.0000   Min.   :    0.0  
##  1st Qu.:  0.00   1st Qu.:0.0000   1st Qu.:    0.0  
##  Median :  3.00   Median :0.0500   Median :   40.0  
##  Mean   : 12.04   Mean   :0.2006   Mean   :  320.2  
##  3rd Qu.: 16.00   3rd Qu.:0.2667   3rd Qu.:  357.0  
##  Max.   :180.00   Max.   :3.0000   Max.   :10554.0
##   ActivityDate              Id               TotalSteps    TotalDistance   
##  Min.   :2016-04-12   Min.   :1503960366   Min.   :    0   Min.   : 0.000  
##  1st Qu.:2016-04-19   1st Qu.:2320127002   1st Qu.: 3790   1st Qu.: 2.620  
##  Median :2016-04-26   Median :4445114986   Median : 7406   Median : 5.245  
##  Mean   :2016-04-26   Mean   :4855407369   Mean   : 7638   Mean   : 5.490  
##  3rd Qu.:2016-05-04   3rd Qu.:6962181067   3rd Qu.:10727   3rd Qu.: 7.713  
##  Max.   :2016-05-12   Max.   :8877689391   Max.   :36019   Max.   :28.030  
##  TrackerDistance  LoggedActivitiesDistance VeryActiveDistance
##  Min.   : 0.000   Min.   :0.0000           Min.   : 0.000    
##  1st Qu.: 2.620   1st Qu.:0.0000           1st Qu.: 0.000    
##  Median : 5.245   Median :0.0000           Median : 0.210    
##  Mean   : 5.475   Mean   :0.1082           Mean   : 1.503    
##  3rd Qu.: 7.710   3rd Qu.:0.0000           3rd Qu.: 2.053    
##  Max.   :28.030   Max.   :4.9421           Max.   :21.920    
##  ModeratelyActiveDistance LightActiveDistance SedentaryActiveDistance
##  Min.   :0.0000           Min.   : 0.000      Min.   :0.000000       
##  1st Qu.:0.0000           1st Qu.: 1.945      1st Qu.:0.000000       
##  Median :0.2400           Median : 3.365      Median :0.000000       
##  Mean   :0.5675           Mean   : 3.341      Mean   :0.001606       
##  3rd Qu.:0.8000           3rd Qu.: 4.782      3rd Qu.:0.000000       
##  Max.   :6.4800           Max.   :10.710      Max.   :0.110000       
##  VeryActiveMinutes FairlyActiveMinutes LightlyActiveMinutes SedentaryMinutes
##  Min.   :  0.00    Min.   :  0.00      Min.   :  0.0        Min.   :   0.0  
##  1st Qu.:  0.00    1st Qu.:  0.00      1st Qu.:127.0        1st Qu.: 729.8  
##  Median :  4.00    Median :  6.00      Median :199.0        Median :1057.5  
##  Mean   : 21.16    Mean   : 13.56      Mean   :192.8        Mean   : 991.2  
##  3rd Qu.: 32.00    3rd Qu.: 19.00      3rd Qu.:264.0        3rd Qu.:1229.5  
##  Max.   :210.00    Max.   :143.00      Max.   :518.0        Max.   :1440.0  
##     Calories      StepTotal    
##  Min.   :   0   Min.   :    0  
##  1st Qu.:1828   1st Qu.: 3790  
##  Median :2134   Median : 7406  
##  Mean   :2304   Mean   : 7638  
##  3rd Qu.:2793   3rd Qu.:10727  
##  Max.   :4900   Max.   :36019
##        Id                SleepDay                      TotalSleepRecords
##  Min.   :1503960366   Min.   :2016-04-12 00:00:00.00   Min.   :1.000    
##  1st Qu.:3977333714   1st Qu.:2016-04-19 00:00:00.00   1st Qu.:1.000    
##  Median :4702921684   Median :2016-04-27 00:00:00.00   Median :1.000    
##  Mean   :5000979403   Mean   :2016-04-26 12:40:05.80   Mean   :1.119    
##  3rd Qu.:6962181067   3rd Qu.:2016-05-04 00:00:00.00   3rd Qu.:1.000    
##  Max.   :8792009665   Max.   :2016-05-12 00:00:00.00   Max.   :3.000    
##  TotalMinutesAsleep TotalTimeInBed 
##  Min.   : 58.0      Min.   : 61.0  
##  1st Qu.:361.0      1st Qu.:403.0  
##  Median :433.0      Median :463.0  
##  Mean   :419.5      Mean   :458.6  
##  3rd Qu.:490.0      3rd Qu.:526.0  
##  Max.   :796.0      Max.   :961.0

Analysis of Daily Data

Usage

Distribution of Usage

00 to 19 ========= Low

20 to 29 ========= Medium

30 to 31 ========= High

Steps

distance

Calories

Analysis of Hourly Data

Calories

Total Intensity

Total Steps

Linear Models Hourly Data

## 
## Call:
## lm(formula = Calories ~ TotalIntensity, data = MergedHourly)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -204.98  -15.30   -1.39   17.61  418.03 
## 
## Coefficients:
##                 Estimate Std. Error t value            Pr(>|t|)    
## (Intercept)    66.390525   0.208088     319 <0.0000000000000002 ***
## TotalIntensity  2.575435   0.008556     301 <0.0000000000000002 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 26.88 on 22097 degrees of freedom
## Multiple R-squared:  0.8039, Adjusted R-squared:  0.8039 
## F-statistic: 9.06e+04 on 1 and 22097 DF,  p-value: < 0.00000000000000022
## 
## Call:
## lm(formula = Calories ~ StepTotal, data = MergedHourly)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -343.64  -18.44   -3.44   11.56  594.56 
## 
## Coefficients:
##               Estimate Std. Error t value            Pr(>|t|)    
## (Intercept) 74.4446790  0.2608497   285.4 <0.0000000000000002 ***
## StepTotal    0.0716568  0.0003428   209.1 <0.0000000000000002 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 35.18 on 22097 degrees of freedom
## Multiple R-squared:  0.6642, Adjusted R-squared:  0.6642 
## F-statistic: 4.37e+04 on 1 and 22097 DF,  p-value: < 0.00000000000000022

Analaysis of Sleep Data

## [1] "Id"                 "SleepDay"           "TotalSleepRecords" 
## [4] "TotalMinutesAsleep" "TotalTimeInBed"

Total Minutes Asleep

Total Time In Bed

Linear Model of Sleep Data

## 
## Call:
## lm(formula = TotalMinutesAsleep ~ TotalTimeInBed, data = sleepDay_merged)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -264.688   -5.565   10.953   21.793   61.033 
## 
## Coefficients:
##                Estimate Std. Error t value             Pr(>|t|)    
## (Intercept)    22.12446    8.00817   2.763              0.00599 ** 
## TotalTimeInBed  0.86635    0.01683  51.483 < 0.0000000000000002 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 43.41 on 411 degrees of freedom
## Multiple R-squared:  0.8658, Adjusted R-squared:  0.8654 
## F-statistic:  2650 on 1 and 411 DF,  p-value: < 0.00000000000000022