HW2Sol - Rweb:> X <-

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
STAT 3011 Spring 2009 Solutions: HW2 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5. Rweb output: Rweb:> postscript(file= "/tmp/Rout.19740.ps") Rweb:> X <- read.table("/tmp/Rdata.19740.data", header=T) Rweb:> attach(X) Rweb:> names(X) [1] "Nation" "Unemployment" Rweb:> Rweb:> Rweb:> stem(Unemployment) The decimal point is at the | 2 | 26 4 | 4504 6 | 070278 8 | 467 Rweb:> hist(Unemployment, xlab="Unemployment Rate", main="Histogram + of Unemployment", breaks=3) Rweb:> mean(Unemployment) [1] 6.28 Rweb:> median(Unemployment) [1] 6.7 Rweb:> Images 2
Background image of page 2
(a) quantitative. (b) See above. (c) The distribution is close to symmetry, though it's skewed to the left a little bit. (d) Based on part (c), we don't expect the mean is identical to the median, but they should be close. (e) Mean is 6.28 and median is 6.7, which is consistent with the answer in part (d). 7. Rweb output: Rweb:> postscript(file= "/tmp/Rout.19940.ps")
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Rweb:&gt; X &lt;- read.table(&quot;/tmp/Rdata.19940.data&quot;, header=T) Rweb:&gt; attach(X) Rweb:&gt; names(X) [1] &quot;Gender&quot; &quot;Minutes&quot; Rweb:&gt; Rweb:&gt; Rweb:&gt; summary(Minutes) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.00 93.75 120.00 141.20 180.00 360.00 Rweb:&gt; boxplot(Minutes ~ Gender, ylab=&quot;Study Time (min/night)&quot;, main + = &quot;Boxplot of Study Times by Gender&quot;) Rweb:&gt; 3 Images (a) See above. (b) Q1 is 93.75, which means 25% of the data below 93.75. Q3 is 180.00, which means that 25% of the data above 180.00. (c) See above. (d) The distribution for female should be more left-skewed than that for male since the median of female group is close to the 3rd quartile. Besides, all summary statistics of female group are larger than those of male group, indicating that female students spent more time than male ones. 4...
View Full Document

Page1 / 4

HW2Sol - Rweb:&amp;amp;gt; X &amp;amp;lt;-

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online