0% found this document useful (0 votes)
11 views2 pages

STAT501 Online - HW1R - Spring2024

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

STAT501 Online - HW1R - Spring2024

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

HW1R

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)

favstats(~ pcs, data=HELPrct)

## min Q1 median Q3 max mean sd n missing


## 14.07429 40.38438 48.87681 56.95329 74.80633 48.04854 10.7846 453 0

densityplot(~ pcs,
main="Figure 1: Density plot\nof Physical Component Scores from HELP study",
data=HELPrct)

Figure 1: Density plot


of Physical Component Scores from HELP study

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)

favstats(~ waiting, data=faithful)

## min Q1 median Q3 max mean sd n missing


## 43 58 76 82 96 70.89706 13.59497 272 0

densityplot(~ waiting,
xlab="Waiting time to next eruption (in mins)",
main="Figure 2: Density plot of Old Faithful geyser dataset", data=faithful)

Figure 2: Density plot of Old Faithful geyser dataset

0.03
Density

0.02

0.01

0.00

40 60 80 100

Waiting time to next eruption (in mins)

SOLUTION:

You might also like