Basic Descriptive Statistics Introductory Data Set
5.683
5.620
5.551
5.549
5.536
5.552
5.548
5.539
5.554
5.552
5.684
5.632
MEASURES OF CENTRAL TENDENCY
n
Y
5.536 + 5.539 + ! + 5.684
= 5.5833 = 5.583
n
12
~
Y = Y( n+1) / 2
if n is odd then
median
(5.552 +
Long Problem Set 1
For each problem below, briefly summarize the requested descriptive statistics and answer
any accompaning questions. I will evaluate your answers both on the appropriateness of
your computations and the insightfulness of your analysis.
Scripting Functions In R
As is the case with any programming language, R includes built-in functions to carry out defined tasks. The availability of these built-in functions greatly simplifies calculations. For example, to find the mean for an object we u
# function simsample
simsample = function(reps, maxsize)cfw_
index <- 0
x <- rep(1:maxsize, times = reps)
y <- c(1:maxsize*reps)
for (i in 1:reps)cfw_
for (j in 1:maxsize)cfw_
index <- index + 1
y[index] <- mean(rnorm(j, 10, 1)
plot(x, y, ylim
SAMPLE R SESSION FOR F-TEST AND FOR T -TEST
# use the file sigtest.RData
> load(file.choose( )
> ls( )
# t-test of data from Problem 4.19
> abs
> mean(abs)
> t.test(
)
# F-test of data from Problem 4.24
> std.method; new.method
> var(std.method); var(new.
Visualizing Data in R
One attractive feature of R is the ability to display your data, or the results of your manipulation of
that data, in a variety of graphical formats. There are three main graphical systems in R for visualizing database, lattice, and