# Blog Archives

## T-tests

August 17, 2015
By

One-Sample T-Tests To conduct a one-sample t-test in R, we use the syntax t.test(y, mu = 0) where x is the name of our variable of interest and mu is set equal to the mean specified by the null hypothesis. So, for example, if we wanted to test whether the volume of a shipment of

## Determine your Fitbit stride length using a GPS watch

July 15, 2014
By

I have been carrying my Fitbit One for a little over two years with me and it keeps tracking my daily steps. It also tracks my distance covered by multiplying those steps using the stride length which you can either provide explicitly or implicitly setting your heights. In the winter of 2012 I bought my … Continue reading...

## Analyzing Sleep with Sleep Cycle App and R

January 28, 2014
By

I have been tracking my sleep for almost two years now using my Fitbit. I started with the Fitbit Ultra and then moved on the the Fitbit One after it came out. In October 2013 I found out about the Sleep Cycle (Link) app for the iPhone. For weeks, Sleep Cycle was listed as the … Continue reading...

## Berlin Marathon 2014 Participants

November 12, 2013
By

After the 2013 Berlin Marathon sold out in less than four hours, the organizers decided to alter the registration process for 2014. First there was a pre-registration phase followed by a random selection from the pool of registrants to receive a spot. Those who were selected had to register until November 11th, 2013. Any spots … Continue reading...

## Five years of Weight Tracking

June 22, 2013
By

After I moved back from New Jersey in June 2008 I started to track my body weight more seriously. My routine usually consists of getting up and after finishing the morning bathroom I would step on my scale. That way I try to ensure that the condition for each weighing are as similar as possible. … Continue reading...

## Using R for Introductory Statistics, 3.1

May 21, 2010
By

Pairs of categorical data The grades data.frame holds two columns of letter grades, giving pairs of categorical data, like so: prev grade 1 B+ B+ 2 A- A- 3 B+ A- ... 122 B B This type...

## Using R for Introductory Statistics, Chapters 1 and 2

April 27, 2010
By

I'm working my way through Using R for Introductory Statistics, by John Verzani, a free version of which is available as SimpleR. Chapter 1 ...covers basics of R such as arithmetic, loading libraries and reading data. We also get an introduction to v...

## The R type system

February 21, 2010
By

R is a weird beast. Through it's ancestor the S language, it claims a proud heritage reaching back to Bell Labs in the 1970's when S was created as an interactive wrapper around a set of statistical and numerical subroutines. As a programming language,...

## Pivot tables in R

January 9, 2010
By

A common data-munging operation is to compute cross tabulations of measurements by categories. SQL Server and Excel have a nice feature called pivot tables for this purpose. Here we'll figure out how to do pivot operations in R.Let's imagine an experim...

## SQL group by in R

December 27, 2009
By

The R statistical computing environment is awesome, but weird. How to do database operations in R is a common source of questions. The other day I was looking for an equivalent to SQL group by for R data frames. You need this to compute summary statist...