TO BUSINESS (MGMT 105)
HOMEWORK 3 TEXAS A& M
UNIVERSITY
, lOMoAR cPSD| 19857451
1. R comes with a data frame faithful about the geyser Old Faithful in Yellowstone Park.
Over 200 eruptions of the geyser are recorded. For each eruption, the duration of the
eruption (in the column eruptions) and the time until the next eruption (in the column
waiting) are recorded, both in minutes.
a. Print out a summary of the data frame faithful. (Since it's included in R you don't need to load
it or read it in.)
Ans. > summary(faithful)
eruptions waiting
Min. :1.600 Min. :43.0
1st Qu.:2.163 1st Qu.:58.0
Median :4.000 Median :76.0
Mean :3.488 Mean :70.9
3rd Qu.:4.454 3rd Qu.:82.0
Max. :5.100 Max. :96.0
b. What is the average time between eruptions?
Ans. > mean(faithful$waiting)
[1] 70.89706
c. Create a histogram of the time between eruptions. Interpret the graph.
Ans. > hist(faithful$waiting, main="Time between Eruptions", xlab = "Waiting Time", col =
"gray")
Time between Eruptions
10 20 30 40 50
Frequency
0
40 50 60 70 80 90 100
Waiting Time