STAT501 Online - HW1R - Spring2024
STAT501 Online - HW1R - Spring2024
YOUR NAME
Problem 1 The HELPrct dataset in the mosaicData package includes data from the Health Evaluation
and Linkage to Primary Care study, which was conducted in Boston 10 years ago. One of the study variables
is a measure of physical function, with higher scores being better (possible scores can range from 0 to 100
points). Describe the sample size plus CENTER, SPREAD and SHAPE of this distribution, providing only
a single measure of center and a single measure of spread. Be sure to provide an interpretation in the context
of the problem. Could you provide any different graph to describe the distribution of this variable? (Please
do it)
densityplot(~ pcs,
main="Figure 1: Density plot\nof Physical Component Scores from HELP study",
data=HELPrct)
0.03
Density
0.02
0.01
0.00
20 40 60 80
pcs
SOLUTION:
Problem 2 (Old Faithful) The faithful dataset contains the waiting time (in minutes) to the next
eruption of the Old Faithful geyser in Yellowstone National Park in Wyoming. Describe the sample size plus
CENTER, SPREAD and SHAPE of this distribution, providing only a single measure of center and a single
1
measure of spread. Be sure to provide an interpretation in the context of the problem (and don’t forget to
specify units).Could you provide any different graph to describe the distribution of this variable? (Please do
it)
densityplot(~ waiting,
xlab="Waiting time to next eruption (in mins)",
main="Figure 2: Density plot of Old Faithful geyser dataset", data=faithful)
0.03
Density
0.02
0.01
0.00
40 60 80 100
SOLUTION: