Recipe 1: Example of Descriptive Statistics

This is an R Markdown document. Markdown is a simple formatting syntax for authoring web pages (click the MD toolbar button for help on Markdown).

When you click the Knit HTML button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

Recipes for the Design of Experiments: Recipe Outline

as of August 28, 2014, superceding the version of August 24. Always use the most recent version.

Heading

Name

School (RPI or ISMMS)

Date and Version

1. Setting

System under test

Choose one of the large datasets listed on the Realtime Board (e.g., babynames or nasaweather)
Make sure you have > 1000 data What is the problem that you were given?

Factors and Levels

??? ### Continuous variables (if any) ??? ### Response variables Define ### The Data: How is it organized and what does it look like? Describe ### Randomization Describe

# effectsize=c(0.005, 0.001, 0.01, 0.05, 0.10, 0.25, 0.50, 0.75, 1.0, 2.0, 2,5, 5.0)
m=50
n=50
sd=5
mu=180
# nu=175
nu=0.25 * sd + mu
#
x=rnorm(m,mu,sd)
y=rnorm(n,nu,sd)

t.test(x,y,var.equal=TRUE)
## 
##  Two Sample t-test
## 
## data:  x and y
## t = -2.815, df = 98, p-value = 0.005891
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -4.7939 -0.8299
## sample estimates:
## mean of x mean of y 
##     179.6     182.4

2. (Experimental) Design

How will the experiment be organized and conducted to test the hypothesis?

Describe ### What is the rationale for this design? Describe ### Randomize: What is the Randomization Scheme? Describe ### Replicate: Are there replicates and/or repeated measures? Answer ### Block: Did you use blocking in the design? Answer

3. (Statistical) Analysis

(Exploratory Data Analysis) Graphics and descriptive summary

You can also embed plots, for example:

hist(x,breaks=10,prob=TRUE,xlim=c(150,200))
lines(density(x),col="blue")
lines(density(y),col="red")

plot of chunk unnamed-chunk-2 ### Testing Describe

t.test(x,y,var.equal=TRUE)
## 
##  Two Sample t-test
## 
## data:  x and y
## t = -2.815, df = 98, p-value = 0.005891
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -4.7939 -0.8299
## sample estimates:
## mean of x mean of y 
##     179.6     182.4

Estimation (of Parameters)

Describe
You will need a table of results here

Diagnostics/Model Adequacy Checking

Describe

# qqplot

4. References to the literature

5. Appendices

A summary of, or pointer to, the raw data

complete and documented R code